public interface AwsOptions extends PipelineOptions
Modifier and Type | Interface and Description |
---|---|
static class |
AwsOptions.AwsRegionFactory
Attempt to load default region.
|
static class |
AwsOptions.AwsUserCredentialsFactory
Return
DefaultCredentialsProvider as default provider. |
PipelineOptions.AtomicLongFactory, PipelineOptions.CheckEnabled, PipelineOptions.DirectRunner, PipelineOptions.JobNameFactory, PipelineOptions.UserAgentFactory
Modifier and Type | Method and Description |
---|---|
AwsCredentialsProvider |
getAwsCredentialsProvider()
AwsCredentialsProvider used to configure AWS service clients. |
Region |
getAwsRegion()
Region used to configure AWS service clients.
|
java.lang.Class<? extends ClientBuilderFactory> |
getClientBuilderFactory() |
java.net.URI |
getEndpoint()
Endpoint used to configure AWS service clients.
|
HttpClientConfiguration |
getHttpClientConfiguration()
HttpClientConfiguration used to configure AWS service clients. |
ProxyConfiguration |
getProxyConfiguration()
ProxyConfiguration used to configure AWS service clients. |
void |
setAwsCredentialsProvider(AwsCredentialsProvider value) |
void |
setAwsRegion(Region region) |
void |
setClientBuilderFactory(java.lang.Class<? extends ClientBuilderFactory> clazz) |
void |
setEndpoint(java.net.URI uri) |
void |
setHttpClientConfiguration(HttpClientConfiguration value) |
void |
setProxyConfiguration(ProxyConfiguration value) |
as, getJobName, getOptionsId, getRunner, getStableUniqueNames, getTempLocation, getUserAgent, outputRuntimeOptions, revision, setJobName, setOptionsId, setRunner, setStableUniqueNames, setTempLocation, setUserAgent
populateDisplayData
@Default.InstanceFactory(value=AwsOptions.AwsRegionFactory.class) Region getAwsRegion()
void setAwsRegion(Region region)
java.net.URI getEndpoint()
void setEndpoint(java.net.URI uri)
@Default.InstanceFactory(value=AwsOptions.AwsUserCredentialsFactory.class) 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",
"accessKeyId": "key_id_value",
"secretAccessKey": "secret_value"
}
--awsCredentialsProvider={
"@type": "StaticCredentialsProvider",
"accessKeyId": "key_id_value",
"secretAccessKey": "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
}
StsAssumeRoleWithWebIdentityCredentialsProvider
Please note that this works for batch pipelines which can be completed within the expiration of the web identity token. Long batch or streaming pipelines wouldn't work with this Provider.
--awsCredentialsProvider={
"@type": "StsAssumeRoleWithWebIdentityCredentialsProvider",
"roleArn": "role_arn_Value",
"roleSessionName": "session_name_value",
"webIdentityToken": "web_identity_token_value",
"durationSeconds": 3600
}
DefaultCredentialsProvider
void setAwsCredentialsProvider(AwsCredentialsProvider value)
ProxyConfiguration getProxyConfiguration()
ProxyConfiguration
used to configure AWS service clients.
Note, only the options shown in the example below are supported. username
and
password
are optional.
Example:
--proxyConfiguration={
"endpoint": "http://hostname:port",
"username": "username",
"password": "password"
}
void setProxyConfiguration(ProxyConfiguration value)
HttpClientConfiguration getHttpClientConfiguration()
HttpClientConfiguration
used to configure AWS service clients.
Example:
--httpClientConfiguration={"socketTimeout":1000, "maxConnections":10}
void setHttpClientConfiguration(HttpClientConfiguration value)
@Default.Class(value=ClientBuilderFactory.DefaultClientBuilder.class) java.lang.Class<? extends ClientBuilderFactory> getClientBuilderFactory()
void setClientBuilderFactory(java.lang.Class<? extends ClientBuilderFactory> clazz)