Skip to content

Commit 5c0d7cb

Browse files
Update generated code (#1878)
* update generated code * Update src/Service/Athena/CHANGELOG.md * Apply suggestions from code review --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent ca68184 commit 5c0d7cb

File tree

2 files changed

+7
-40
lines changed

2 files changed

+7
-40
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- AWS api-change: Added `eu-isoe-west-1` region
8+
- AWS api-change: rewrite declaration of regions
89

910
## 3.2.0
1011

src/AthenaClient.php

+6-40
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
use AsyncAws\Core\AwsError\AwsErrorFactoryInterface;
6060
use AsyncAws\Core\AwsError\JsonRpcAwsErrorFactory;
6161
use AsyncAws\Core\Configuration;
62-
use AsyncAws\Core\Exception\UnsupportedRegion;
6362
use AsyncAws\Core\RequestContext;
6463

6564
class AthenaClient extends AbstractApi
@@ -703,44 +702,6 @@ protected function getEndpointMetadata(?string $region): array
703702
}
704703

705704
switch ($region) {
706-
case 'af-south-1':
707-
case 'ap-east-1':
708-
case 'ap-northeast-1':
709-
case 'ap-northeast-2':
710-
case 'ap-northeast-3':
711-
case 'ap-south-1':
712-
case 'ap-south-2':
713-
case 'ap-southeast-1':
714-
case 'ap-southeast-2':
715-
case 'ap-southeast-3':
716-
case 'ap-southeast-4':
717-
case 'ap-southeast-5':
718-
case 'ca-central-1':
719-
case 'ca-west-1':
720-
case 'eu-central-1':
721-
case 'eu-central-2':
722-
case 'eu-north-1':
723-
case 'eu-south-1':
724-
case 'eu-south-2':
725-
case 'eu-west-1':
726-
case 'eu-west-2':
727-
case 'eu-west-3':
728-
case 'il-central-1':
729-
case 'me-central-1':
730-
case 'me-south-1':
731-
case 'sa-east-1':
732-
case 'us-east-1':
733-
case 'us-east-2':
734-
case 'us-gov-east-1':
735-
case 'us-gov-west-1':
736-
case 'us-west-1':
737-
case 'us-west-2':
738-
return [
739-
'endpoint' => "https://athena.$region.amazonaws.com",
740-
'signRegion' => $region,
741-
'signService' => 'athena',
742-
'signVersions' => ['v4'],
743-
];
744705
case 'cn-north-1':
745706
case 'cn-northwest-1':
746707
return [
@@ -829,6 +790,11 @@ protected function getEndpointMetadata(?string $region): array
829790
];
830791
}
831792

832-
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "Athena".', $region));
793+
return [
794+
'endpoint' => "https://athena.$region.amazonaws.com",
795+
'signRegion' => $region,
796+
'signService' => 'athena',
797+
'signVersions' => ['v4'],
798+
];
833799
}
834800
}

0 commit comments

Comments
 (0)