Skip to content

Commit e69734e

Browse files
committed
Marked "shield" as a global service.
1 parent 14178cb commit e69734e

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

core/regions/src/main/resources/software/amazon/awssdk/regions/internal/region/endpoints.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4761,20 +4761,21 @@
47614761
"sslCommonName" : "shield.us-east-1.amazonaws.com"
47624762
},
47634763
"endpoints" : {
4764-
"fips-us-east-1" : {
4764+
"aws-global" : {
47654765
"credentialScope" : {
47664766
"region" : "us-east-1"
47674767
},
4768-
"hostname" : "shield-fips.us-east-1.amazonaws.com"
4768+
"hostname" : "shield.us-east-1.amazonaws.com"
47694769
},
4770-
"us-east-1" : {
4770+
"fips-aws-global" : {
47714771
"credentialScope" : {
47724772
"region" : "us-east-1"
47734773
},
4774-
"hostname" : "shield.us-east-1.amazonaws.com"
4774+
"hostname" : "shield-fips.us-east-1.amazonaws.com"
47754775
}
47764776
},
4777-
"isRegionalized" : false
4777+
"isRegionalized" : false,
4778+
"partitionEndpoint" : "aws-global"
47784779
},
47794780
"sms" : {
47804781
"endpoints" : {

core/regions/src/test/java/software/amazon/awssdk/regions/PartitionServiceMetadataTest.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
public class PartitionServiceMetadataTest {
2626

2727
private static final List<String> AWS_PARTITION_GLOBAL_SERVICES = Arrays.asList(
28-
"budgets", "cloudfront", "iam", "route53", "waf");
28+
"budgets", "cloudfront", "iam", "route53", "shield", "waf");
2929

3030
private static final List<String> AWS_PARTITION_REGIONALIZED_SERVICES = Arrays.asList(
3131
"acm", "apigateway", "application-autoscaling", "appstream2", "autoscaling", "batch",
@@ -37,7 +37,7 @@ public class PartitionServiceMetadataTest {
3737
"iot", "kinesis", "kinesisanalytics", "kms", "lambda", "lightsail", "logs", "machinelearning",
3838
"marketplacecommerceanalytics", "metering.marketplace", "mobileanalytics", "monitoring", "opsworks",
3939
"opsworks-cm", "pinpoint", "polly", "rds", "redshift", "rekognition", "route53domains", "s3",
40-
"sdb", "servicecatalog", "shield", "sms", "snowball", "sns", "sqs", "ssm", "states", "storagegateway",
40+
"sdb", "servicecatalog", "sms", "snowball", "sns", "sqs", "ssm", "states", "storagegateway",
4141
"streams.dynamodb", "sts", "support", "swf", "waf-regional", "workspaces", "xray");
4242

4343
private static final List<String> AWS_CN_PARTITION_GLOBAL_SERVICES = Arrays.asList("iam");
@@ -58,32 +58,38 @@ public class PartitionServiceMetadataTest {
5858

5959
@Test
6060
public void endpointFor_ReturnsEndpoint_ForAllRegionalizedServices_When_AwsPartition() {
61-
AWS_PARTITION_REGIONALIZED_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.US_EAST_1));
61+
AWS_PARTITION_REGIONALIZED_SERVICES.forEach(
62+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.US_EAST_1)).isNotNull());
6263
}
6364

6465
@Test
6566
public void endpointFor_ReturnsEndpoint_ForAllGlobalServices_When_AwsGlobalRegion() {
66-
AWS_PARTITION_GLOBAL_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.AWS_GLOBAL));
67+
AWS_PARTITION_GLOBAL_SERVICES.forEach(
68+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.AWS_GLOBAL)).isNotNull());
6769
}
6870

6971
@Test
7072
public void endpointFor_ReturnsEndpoint_ForAllRegionalizedServices_When_AwsCnPartition() {
71-
AWS_CN_PARTITION_REGIONALIZED_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.CN_NORTH_1));
73+
AWS_CN_PARTITION_REGIONALIZED_SERVICES.forEach(
74+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.CN_NORTH_1)).isNotNull());
7275
}
7376

7477
@Test
7578
public void endpointFor_ReturnsEndpoint_ForAllGlobalServices_When_AwsCnGlobalRegion() {
76-
AWS_CN_PARTITION_GLOBAL_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.AWS_CN_GLOBAL));
79+
AWS_CN_PARTITION_GLOBAL_SERVICES.forEach(
80+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.AWS_CN_GLOBAL)).isNotNull());
7781
}
7882

7983
@Test
8084
public void endpointFor_ReturnsEndpoint_ForAllRegionalizedServices_When_AwsUsGovPartition() {
81-
AWS_US_GOV_PARTITION_REGIONALIZED_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.US_GOV_WEST_1));
85+
AWS_US_GOV_PARTITION_REGIONALIZED_SERVICES.forEach(
86+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.US_GOV_WEST_1)).isNotNull());
8287
}
8388

8489
@Test
8590
public void endpointFor_ReturnsEndpoint_ForAllGlobalServices_When_AwsUsGovGlobalRegion() {
86-
AWS_US_GOV_PARTITION_GLOBAL_SERVICES.forEach(s -> ServiceMetadata.of(s).endpointFor(Region.AWS_US_GOV_GLOBAL));
91+
AWS_US_GOV_PARTITION_GLOBAL_SERVICES.forEach(
92+
s -> assertThat(ServiceMetadata.of(s).endpointFor(Region.AWS_US_GOV_GLOBAL)).isNotNull());
8793
}
8894

8995
@Test

0 commit comments

Comments
 (0)