Interface SdkPresigner.Builder
- All Known Subinterfaces:
PollyPresigner.Builder
,S3Presigner.Builder
- All Known Implementing Classes:
DefaultPollyPresigner.BuilderImpl
,DefaultS3Presigner.Builder
,DefaultSdkPresigner.Builder
- Enclosing interface:
SdkPresigner
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the presigner using the configuration on this builder.default SdkPresigner.Builder
credentialsProvider
(AwsCredentialsProvider credentialsProvider) Configure the credentials that should be used for request signing.default SdkPresigner.Builder
credentialsProvider
(IdentityProvider<? extends AwsCredentialsIdentity> credentialsProvider) Configure the credentials that should be used to authenticate with AWS.dualstackEnabled
(Boolean dualstackEnabled) Configure whether the SDK should use the AWS dualstack endpoint.endpointOverride
(URI endpointOverride) Configure an endpoint that should be used in the pre-signed requests.fipsEnabled
(Boolean fipsEnabled) Configure whether the SDK should use the AWS fips endpoint.Configure the region for which the requests should be signed.
-
Method Details
-
region
Configure the region for which the requests should be signed.If this is not specified, the SDK will attempt to identify the endpoint automatically using the following logic:
- Check the 'aws.region' system property for the region.
- Check the 'AWS_REGION' environment variable for the region.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the region.
- If running in EC2, check the EC2 metadata service for the region.
If the region is not found in any of the locations above, an exception will be thrown at
build()
time. -
credentialsProvider
Configure the credentials that should be used for request signing.The default provider will attempt to identify the credentials automatically using the following checks:
- Java System Properties -
aws.accessKeyId
andaws.secretAccessKey
- Environment Variables -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable is set and security manager has permission to access the variable.
- Instance profile credentials delivered through the Amazon EC2 metadata service
If the credentials are not found in any of the locations above, an exception will be thrown at
build()
time.The last of
credentialsProvider(AwsCredentialsProvider)
orcredentialsProvider(IdentityProvider)
wins. - Java System Properties -
-
credentialsProvider
default SdkPresigner.Builder credentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> credentialsProvider) Configure the credentials that should be used to authenticate with AWS.The default provider will attempt to identify the credentials automatically using the following checks:
- Java System Properties -
aws.accessKeyId
andaws.secretAccessKey
- Environment Variables -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Credentials delivered through the Amazon EC2 container service if AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable is set and security manager has permission to access the variable.
- Instance profile credentials delivered through the Amazon EC2 metadata service
If the credentials are not found in any of the locations above, an exception will be thrown at
build()
time.The last of
credentialsProvider(AwsCredentialsProvider)
orcredentialsProvider(IdentityProvider)
wins. - Java System Properties -
-
dualstackEnabled
Configure whether the SDK should use the AWS dualstack endpoint.If this is not specified, the SDK will attempt to determine whether the dualstack endpoint should be used automatically using the following logic:
- Check the 'aws.useDualstackEndpoint' system property for 'true' or 'false'.
- Check the 'AWS_USE_DUALSTACK_ENDPOINT' environment variable for 'true' or 'false'.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the 'use_dualstack_endpoint' property set to 'true' or 'false'.
If the setting is not found in any of the locations above, 'false' will be used.
-
fipsEnabled
Configure whether the SDK should use the AWS fips endpoint.If this is not specified, the SDK will attempt to determine whether the fips endpoint should be used automatically using the following logic:
- Check the 'aws.useFipsEndpoint' system property for 'true' or 'false'.
- Check the 'AWS_USE_FIPS_ENDPOINT' environment variable for 'true' or 'false'.
- Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the 'use_fips_endpoint' property set to 'true' or 'false'.
If the setting is not found in any of the locations above, 'false' will be used.
-
endpointOverride
Configure an endpoint that should be used in the pre-signed requests. This will override the endpoint that is usually determined by theregion(Region)
anddualstackEnabled(Boolean)
settings. -
build
SdkPresigner build()Build the presigner using the configuration on this builder.
-