Skip to content

Commit 0d47c93

Browse files
authored
Sort exceptions alphabetically (#1875)
1 parent 1effb0e commit 0d47c93

File tree

79 files changed

+1841
-1689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1841
-1689
lines changed

src/CodeGenerator/src/Definition/Operation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ public function getErrors(): array
130130
$errors[$error['shape']] = $shape;
131131
}
132132

133+
ksort($errors);
134+
133135
return array_values($errors);
134136
}
135137

src/Core/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+
### Changed
6+
7+
- Sort exception alphabetically.
8+
59
## 1.25.0
610

711
### Added

src/Core/src/Sts/StsClient.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ class StsClient extends AbstractApi
125125
* '@region'?: string|null,
126126
* }|AssumeRoleRequest $input
127127
*
128+
* @throws ExpiredTokenException
128129
* @throws MalformedPolicyDocumentException
129130
* @throws PackedPolicyTooLargeException
130131
* @throws RegionDisabledException
131-
* @throws ExpiredTokenException
132132
*/
133133
public function assumeRole($input): AssumeRoleResponse
134134
{
135135
$input = AssumeRoleRequest::create($input);
136136
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'AssumeRole', 'region' => $input->getRegion(), 'exceptionMapping' => [
137+
'ExpiredTokenException' => ExpiredTokenException::class,
137138
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
138139
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
139140
'RegionDisabledException' => RegionDisabledException::class,
140-
'ExpiredTokenException' => ExpiredTokenException::class,
141141
]]));
142142

143143
return new AssumeRoleResponse($response);
@@ -273,24 +273,24 @@ public function assumeRole($input): AssumeRoleResponse
273273
* '@region'?: string|null,
274274
* }|AssumeRoleWithWebIdentityRequest $input
275275
*
276-
* @throws MalformedPolicyDocumentException
277-
* @throws PackedPolicyTooLargeException
278-
* @throws IDPRejectedClaimException
276+
* @throws ExpiredTokenException
279277
* @throws IDPCommunicationErrorException
278+
* @throws IDPRejectedClaimException
280279
* @throws InvalidIdentityTokenException
281-
* @throws ExpiredTokenException
280+
* @throws MalformedPolicyDocumentException
281+
* @throws PackedPolicyTooLargeException
282282
* @throws RegionDisabledException
283283
*/
284284
public function assumeRoleWithWebIdentity($input): AssumeRoleWithWebIdentityResponse
285285
{
286286
$input = AssumeRoleWithWebIdentityRequest::create($input);
287287
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'AssumeRoleWithWebIdentity', 'region' => $input->getRegion(), 'exceptionMapping' => [
288-
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
289-
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
290-
'IDPRejectedClaim' => IDPRejectedClaimException::class,
288+
'ExpiredTokenException' => ExpiredTokenException::class,
291289
'IDPCommunicationError' => IDPCommunicationErrorException::class,
290+
'IDPRejectedClaim' => IDPRejectedClaimException::class,
292291
'InvalidIdentityToken' => InvalidIdentityTokenException::class,
293-
'ExpiredTokenException' => ExpiredTokenException::class,
292+
'MalformedPolicyDocument' => MalformedPolicyDocumentException::class,
293+
'PackedPolicyTooLarge' => PackedPolicyTooLargeException::class,
294294
'RegionDisabledException' => RegionDisabledException::class,
295295
]]));
296296

src/Service/AppSync/CHANGELOG.md

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

77
- AWS api-change: Rework regions configuration
88

9+
### Changed
10+
11+
- Sort exception alphabetically.
12+
913
## 3.1.1
1014

1115
### Changed

src/Service/AppSync/src/AppSyncClient.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ class AppSyncClient extends AbstractApi
7878
* '@region'?: string|null,
7979
* }|CreateResolverRequest $input
8080
*
81+
* @throws BadRequestException
8182
* @throws ConcurrentModificationException
83+
* @throws InternalFailureException
8284
* @throws NotFoundException
8385
* @throws UnauthorizedException
84-
* @throws InternalFailureException
85-
* @throws BadRequestException
8686
*/
8787
public function createResolver($input): CreateResolverResponse
8888
{
8989
$input = CreateResolverRequest::create($input);
9090
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateResolver', 'region' => $input->getRegion(), 'exceptionMapping' => [
91+
'BadRequestException' => BadRequestException::class,
9192
'ConcurrentModificationException' => ConcurrentModificationException::class,
93+
'InternalFailureException' => InternalFailureException::class,
9294
'NotFoundException' => NotFoundException::class,
9395
'UnauthorizedException' => UnauthorizedException::class,
94-
'InternalFailureException' => InternalFailureException::class,
95-
'BadRequestException' => BadRequestException::class,
9696
]]));
9797

