1 /*
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 package software.amazon.awssdk.awscore.client.config;
17
18 import software.amazon.awssdk.annotations.SdkProtectedApi;
19 import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
20 import software.amazon.awssdk.awscore.client.builder.AwsClientBuilder;
21 import software.amazon.awssdk.core.client.config.ClientOption;
22 import software.amazon.awssdk.regions.Region;
23
24 @SdkProtectedApi
25 public final class AwsClientOption<T> extends ClientOption<T> {
26 /**
27 * @see AwsClientBuilder#credentialsProvider(AwsCredentialsProvider)
28 */
29 public static final AwsClientOption<AwsCredentialsProvider> CREDENTIALS_PROVIDER =
30 new AwsClientOption<>(AwsCredentialsProvider.class);
31
32 /**
33 * AWS Region the client was configured with. Note that this is not always the signing region in the case of global
34 * services like IAM.
35 */
36 public static final AwsClientOption<Region> AWS_REGION = new AwsClientOption<>(Region.class);
37
38 /**
39 * AWS Region to be used for signing the request. This is not always same as {@link #AWS_REGION} in case of global services.
40 */
41 public static final AwsClientOption<Region> SIGNING_REGION = new AwsClientOption<>(Region.class);
42
43 /**
44 * Scope name to use during signing of a request.
45 */
46 public static final AwsClientOption<String> SERVICE_SIGNING_NAME = new AwsClientOption<>(String.class);
47
48 /**
49 * The first part of the URL in the DNS name for the service. Eg. in the endpoint "dynamodb.amazonaws.com", this is the
50 * "dynamodb".
51 *
52 * For standard services, this should match the "endpointPrefix" field in the AWS model.
53 */
54 public static final AwsClientOption<String> ENDPOINT_PREFIX = new AwsClientOption<>(String.class);
55
56 private AwsClientOption(Class<T> valueClass) {
57 super(valueClass);
58 }
59 }
60