Skip to content

Commit d93e11c

Browse files
Update generated code (#1951)
* update generated code * Update src/Service/SsoOidc/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent bbf3b0b commit d93e11c

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 configuration
8+
59
## 1.1.1
610

711
### Changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"extra": {
2929
"branch-alias": {
30-
"dev-master": "1.1-dev"
30+
"dev-master": "1.2-dev"
3131
}
3232
}
3333
}

src/SsoOidcClient.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\SsoOidc\Exception\AccessDeniedException;
1211
use AsyncAws\SsoOidc\Exception\AuthorizationPendingException;
@@ -89,44 +88,6 @@ protected function getEndpointMetadata(?string $region): array
8988
}
9089

9190
switch ($region) {
92-
case 'af-south-1':
93-
case 'ap-east-1':
94-
case 'ap-northeast-1':
95-
case 'ap-northeast-2':
96-
case 'ap-northeast-3':
97-
case 'ap-south-1':
98-
case 'ap-south-2':
99-
case 'ap-southeast-1':
100-
case 'ap-southeast-2':
101-
case 'ap-southeast-3':
102-
case 'ap-southeast-4':
103-
case 'ap-southeast-5':
104-
case 'ca-central-1':
105-
case 'ca-west-1':
106-
case 'eu-central-1':
107-
case 'eu-central-2':
108-
case 'eu-north-1':
109-
case 'eu-south-1':
110-
case 'eu-south-2':
111-
case 'eu-west-1':
112-
case 'eu-west-2':
113-
case 'eu-west-3':
114-
case 'il-central-1':
115-
case 'me-central-1':
116-
case 'me-south-1':
117-
case 'sa-east-1':
118-
case 'us-east-1':
119-
case 'us-east-2':
120-
case 'us-gov-east-1':
121-
case 'us-gov-west-1':
122-
case 'us-west-1':
123-
case 'us-west-2':
124-
return [
125-
'endpoint' => "https://oidc.$region.amazonaws.com",
126-
'signRegion' => $region,
127-
'signService' => 'sso-oauth',
128-
'signVersions' => ['v4'],
129-
];
13091
case 'cn-north-1':
13192
case 'cn-northwest-1':
13293
return [
@@ -137,6 +98,11 @@ protected function getEndpointMetadata(?string $region): array
13798
];
13899
}
139100

140-
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "SsoOidc".', $region));
101+
return [
102+
'endpoint' => "https://oidc.$region.amazonaws.com",
103+
'signRegion' => $region,
104+
'signService' => 'sso-oauth',
105+
'signVersions' => ['v4'],
106+
];
141107
}
142108
}

0 commit comments

Comments
 (0)