Interface AwsOptions

  • All Superinterfaces:
    org.apache.beam.sdk.transforms.display.HasDisplayData, org.apache.beam.sdk.options.PipelineOptions
    All Known Subinterfaces:
    S3Options

    @Experimental(SOURCE_SINK)
    public interface AwsOptions
    extends org.apache.beam.sdk.options.PipelineOptions
    Options used to configure Amazon Web Services specific options such as credentials and region.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  AwsOptions.AwsRegionFactory
      Attempt to load default region.
      static class  AwsOptions.AwsUserCredentialsFactory
      Return DefaultCredentialsProvider as default provider.
      • Nested classes/interfaces inherited from interface org.apache.beam.sdk.options.PipelineOptions

        org.apache.beam.sdk.options.PipelineOptions.AtomicLongFactory, org.apache.beam.sdk.options.PipelineOptions.CheckEnabled, org.apache.beam.sdk.options.PipelineOptions.DirectRunner, org.apache.beam.sdk.options.PipelineOptions.JobNameFactory, org.apache.beam.sdk.options.PipelineOptions.UserAgentFactory
    • Method Detail

      • getAwsRegion

        @InstanceFactory(AwsRegionFactory.class)
        software.amazon.awssdk.regions.Region getAwsRegion()
        Region used to configure AWS service clients.
      • setAwsRegion

        void setAwsRegion​(software.amazon.awssdk.regions.Region region)
      • getEndpoint

        java.net.URI getEndpoint()
        Endpoint used to configure AWS service clients.
      • setEndpoint

        void setEndpoint​(java.net.URI uri)
      • getAwsCredentialsProvider

        @InstanceFactory(AwsUserCredentialsFactory.class)
        software.amazon.awssdk.auth.credentials.AwsCredentialsProvider getAwsCredentialsProvider()
        AwsCredentialsProvider used to configure AWS service clients.

        The class name of the provider must be set in the @type field. Note: Not all available providers are supported and some configuration options might be ignored.

        Most providers must use the system environment following AWS conventions. Programmatic configuration for these providers is NOT supported:

      • DefaultCredentialsProvider
      • EnvironmentVariableCredentialsProvider
      • SystemPropertyCredentialsProvider
      • ContainerCredentialsProvider

        Example:

        --awsCredentialsProvider={"@type": "EnvironmentVariableCredentialsProvider"}
             

        Some other providers support additional configuration:

      • StaticCredentialsProvider

        Examples:

        --awsCredentialsProvider={
           "@type": "StaticCredentialsProvider",
           "awsAccessKeyId": "key_id_value",
           "awsSecretKey": "secret_value"
         }
        
         --awsCredentialsProvider={
           "@type": "StaticCredentialsProvider",
           "awsAccessKeyId": "key_id_value",
           "awsSecretKey": "secret_value",
           "sessionToken": "token_value"
         }
      • ProfileCredentialsProvider

        profileName is optional, if not set the environment default is used. Be careful if using this provider programmatically, it can behave unexpectedly.

        Examples:

        --awsCredentialsProvider={
           "@type": "ProfileCredentialsProvider"
         }
        
         --awsCredentialsProvider={
           "@type": "ProfileCredentialsProvider",
           "profileName": "my_profile"
         }
      • StsAssumeRoleCredentialsProvider
        --awsCredentialsProvider={
           "@type": "StsAssumeRoleCredentialsProvider",
           "roleArn": "role_arn_Value",
           "roleSessionName": "session_name_value",
           "policy": "policy_value",
           "durationSeconds": 3600
         }
See Also:
DefaultCredentialsProvider