Skip to content

Commit 6ce79b5

Browse files
Update generated code (#1899)
* update generated code * Apply suggestions from code review --------- Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
1 parent a97e24a commit 6ce79b5

File tree

3 files changed

+11
-43
lines changed

3 files changed

+11
-43
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
## 2.11.0
610

711
### Added

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": "2.11-dev"
31+
"dev-master": "2.12-dev"
3232
}
3333
}
3434
}

src/LambdaClient.php

Lines changed: 6 additions & 42 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\Core\Result;
1211
use AsyncAws\Lambda\Enum\Architecture;
@@ -555,46 +554,6 @@ protected function getEndpointMetadata(?string $region): array
555554
}
556555

557556
switch ($region) {
558-
case 'af-south-1':
559-
case 'ap-east-1':
560-
case 'ap-northeast-1':
561-
case 'ap-northeast-2':
562-
case 'ap-northeast-3':
563-
case 'ap-south-1':
564-
case 'ap-south-2':
565-
case 'ap-southeast-1':
566-
case 'ap-southeast-2':
567-
case 'ap-southeast-3':
568-
case 'ap-southeast-4':
569-
case 'ap-southeast-5':
570-
case 'ap-southeast-7':
571-
case 'ca-central-1':
572-
case 'ca-west-1':
573-
case 'eu-central-1':
574-
case 'eu-central-2':
575-
case 'eu-north-1':
576-
case 'eu-south-1':
577-
case 'eu-south-2':
578-
case 'eu-west-1':
579-
case 'eu-west-2':
580-
case 'eu-west-3':
581-
case 'il-central-1':
582-
case 'me-central-1':
583-
case 'me-south-1':
584-
case 'mx-central-1':
585-
case 'sa-east-1':
586-
case 'us-east-1':
587-
case 'us-east-2':
588-
case 'us-gov-east-1':
589-
case 'us-gov-west-1':
590-
case 'us-west-1':
591-
case 'us-west-2':
592-
return [
593-
'endpoint' => "https://lambda.$region.amazonaws.com",
594-
'signRegion' => $region,
595-
'signService' => 'lambda',
596-
'signVersions' => ['v4'],
597-
];
598557
case 'cn-north-1':
599558
case 'cn-northwest-1':
600559
return [
@@ -677,6 +636,11 @@ protected function getEndpointMetadata(?string $region): array
677636
];
678637
}
679638

680-
throw new UnsupportedRegion(\sprintf('The region "%s" is not supported by "Lambda".', $region));
639+
return [
640+
'endpoint' => "https://lambda.$region.amazonaws.com",
641+
'signRegion' => $region,
642+
'signService' => 'lambda',
643+
'signVersions' => ['v4'],
644+
];
681645
}
682646
}

0 commit comments

Comments
 (0)