Skip to content

ApiGatewayV2Client->getApi returns Aws\Api\Service #1936

@carlalexander

Description

@carlalexander

Please fill out the sections below to help us address your issue.

Version of AWS SDK for PHP?

3.130.0

Version of PHP (php -v)?

7.3.9

What issue did you see?

I'm trying to use the new ApiGatewayV2Client, creating an API using createApi works fine and returns a Aws\Result object. But if I try to fetch the API again using getApi, I get a Aws\Api\Service object instead. Here's the code sample used to reproduce the issue:

$client = new ApiGatewayV2Client([
    'region' => 'us-east-1',
    'version' => '2018-11-29',
]);

$api = $client->createApi([
    'Name' => 'test-api',
    'ProtocolType' => 'HTTP',
]);

$result = $client->getApi([
    'ApiId' => $api->get('ApiId'),
]);

var_dump(get_class($result));

This code returns string(15) "Aws\Api\Service"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions