Skip to content

Commit

Permalink
Update generated code (#1821)
Browse files Browse the repository at this point in the history
* update generated code

* Update src/Service/MediaConvert/CHANGELOG.md

---------

Co-authored-by: Jérémy Derussé <[email protected]>
  • Loading branch information
async-aws-bot and jderusse authored Dec 24, 2024
1 parent c0f215c commit 951cb96
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- AWS api-change: This release adds support for inserting timecode tracks into MP4 container outputs.
- AWS api-change: use regionalized endpoints

## 1.4.1

Expand Down
35 changes: 29 additions & 6 deletions src/MediaConvertClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use AsyncAws\Core\AwsError\AwsErrorFactoryInterface;
use AsyncAws\Core\AwsError\JsonRestAwsErrorFactory;
use AsyncAws\Core\Configuration;
use AsyncAws\Core\Exception\UnsupportedRegion;
use AsyncAws\Core\RequestContext;
use AsyncAws\MediaConvert\Enum\BillingTagsSource;
use AsyncAws\MediaConvert\Enum\DescribeEndpointsMode;
Expand Down Expand Up @@ -239,6 +240,32 @@ protected function getEndpointMetadata(?string $region): array
}

switch ($region) {
case 'af-south-1':
case 'ap-northeast-1':
case 'ap-northeast-2':
case 'ap-northeast-3':
case 'ap-south-1':
case 'ap-southeast-1':
case 'ap-southeast-2':
case 'ap-southeast-4':
case 'ca-central-1':
case 'eu-central-1':
case 'eu-north-1':
case 'eu-west-1':
case 'eu-west-2':
case 'eu-west-3':
case 'me-central-1':
case 'sa-east-1':
case 'us-east-1':
case 'us-east-2':
case 'us-west-1':
case 'us-west-2':
return [
'endpoint' => "https://mediaconvert.$region.amazonaws.com",
'signRegion' => $region,
'signService' => 'mediaconvert',
'signVersions' => ['v4'],
];
case 'cn-northwest-1':
return [
'endpoint' => 'https://mediaconvert.cn-northwest-1.amazonaws.com.cn',
Expand Down Expand Up @@ -282,6 +309,7 @@ protected function getEndpointMetadata(?string $region): array
'signVersions' => ['v4'],
];
case 'fips-us-gov-west-1':
case 'us-gov-west-1':
return [
'endpoint' => 'https://mediaconvert.us-gov-west-1.amazonaws.com',
'signRegion' => 'us-gov-west-1',
Expand All @@ -290,11 +318,6 @@ protected function getEndpointMetadata(?string $region): array
];
}

return [
'endpoint' => "https://mediaconvert.$region.amazonaws.com",
'signRegion' => $region,
'signService' => 'mediaconvert',
'signVersions' => ['v4'],
];
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "MediaConvert".', $region));
}
}

0 comments on commit 951cb96

Please sign in to comment.