Class DefaultSdkPresigner.Builder<B extends DefaultSdkPresigner.Builder<B>>
- All Implemented Interfaces:
SdkPresigner.Builder
- Direct Known Subclasses:
DefaultS3Presigner.Builder
- Enclosing class:
DefaultSdkPresigner
SdkPresigner.Builder
interface.-
Method Summary
Modifier and TypeMethodDescriptioncredentialsProvider
(AwsCredentialsProvider credentialsProvider) Configure the credentials that should be used for request signing.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.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.awssdk.awscore.presigner.SdkPresigner.Builder
build
-
Method Details
-
region
Description copied from interface:SdkPresigner.Builder
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
SdkPresigner.Builder.build()
time.- Specified by:
region
in interfaceSdkPresigner.Builder
-
credentialsProvider
Description copied from interface:SdkPresigner.Builder
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
SdkPresigner.Builder.build()
time.The last of
SdkPresigner.Builder.credentialsProvider(AwsCredentialsProvider)
orSdkPresigner.Builder.credentialsProvider(IdentityProvider)
wins.- Specified by:
credentialsProvider
in interfaceSdkPresigner.Builder
- Java System Properties -
-
credentialsProvider
public B credentialsProvider(IdentityProvider<? extends AwsCredentialsIdentity> credentialsProvider) Description copied from interface:SdkPresigner.Builder
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
SdkPresigner.Builder.build()
time.The last of
SdkPresigner.Builder.credentialsProvider(AwsCredentialsProvider)
orSdkPresigner.Builder.credentialsProvider(IdentityProvider)
wins.- Specified by:
credentialsProvider
in interfaceSdkPresigner.Builder
- Java System Properties -
-
dualstackEnabled
Description copied from interface:SdkPresigner.Builder
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.
- Specified by:
dualstackEnabled
in interfaceSdkPresigner.Builder
-
fipsEnabled
Description copied from interface:SdkPresigner.Builder
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.
- Specified by:
fipsEnabled
in interfaceSdkPresigner.Builder
-
endpointOverride
Description copied from interface:SdkPresigner.Builder
Configure an endpoint that should be used in the pre-signed requests. This will override the endpoint that is usually determined by theSdkPresigner.Builder.region(Region)
andSdkPresigner.Builder.dualstackEnabled(Boolean)
settings.- Specified by:
endpointOverride
in interfaceSdkPresigner.Builder
-