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.profiles; 17 18 import software.amazon.awssdk.annotations.SdkPublicApi; 19 20 /** 21 * The properties used by the Java SDK from the credentials and config files. 22 * 23 * @see ProfileFile 24 */ 25 @SdkPublicApi 26 public final class ProfileProperty { 27 /** 28 * Property name for specifying the Amazon AWS Access Key 29 */ 30 public static final String AWS_ACCESS_KEY_ID = "aws_access_key_id"; 31 32 /** 33 * Property name for specifying the Amazon AWS Secret Access Key 34 */ 35 public static final String AWS_SECRET_ACCESS_KEY = "aws_secret_access_key"; 36 37 /** 38 * Property name for specifying the Amazon AWS Session Token 39 */ 40 public static final String AWS_SESSION_TOKEN = "aws_session_token"; 41 42 /** 43 * Property name for specifying the IAM role to assume 44 */ 45 public static final String ROLE_ARN = "role_arn"; 46 47 /** 48 * Property name for specifying the IAM role session name 49 */ 50 public static final String ROLE_SESSION_NAME = "role_session_name"; 51 52 /** 53 * Property name for specifying how long in seconds to assume the role 54 */ 55 public static final String DURATION_SECONDS = "duration_seconds"; 56 57 /** 58 * Property name for specifying the IAM role external id 59 */ 60 public static final String EXTERNAL_ID = "external_id"; 61 62 /** 63 * Property name for specifying the profile credentials to use when assuming a role 64 */ 65 public static final String SOURCE_PROFILE = "source_profile"; 66 67 /** 68 * Property name for specifying the credential source to use when assuming a role 69 */ 70 public static final String CREDENTIAL_SOURCE = "credential_source"; 71 72 /** 73 * AWS Region to use when creating clients. 74 */ 75 public static final String REGION = "region"; 76 77 /** 78 * Property name for specifying the identification number of the MFA device 79 */ 80 public static final String MFA_SERIAL = "mfa_serial"; 81 82 /** 83 * Property name for specifying whether or not endpoint discovery is enabled. 84 */ 85 public static final String ENDPOINT_DISCOVERY_ENABLED = "aws_endpoint_discovery_enabled"; 86 87 /** 88 * An external process that should be invoked to load credentials. 89 */ 90 public static final String CREDENTIAL_PROCESS = "credential_process"; 91 92 public static final String WEB_IDENTITY_TOKEN_FILE = "web_identity_token_file"; 93 94 /** 95 * The S3 regional endpoint setting for the {@code us-east-1} region. Setting the value to {@code regional} causes 96 * the SDK to use the {@code s3.us-east-1.amazonaws.com} endpoint when using the {@code US_EAST_1} region instead of 97 * the global {@code s3.amazonaws.com}. Using the regional endpoint is disabled by default. 98 */ 99 public static final String S3_US_EAST_1_REGIONAL_ENDPOINT = "s3_us_east_1_regional_endpoint"; 100 101 public static final String DISABLE_S3_EXPRESS_AUTH = "s3_disable_express_session_auth"; 102 103 /** 104 * The "retry mode" to be used for clients created using the currently-configured profile. Values supported by all SDKs are 105 * "legacy" and "standard". See the {@code RetryMode} class JavaDoc for more information. 106 */ 107 public static final String RETRY_MODE = "retry_mode"; 108 109 /** 110 * The "defaults mode" to be used for clients created using the currently-configured profile. Defaults mode determins how SDK 111 * default configuration should be resolved. See the {@code DefaultsMode} class JavaDoc for more 112 * information. 113 */ 114 public static final String DEFAULTS_MODE = "defaults_mode"; 115 116 /** 117 * Aws region where the SSO directory for the given 'sso_start_url' is hosted. This is independent of the general 'region'. 118 */ 119 public static final String SSO_REGION = "sso_region"; 120 121 /** 122 * The corresponding IAM role in the AWS account that temporary AWS credentials will be resolved for. 123 */ 124 public static final String SSO_ROLE_NAME = "sso_role_name"; 125 126 /** 127 * AWS account ID that temporary AWS credentials will be resolved for. 128 */ 129 public static final String SSO_ACCOUNT_ID = "sso_account_id"; 130 131 /** 132 * Start url provided by the SSO service via the console. It's the main URL used for login to the SSO directory. 133 * This is also referred to as the "User Portal URL" and can also be used to login to the SSO web interface for AWS 134 * console access. 135 */ 136 public static final String SSO_START_URL = "sso_start_url"; 137 138 public static final String USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; 139 140 public static final String USE_FIPS_ENDPOINT = "use_fips_endpoint"; 141 142 public static final String EC2_METADATA_SERVICE_ENDPOINT_MODE = "ec2_metadata_service_endpoint_mode"; 143 144 public static final String EC2_METADATA_SERVICE_ENDPOINT = "ec2_metadata_service_endpoint"; 145 146 public static final String EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; 147 148 /** 149 * Whether request compression is disabled for operations marked with the RequestCompression trait. The default value is 150 * false, i.e., request compression is enabled. 151 */ 152 public static final String DISABLE_REQUEST_COMPRESSION = "disable_request_compression"; 153 154 /** 155 * The minimum compression size in bytes, inclusive, for a request to be compressed. The default value is 10_240. 156 * The value must be non-negative and no greater than 10_485_760. 157 */ 158 public static final String REQUEST_MIN_COMPRESSION_SIZE_BYTES = "request_min_compression_size_bytes"; 159 ProfileProperty()160 private ProfileProperty() { 161 } 162 } 163