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.PipelineOptionsOptions used to configure Amazon Web Services specific options such as credentials and region.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAwsOptions.AwsRegionFactoryAttempt to load default region.static classAwsOptions.AwsUserCredentialsFactoryReturnDefaultCredentialsProvideras 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description software.amazon.awssdk.auth.credentials.AwsCredentialsProvidergetAwsCredentialsProvider()AwsCredentialsProviderused to configure AWS service clients.software.amazon.awssdk.regions.RegiongetAwsRegion()Region used to configure AWS service clients.java.lang.Class<? extends ClientBuilderFactory>getClientBuilderFactory()java.net.URIgetEndpoint()Endpoint used to configure AWS service clients.HttpClientConfigurationgetHttpClientConfiguration()HttpClientConfigurationused to configure AWS service clients.software.amazon.awssdk.http.apache.ProxyConfigurationgetProxyConfiguration()ProxyConfigurationused to configure AWS service clients.voidsetAwsCredentialsProvider(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider value)voidsetAwsRegion(software.amazon.awssdk.regions.Region region)voidsetClientBuilderFactory(java.lang.Class<? extends ClientBuilderFactory> clazz)voidsetEndpoint(java.net.URI uri)voidsetHttpClientConfiguration(HttpClientConfiguration value)voidsetProxyConfiguration(software.amazon.awssdk.http.apache.ProxyConfiguration value)
-
-
-
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()
AwsCredentialsProviderused to configure AWS service clients.The class name of the provider must be set in the
@typefield. 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:
DefaultCredentialsProviderEnvironmentVariableCredentialsProviderSystemPropertyCredentialsProviderContainerCredentialsProviderExample:
--awsCredentialsProvider={"@type": "EnvironmentVariableCredentialsProvider"}Some other providers support additional configuration:
StaticCredentialsProviderExamples:
--awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "awsAccessKeyId": "key_id_value", "awsSecretKey": "secret_value" } --awsCredentialsProvider={ "@type": "StaticCredentialsProvider", "awsAccessKeyId": "key_id_value", "awsSecretKey": "secret_value", "sessionToken": "token_value" }ProfileCredentialsProviderprofileNameis 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
-
setAwsCredentialsProvider
void setAwsCredentialsProvider(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider value)
-
getProxyConfiguration
software.amazon.awssdk.http.apache.ProxyConfiguration getProxyConfiguration()
ProxyConfigurationused to configure AWS service clients.Note, only the options shown in the example below are supported.
usernameandpasswordare optional.Example:
--proxyConfiguration={ "endpoint": "http://hostname:port", "username": "username", "password": "password" }
-
setProxyConfiguration
void setProxyConfiguration(software.amazon.awssdk.http.apache.ProxyConfiguration value)
-
getHttpClientConfiguration
HttpClientConfiguration getHttpClientConfiguration()
HttpClientConfigurationused to configure AWS service clients.Example:
--httpClientConfiguration={"socketTimeout":1000, "maxConnections":10}
-
setHttpClientConfiguration
void setHttpClientConfiguration(HttpClientConfiguration value)
-
getClientBuilderFactory
@Class(DefaultClientBuilder.class) java.lang.Class<? extends ClientBuilderFactory> getClientBuilderFactory()
-
setClientBuilderFactory
void setClientBuilderFactory(java.lang.Class<? extends ClientBuilderFactory> clazz)
-
-