Skip to content

Commit 4c5d5c0

Browse files
Update generated code (#1820)
* update generated code * Update src/Service/CognitoIdentityProvider/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent cb76303 commit 4c5d5c0

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
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: use explicit defined regions
8+
59
### Changed
610

711
- AWS enhancement: Documentation updates.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"extra": {
3030
"branch-alias": {
31-
"dev-master": "1.10-dev"
31+
"dev-master": "1.11-dev"
3232
}
3333
}
3434
}

src/CognitoIdentityProviderClient.php

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
use AsyncAws\Core\AwsError\AwsErrorFactoryInterface;
108108
use AsyncAws\Core\AwsError\JsonRpcAwsErrorFactory;
109109
use AsyncAws\Core\Configuration;
110+
use AsyncAws\Core\Exception\UnsupportedRegion;
110111
use AsyncAws\Core\RequestContext;
111112
use AsyncAws\Core\Result;
112113

@@ -2064,6 +2065,42 @@ protected function getEndpointMetadata(?string $region): array
20642065
}
20652066

20662067
switch ($region) {
2068+
case 'af-south-1':
2069+
case 'ap-east-1':
2070+
case 'ap-northeast-1':
2071+
case 'ap-northeast-2':
2072+
case 'ap-northeast-3':
2073+
case 'ap-south-1':
2074+
case 'ap-south-2':
2075+
case 'ap-southeast-1':
2076+
case 'ap-southeast-2':
2077+
case 'ap-southeast-3':
2078+
case 'ap-southeast-4':
2079+
case 'ca-central-1':
2080+
case 'ca-west-1':
2081+
case 'eu-central-1':
2082+
case 'eu-central-2':
2083+
case 'eu-north-1':
2084+
case 'eu-south-1':
2085+
case 'eu-south-2':
2086+
case 'eu-west-1':
2087+
case 'eu-west-2':
2088+
case 'eu-west-3':
2089+
case 'il-central-1':
2090+
case 'me-central-1':
2091+
case 'me-south-1':
2092+
case 'sa-east-1':
2093+
case 'us-east-1':
2094+
case 'us-east-2':
2095+
case 'us-gov-west-1':
2096+
case 'us-west-1':
2097+
case 'us-west-2':
2098+
return [
2099+
'endpoint' => "https://cognito-idp.$region.amazonaws.com",
2100+
'signRegion' => $region,
2101+
'signService' => 'cognito-idp',
2102+
'signVersions' => ['v4'],
2103+
];
20672104
case 'fips-us-east-1':
20682105
return [
20692106
'endpoint' => 'https://cognito-idp-fips.us-east-1.amazonaws.com',
@@ -2101,11 +2138,6 @@ protected function getEndpointMetadata(?string $region): array
21012138
];
21022139
}
21032140

2104-
return [
2105-
'endpoint' => "https://cognito-idp.$region.amazonaws.com",
2106-
'signRegion' => $region,
2107-
'signService' => 'cognito-idp',
2108-
'signVersions' => ['v4'],
2109-
];
2141+
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "CognitoIdentityProvider".', $region));
21102142
}
21112143
}

0 commit comments

Comments
 (0)