Interface SdkPresigner.Builder

All Known Subinterfaces:
PollyPresigner.Builder, S3Presigner.Builder
All Known Implementing Classes:
DefaultPollyPresigner.BuilderImpl, DefaultS3Presigner.Builder, DefaultSdkPresigner.Builder
Enclosing interface:
SdkPresigner

public static interface SdkPresigner.Builder
The base interface for all SDK presigner builders.
  • Method Details

    • region

      SdkPresigner.Builder region(Region 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:

      1. Check the 'aws.region' system property for the region.
      2. Check the 'AWS_REGION' environment variable for the region.
      3. Check the {user.home}/.aws/credentials and {user.home}/.aws/config files for the region.
      4. 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

      default SdkPresigner.Builder credentialsProvider(AwsCredentialsProvider 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:

      1. Java System Properties - aws.accessKeyId and aws.secretAccessKey
      2. Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
      3. Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
      4. 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.
      5. 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) or credentialsProvider(IdentityProvider) wins.

    • 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:

      1. Java System Properties - aws.accessKeyId and aws.secretAccessKey
      2. Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
      3. Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
      4. 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.
      5. 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) or credentialsProvider(IdentityProvider) wins.

    • dualstackEnabled

      SdkPresigner.Builder dualstackEnabled(Boolean 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:

      1. Check the 'aws.useDualstackEndpoint' system property for 'true' or 'false'.
      2. Check the 'AWS_USE_DUALSTACK_ENDPOINT' environment variable for 'true' or 'false'.
      3. 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

      SdkPresigner.Builder fipsEnabled(Boolean 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:

      1. Check the 'aws.useFipsEndpoint' system property for 'true' or 'false'.
      2. Check the 'AWS_USE_FIPS_ENDPOINT' environment variable for 'true' or 'false'.
      3. 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

      SdkPresigner.Builder endpointOverride(URI endpointOverride)
      Configure an endpoint that should be used in the pre-signed requests. This will override the endpoint that is usually determined by the region(Region) and dualstackEnabled(Boolean) settings.
    • build

      SdkPresigner build()
      Build the presigner using the configuration on this builder.