66use AsyncAws \Core \AwsError \AwsErrorFactoryInterface ;
77use AsyncAws \Core \AwsError \JsonRestAwsErrorFactory ;
88use AsyncAws \Core \Configuration ;
9+ use AsyncAws \Core \Exception \UnsupportedRegion ;
910use AsyncAws \Core \RequestContext ;
1011use AsyncAws \MediaConvert \Enum \BillingTagsSource ;
1112use AsyncAws \MediaConvert \Enum \DescribeEndpointsMode ;
@@ -239,6 +240,32 @@ protected function getEndpointMetadata(?string $region): array
239240 }
240241
241242 switch ($ region ) {
243+ case 'af-south-1 ' :
244+ case 'ap-northeast-1 ' :
245+ case 'ap-northeast-2 ' :
246+ case 'ap-northeast-3 ' :
247+ case 'ap-south-1 ' :
248+ case 'ap-southeast-1 ' :
249+ case 'ap-southeast-2 ' :
250+ case 'ap-southeast-4 ' :
251+ case 'ca-central-1 ' :
252+ case 'eu-central-1 ' :
253+ case 'eu-north-1 ' :
254+ case 'eu-west-1 ' :
255+ case 'eu-west-2 ' :
256+ case 'eu-west-3 ' :
257+ case 'me-central-1 ' :
258+ case 'sa-east-1 ' :
259+ case 'us-east-1 ' :
260+ case 'us-east-2 ' :
261+ case 'us-west-1 ' :
262+ case 'us-west-2 ' :
263+ return [
264+ 'endpoint ' => "https://mediaconvert. $ region.amazonaws.com " ,
265+ 'signRegion ' => $ region ,
266+ 'signService ' => 'mediaconvert ' ,
267+ 'signVersions ' => ['v4 ' ],
268+ ];
242269 case 'cn-northwest-1 ' :
243270 return [
244271 'endpoint ' => 'https://mediaconvert.cn-northwest-1.amazonaws.com.cn ' ,
@@ -282,6 +309,7 @@ protected function getEndpointMetadata(?string $region): array
282309 'signVersions ' => ['v4 ' ],
283310 ];
284311 case 'fips-us-gov-west-1 ' :
312+ case 'us-gov-west-1 ' :
285313 return [
286314 'endpoint ' => 'https://mediaconvert.us-gov-west-1.amazonaws.com ' ,
287315 'signRegion ' => 'us-gov-west-1 ' ,
@@ -290,11 +318,6 @@ protected function getEndpointMetadata(?string $region): array
290318 ];
291319 }
292320
293- return [
294- 'endpoint ' => "https://mediaconvert. $ region.amazonaws.com " ,
295- 'signRegion ' => $ region ,
296- 'signService ' => 'mediaconvert ' ,
297- 'signVersions ' => ['v4 ' ],
298- ];
321+ throw new UnsupportedRegion (\sprintf ('The region "%s" is not supported by "MediaConvert". ' , $ region ));
299322 }
300323}
0 commit comments