9898
return new CreateResolverResponse($response);
@@ -111,21 +111,21 @@ public function createResolver($input): CreateResolverResponse
111111
* '@region'?: string|null,
112112
* }|DeleteResolverRequest $input
113113
*
114+
* @throws BadRequestException
114115
* @throws ConcurrentModificationException
116+
* @throws InternalFailureException
115117
* @throws NotFoundException
116118
* @throws UnauthorizedException
117-
* @throws InternalFailureException
118-
* @throws BadRequestException
119119
*/
120120
public function deleteResolver($input): DeleteResolverResponse
121121
{
122122
$input = DeleteResolverRequest::create($input);
123123
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'DeleteResolver', 'region' => $input->getRegion(), 'exceptionMapping' => [
124+
'BadRequestException' => BadRequestException::class,
124125
'ConcurrentModificationException' => ConcurrentModificationException::class,
126+
'InternalFailureException' => InternalFailureException::class,
125127
'NotFoundException' => NotFoundException::class,
126128
'UnauthorizedException' => UnauthorizedException::class,
127-
'InternalFailureException' => InternalFailureException::class,
128-
'BadRequestException' => BadRequestException::class,
129129
]]));
130130

131131
return new DeleteResolverResponse($response);
@@ -143,18 +143,18 @@ public function deleteResolver($input): DeleteResolverResponse
143143
* }|GetSchemaCreationStatusRequest $input
144144
*
145145
* @throws BadRequestException
146+
* @throws InternalFailureException
146147
* @throws NotFoundException
147148
* @throws UnauthorizedException
148-
* @throws InternalFailureException
149149
*/
150150
public function getSchemaCreationStatus($input): GetSchemaCreationStatusResponse
151151
{
152152
$input = GetSchemaCreationStatusRequest::create($input);
153153
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'GetSchemaCreationStatus', 'region' => $input->getRegion(), 'exceptionMapping' => [
154154
'BadRequestException' => BadRequestException::class,
155+
'InternalFailureException' => InternalFailureException::class,
155156
'NotFoundException' => NotFoundException::class,
156157
'UnauthorizedException' => UnauthorizedException::class,
157-
'InternalFailureException' => InternalFailureException::class,
158158
]]));
159159

160160
return new GetSchemaCreationStatusResponse($response);
@@ -178,18 +178,18 @@ public function getSchemaCreationStatus($input): GetSchemaCreationStatusResponse
178178
* }|ListApiKeysRequest $input
179179
*
180180
* @throws BadRequestException
181+
* @throws InternalFailureException
181182
* @throws NotFoundException
182183
* @throws UnauthorizedException
183-
* @throws InternalFailureException
184184
*/
185185
public function listApiKeys($input): ListApiKeysResponse
186186
{
187187
$input = ListApiKeysRequest::create($input);
188188
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'ListApiKeys', 'region' => $input->getRegion(), 'exceptionMapping' => [
189189
'BadRequestException' => BadRequestException::class,
190+
'InternalFailureException' => InternalFailureException::class,
190191
'NotFoundException' => NotFoundException::class,
191192
'UnauthorizedException' => UnauthorizedException::class,
192-
'InternalFailureException' => InternalFailureException::class,
193193
]]));
194194

195195
return new ListApiKeysResponse($response, $this, $input);
@@ -210,18 +210,18 @@ public function listApiKeys($input): ListApiKeysResponse
210210
* }|ListResolversRequest $input
211211
*
212212
* @throws BadRequestException
213+
* @throws InternalFailureException
213214
* @throws NotFoundException
214215
* @throws UnauthorizedException
215-
* @throws InternalFailureException
216216
*/
217217
public function listResolvers($input): ListResolversResponse
218218
{
219219
$input = ListResolversRequest::create($input);
220220
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'ListResolvers', 'region' => $input->getRegion(), 'exceptionMapping' => [
221221
'BadRequestException' => BadRequestException::class,
222+
'InternalFailureException' => InternalFailureException::class,
222223
'NotFoundException' => NotFoundException::class,
223224
'UnauthorizedException' => UnauthorizedException::class,
224-
'InternalFailureException' => InternalFailureException::class,
225225
]]));
226226

