Skip to content

Commit 818ccda

Browse files
Update generated code (#1675)
* update generated code * Update src/Service/CloudWatchLogs/CHANGELOG.md --------- Co-authored-by: Jérémy Derussé <[email protected]>
1 parent a691b3b commit 818ccda

File tree

4 files changed

+59
-8
lines changed

4 files changed

+59
-8
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.300.2"
3+
"${LATEST}": "3.300.8"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/CloudWatchLogs/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: refine the list of available regions
8+
59
## 2.1.1
610

711
### Changed

src/Service/CloudWatchLogs/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"extra": {
3131
"branch-alias": {
32-
"dev-master": "2.1-dev"
32+
"dev-master": "2.2-dev"
3333
}
3434
}
3535
}

src/Service/CloudWatchLogs/src/CloudWatchLogsClient.php

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use AsyncAws\Core\AwsError\AwsErrorFactoryInterface;
2727
use AsyncAws\Core\AwsError\JsonRpcAwsErrorFactory;
2828
use AsyncAws\Core\Configuration;
29+
use AsyncAws\Core\Exception\UnsupportedRegion;
2930
use AsyncAws\Core\RequestContext;
3031
use AsyncAws\Core\Result;
3132

@@ -304,6 +305,41 @@ protected function getEndpointMetadata(?string $region): array
304305
}
305306

306307
switch ($region) {
308+
case 'af-south-1':
309+
case 'ap-east-1':
310+
case 'ap-northeast-1':
311+
case 'ap-northeast-2':
312+
case 'ap-northeast-3':
313+
case 'ap-south-1':
314+
case 'ap-south-2':
315+
case 'ap-southeast-1':
316+
case 'ap-southeast-2':
317+
case 'ap-southeast-3':
318+
case 'ap-southeast-4':
319+
case 'ca-central-1':
320+
case 'ca-west-1':
321+
case 'eu-central-1':
322+
case 'eu-central-2':
323+
case 'eu-north-1':
324+
case 'eu-south-1':
325+
case 'eu-south-2':
326+
case 'eu-west-1':
327+
case 'eu-west-2':
328+
case 'eu-west-3':
329+
case 'il-central-1':
330+
case 'me-central-1':
331+
case 'me-south-1':
332+
case 'sa-east-1':
333+
case 'us-east-1':
334+
case 'us-east-2':
335+
case 'us-west-1':
336+
case 'us-west-2':
337+
return [
338+
'endpoint' => "https://logs.$region.amazonaws.com",
339+
'signRegion' => $region,
340+
'signService' => 'logs',
341+
'signVersions' => ['v4'],
342+
];
307343
case 'cn-north-1':
308344
case 'cn-northwest-1':
309345
return [
@@ -312,6 +348,20 @@ protected function getEndpointMetadata(?string $region): array
312348
'signService' => 'logs',
313349
'signVersions' => ['v4'],
314350
];
351+
case 'fips-ca-central-1':
352+
return [
353+
'endpoint' => 'https://logs-fips.ca-central-1.amazonaws.com',
354+
'signRegion' => 'ca-central-1',
355+
'signService' => 'logs',
356+
'signVersions' => ['v4'],
357+
];
358+
case 'fips-ca-west-1':
359+
return [
360+
'endpoint' => 'https://logs-fips.ca-west-1.amazonaws.com',
361+
'signRegion' => 'ca-west-1',
362+
'signService' => 'logs',
363+
'signVersions' => ['v4'],
364+
];
315365
case 'fips-us-east-1':
316366
return [
317367
'endpoint' => 'https://logs-fips.us-east-1.amazonaws.com',
@@ -341,13 +391,15 @@ protected function getEndpointMetadata(?string $region): array
341391
'signVersions' => ['v4'],
342392
];
343393
case 'fips-us-gov-east-1':
394+
case 'us-gov-east-1':
344395
return [
345396
'endpoint' => 'https://logs.us-gov-east-1.amazonaws.com',
346397
'signRegion' => 'us-gov-east-1',
347398
'signService' => 'logs',
348399
'signVersions' => ['v4'],
349400
];
350401
case 'fips-us-gov-west-1':
402+
case 'us-gov-west-1':
351403
return [
352404
'endpoint' => 'https://logs.us-gov-west-1.amazonaws.com',
353405
'signRegion' => 'us-gov-west-1',
@@ -371,11 +423,6 @@ protected function getEndpointMetadata(?string $region): array
371423
];
372424
}
373425

374-
return [
375-
'endpoint' => "https://logs.$region.amazonaws.com",
376-
'signRegion' => $region,
377-
'signService' => 'logs',
378-
'signVersions' => ['v4'],
379-
];
426+
throw new UnsupportedRegion(sprintf('The region "%s" is not supported by "CloudWatchLogs".', $region));
380427
}
381428
}

0 commit comments

Comments
 (0)