Skip to content

Commit 8f8b353

Browse files
Update generated code (#1954)
* update generated code * Apply suggestion from @jderusse --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent aad9fcc commit 8f8b353

File tree

3 files changed

+11
-41
lines changed

3 files changed

+11
-41
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: rework regions definition
8+
59
## 1.4.1
610

711
### Changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"extra": {
2828
"branch-alias": {
29-
"dev-master": "1.4-dev"
29+
"dev-master": "1.5-dev"
3030
}
3131
}
3232
}

src/SsoClient.php

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use AsyncAws\Core\AwsError\AwsErrorFactoryInterface;
77
use AsyncAws\Core\AwsError\JsonRestAwsErrorFactory;
88
use AsyncAws\Core\Configuration;
9-
use AsyncAws\Core\Exception\UnsupportedRegion;
109
use AsyncAws\Core\RequestContext;
1110
use AsyncAws\Sso\Exception\InvalidRequestException;
1211
use AsyncAws\Sso\Exception\ResourceNotFoundException;
@@ -60,44 +59,6 @@ protected function getEndpointMetadata(?string $region): array
6059
}
6160

6261
switch ($region) {
63-
case 'af-south-1':
64-
case 'ap-east-1':
65-
case 'ap-northeast-1':
66-
case 'ap-northeast-2':
67-
case 'ap-northeast-3':
68-
case 'ap-south-1':
69-
case 'ap-south-2':
70-
case 'ap-southeast-1':
71-
case 'ap-southeast-2':
72-
case 'ap-southeast-3':
73-
case 'ap-southeast-4':
74-
case 'ap-southeast-5':
75-
case 'ca-central-1':
76-
case 'ca-west-1':
77-
case 'eu-central-1':
78-
case 'eu-central-2':
79-
case 'eu-north-1':
80-
case 'eu-south-1':
81-
case 'eu-south-2':
82-
case 'eu-west-1':
83-
case 'eu-west-2':
84-
case 'eu-west-3':
85-
case 'il-central-1':
86-
case 'me-central-1':
87-
case 'me-south-1':
88-
case 'sa-east-1':
89-
case 'us-east-1':
90-
case 'us-east-2':
91-
case 'us-gov-east-1':
92-
case 'us-gov-west-1':
93-
case 'us-west-1':
94-
case 'us-west-2':
95-
return [
96-
'endpoint' => "https://portal.sso.$region.amazonaws.com",
97-
'signRegion' => $region,
98-
'signService' => 'awsssoportal',
99-
'signVersions' => ['v4'],
100-
];
10162
case 'cn-north-1':
10263
case 'cn-northwest-1':
10364
return [
@@ -108,6 +69,11 @@ protected function getEndpointMetadata(?string $region): array
10869
];
10970
}
11071

111-
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "Sso".', $region));
72+
return [
73+
'endpoint' => "https://portal.sso.$region.amazonaws.com",
74+
'signRegion' => $region,
75+
'signService' => 'awsssoportal',
76+
'signVersions' => ['v4'],
77+
];
11278
}
11379
}

0 commit comments

Comments
 (0)