227227
return new ListResolversResponse($response, $this, $input);
@@ -243,19 +243,19 @@ public function listResolvers($input): ListResolversResponse
243243
*
244244
* @throws BadRequestException
245245
* @throws ConcurrentModificationException
246+
* @throws InternalFailureException
246247
* @throws NotFoundException
247248
* @throws UnauthorizedException
248-
* @throws InternalFailureException
249249
*/
250250
public function startSchemaCreation($input): StartSchemaCreationResponse
251251
{
252252
$input = StartSchemaCreationRequest::create($input);
253253
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'StartSchemaCreation', 'region' => $input->getRegion(), 'exceptionMapping' => [
254254
'BadRequestException' => BadRequestException::class,
255255
'ConcurrentModificationException' => ConcurrentModificationException::class,
256+
'InternalFailureException' => InternalFailureException::class,
256257
'NotFoundException' => NotFoundException::class,
257258
'UnauthorizedException' => UnauthorizedException::class,
258-
'InternalFailureException' => InternalFailureException::class,
259259
]]));
260260

261261
return new StartSchemaCreationResponse($response);
@@ -275,23 +275,23 @@ public function startSchemaCreation($input): StartSchemaCreationResponse
275275
* '@region'?: string|null,
276276
* }|UpdateApiKeyRequest $input
277277
*
278+
* @throws ApiKeyValidityOutOfBoundsException
278279
* @throws BadRequestException
280+
* @throws InternalFailureException
281+
* @throws LimitExceededException
279282
* @throws NotFoundException
280283
* @throws UnauthorizedException
281-
* @throws LimitExceededException
282-
* @throws InternalFailureException
283-
* @throws ApiKeyValidityOutOfBoundsException
284284
*/
285285
public function updateApiKey($input): UpdateApiKeyResponse
286286
{
287287
$input = UpdateApiKeyRequest::create($input);
288288
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'UpdateApiKey', 'region' => $input->getRegion(), 'exceptionMapping' => [
289+
'ApiKeyValidityOutOfBoundsException' => ApiKeyValidityOutOfBoundsException::class,
289290
'BadRequestException' => BadRequestException::class,
291+
'InternalFailureException' => InternalFailureException::class,
292+
'LimitExceededException' => LimitExceededException::class,
290293
'NotFoundException' => NotFoundException::class,
291294
'UnauthorizedException' => UnauthorizedException::class,
292-
'LimitExceededException' => LimitExceededException::class,
293-
'InternalFailureException' => InternalFailureException::class,
294-
'ApiKeyValidityOutOfBoundsException' => ApiKeyValidityOutOfBoundsException::class,
295295
]]));
296296

297297
return new UpdateApiKeyResponse($response);
@@ -322,19 +322,19 @@ public function updateApiKey($input): UpdateApiKeyResponse
322322
*
323323
* @throws BadRequestException
324324
* @throws ConcurrentModificationException
325+
* @throws InternalFailureException
325326
* @throws NotFoundException
326327
* @throws UnauthorizedException
327-
* @throws InternalFailureException
328328
*/
329329
public function updateDataSource($input): UpdateDataSourceResponse
330330
{
331331
$input = UpdateDataSourceRequest::create($input);
332332
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'UpdateDataSource', 'region' => $input->getRegion(), 'exceptionMapping' => [
333333
'BadRequestException' => BadRequestException::class,
334334
'ConcurrentModificationException' => ConcurrentModificationException::class,
335+
'InternalFailureException' => InternalFailureException::class,
335336
'NotFoundException' => NotFoundException::class,
336337
'UnauthorizedException' => UnauthorizedException::class,
337-
'InternalFailureException' => InternalFailureException::class,
338338
]]));
339339

340340
return new UpdateDataSourceResponse($response);
@@ -364,21 +364,21 @@ public function updateDataSource($input): UpdateDataSourceResponse
364364
* '@region'?: string|null,
365365
* }|UpdateResolverRequest $input
366366
*
367+
* @throws BadRequestException
367368
* @throws ConcurrentModificationException
369+
* @throws InternalFailureException
368370
* @throws NotFoundException
369371
* @throws UnauthorizedException
370-
* @throws InternalFailureException
371-
* @throws BadRequestException
372372
*/
373373
public function updateResolver($input): UpdateResolverResponse
374374
{
375375
$input = UpdateResolverRequest::create($input);
376376
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'UpdateResolver', 'region' => $input->getRegion(), 'exceptionMapping' => [
377+
'BadRequestException' => BadRequestException::class,
377378
'ConcurrentModificationException' => ConcurrentModificationException::class,
379+
'InternalFailureException' => InternalFailureException::class,
378380
'NotFoundException' => NotFoundException::class,
379381
'UnauthorizedException' => UnauthorizedException::class,
380-
'InternalFailureException' => InternalFailureException::class,
381-
'BadRequestException' => BadRequestException::class,
382382
]]));
383383

