Please fill out the sections below to help us address your issue.
3.130.0
php -v)?7.3.9
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"
Thanks for bringing this to our attention @carlalexander and I do apologize for the delay in response on this. I'm able to reproduce this behavior on my end with both ApiGatewayClient and ApiGatewayV2Client, looking at the output it seems like this method is dumping the contents of src/data/manifest.json as well as the service's API model.
This function looks to work as expected on other AWS SDKs, since this behavior appears to be exclusive to the AWS SDK for PHP I'm marking this issue as a bug. Once we have additional information on this we'll update the issue accordingly.
No worries @diehlaws. It's the holidays. I figure things are slowed down! 馃槂
@howardlopez has a PR up for this in https://github.com/aws/aws-sdk-php/pull/1944
@carlalexander #1944 has been merged and will go out in the next release. The actual service API operation GetApi is now aliased to GetApiResource, as GetApi is used by our core AwsClient.