From 951cb962f71e1d3eae9c00227fab6522bce7fbf0 Mon Sep 17 00:00:00 2001 From: AsyncAws <61784373+async-aws-bot@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:51:43 -0800 Subject: [PATCH] Update generated code (#1821) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update generated code * Update src/Service/MediaConvert/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé --- CHANGELOG.md | 1 + src/MediaConvertClient.php | 35 +++++++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 298dbcf..9353d43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/MediaConvertClient.php b/src/MediaConvertClient.php index 4b0bd44..ea2936a 100644 --- a/src/MediaConvertClient.php +++ b/src/MediaConvertClient.php @@ -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; @@ -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', @@ -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', @@ -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)); } }