384384
return new UpdateResolverResponse($response);

src/Service/BedrockRuntime/CHANGELOG.md

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

77
- AWS api-change: New options for how to handle harmful content detected by Amazon Bedrock Guardrails.
88

9+
### Changed
10+
11+
- Sort exception alphabetically.
12+
913
## 1.0.0
1014

1115
First version

src/Service/BedrockRuntime/src/BedrockRuntimeClient.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,30 @@ class BedrockRuntimeClient extends AbstractApi
6161
* }|InvokeModelRequest $input
6262
*
6363
* @throws AccessDeniedException
64-
* @throws ResourceNotFoundException
65-
* @throws ThrottlingException
66-
* @throws ModelTimeoutException
6764
* @throws InternalServerException
68-
* @throws ServiceUnavailableException
69-
* @throws ValidationException
65+
* @throws ModelErrorException
7066
* @throws ModelNotReadyException
67+
* @throws ModelTimeoutException
68+
* @throws ResourceNotFoundException
7169
* @throws ServiceQuotaExceededException
72-
* @throws ModelErrorException
70+
* @throws ServiceUnavailableException
71+
* @throws ThrottlingException
72+
* @throws ValidationException
7373
*/
7474
public function invokeModel($input): InvokeModelResponse
7575
{
7676
$input = InvokeModelRequest::create($input);
7777
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'InvokeModel', 'region' => $input->getRegion(), 'exceptionMapping' => [
7878
'AccessDeniedException' => AccessDeniedException::class,
79-
'ResourceNotFoundException' => ResourceNotFoundException::class,
80-
'ThrottlingException' => ThrottlingException::class,
81-
'ModelTimeoutException' => ModelTimeoutException::class,
8279
'InternalServerException' => InternalServerException::class,
83-
'ServiceUnavailableException' => ServiceUnavailableException::class,
84-
'ValidationException' => ValidationException::class,
80+
'ModelErrorException' => ModelErrorException::class,
8581
'ModelNotReadyException' => ModelNotReadyException::class,
82+
'ModelTimeoutException' => ModelTimeoutException::class,
83+
'ResourceNotFoundException' => ResourceNotFoundException::class,
8684
'ServiceQuotaExceededException' => ServiceQuotaExceededException::class,
87-
'ModelErrorException' => ModelErrorException::class,
85+
'ServiceUnavailableException' => ServiceUnavailableException::class,
86+
'ThrottlingException' => ThrottlingException::class,
87+
'ValidationException' => ValidationException::class,
8888
]]));
8989

9090
return new InvokeModelResponse($response);

src/Service/CloudFront/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+
### Changed
6+
7+
- Sort exception alphabetically.
8+
59
## 1.0.3
610

711
### Changed

src/Service/CloudFront/src/CloudFrontClient.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ class CloudFrontClient extends AbstractApi
3232
* }|CreateInvalidationRequest $input
3333
*
3434
* @throws AccessDeniedException
35-
* @throws MissingBodyException
35+
* @throws BatchTooLargeException
36+
* @throws InconsistentQuantitiesException
3637
* @throws InvalidArgumentException
38+
* @throws MissingBodyException
3739
* @throws NoSuchDistributionException
38-
* @throws BatchTooLargeException
3940
* @throws TooManyInvalidationsInProgressException
40-
* @throws InconsistentQuantitiesException
4141
*/
4242
public function createInvalidation($input): CreateInvalidationResult
4343
{
4444
$input = CreateInvalidationRequest::create($input);
4545
$response = $this->getResponse($input->request(), new RequestContext(['operation' => 'CreateInvalidation', 'region' => $input->getRegion(), 'exceptionMapping' => [
4646
'AccessDenied' => AccessDeniedException::class,
47-
'MissingBody' => MissingBodyException::class,
47+
'BatchTooLarge' => BatchTooLargeException::class,
48+
'InconsistentQuantities' => InconsistentQuantitiesException::class,
4849
'InvalidArgument' => InvalidArgumentException::class,
50+
'MissingBody' => MissingBodyException::class,
4951
'NoSuchDistribution' => NoSuchDistributionException::class,
50-
'BatchTooLarge' => BatchTooLargeException::class,
5152
'TooManyInvalidationsInProgress' => TooManyInvalidationsInProgressException::class,
52-
'InconsistentQuantities' => InconsistentQuantitiesException::class,
5353
]]));
5454

5555
return new CreateInvalidationResult($response);

0 commit comments

Comments
 (0)