Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.regions.servicemetadata;
import java.net.URI;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.regions.ServiceMetadata;
import software.amazon.awssdk.regions.ServicePartitionMetadata;
import software.amazon.awssdk.regions.internal.DefaultServicePartitionMetadata;
import software.amazon.awssdk.utils.ImmutableMap;
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
public final class AcmPcaServiceMetadata implements ServiceMetadata {
private static final String ENDPOINT_PREFIX = "acm-pca";
private static final Map PARTITION_OVERRIDDEN_ENDPOINTS = ImmutableMap. builder().build();
private static final Map REGION_OVERRIDDEN_ENDPOINTS = ImmutableMap. builder()
.put("fips-ca-central-1", "acm-pca-fips.ca-central-1.amazonaws.com")
.put("fips-us-east-1", "acm-pca-fips.us-east-1.amazonaws.com")
.put("fips-us-east-2", "acm-pca-fips.us-east-2.amazonaws.com")
.put("fips-us-west-1", "acm-pca-fips.us-west-1.amazonaws.com")
.put("fips-us-west-2", "acm-pca-fips.us-west-2.amazonaws.com")
.put("fips-us-gov-east-1", "acm-pca.us-gov-east-1.amazonaws.com")
.put("fips-us-gov-west-1", "acm-pca.us-gov-west-1.amazonaws.com").build();
private static final List REGIONS = Collections.unmodifiableList(Arrays.asList(Region.of("af-south-1"),
Region.of("ap-east-1"), Region.of("ap-northeast-1"), Region.of("ap-northeast-2"), Region.of("ap-south-1"),
Region.of("ap-southeast-1"), Region.of("ap-southeast-2"), Region.of("ca-central-1"), Region.of("eu-central-1"),
Region.of("eu-north-1"), Region.of("eu-south-1"), Region.of("eu-west-1"), Region.of("eu-west-2"),
Region.of("eu-west-3"), Region.of("fips-ca-central-1"), Region.of("fips-us-east-1"), Region.of("fips-us-east-2"),
Region.of("fips-us-west-1"), Region.of("fips-us-west-2"), Region.of("me-south-1"), Region.of("sa-east-1"),
Region.of("us-east-1"), Region.of("us-east-2"), Region.of("us-west-1"), Region.of("us-west-2"),
Region.of("fips-us-gov-east-1"), Region.of("fips-us-gov-west-1"), Region.of("us-gov-east-1"),
Region.of("us-gov-west-1")));
private static final Map SIGNING_REGION_OVERRIDES = ImmutableMap. builder()
.put("fips-ca-central-1", "ca-central-1").put("fips-us-east-1", "us-east-1").put("fips-us-east-2", "us-east-2")
.put("fips-us-west-1", "us-west-1").put("fips-us-west-2", "us-west-2").put("fips-us-gov-east-1", "us-gov-east-1")
.put("fips-us-gov-west-1", "us-gov-west-1").build();
private static final List PARTITIONS = Collections.unmodifiableList(Arrays.asList(
new DefaultServicePartitionMetadata("aws", null), new DefaultServicePartitionMetadata("aws-us-gov", null)));
@Override
public List regions() {
return REGIONS;
}
@Override
public URI endpointFor(Region region) {
return URI.create(REGION_OVERRIDDEN_ENDPOINTS.containsKey(region.id()) ? REGION_OVERRIDDEN_ENDPOINTS.get(region.id())
: computeEndpoint(ENDPOINT_PREFIX, PARTITION_OVERRIDDEN_ENDPOINTS, region));
}
@Override
public Region signingRegion(Region region) {
return Region.of(SIGNING_REGION_OVERRIDES.getOrDefault(region.id(), region.id()));
}
@Override
public List servicePartitions() {
return PARTITIONS;
}
}