Package org.apache.iceberg.aws
Class AwsClientProperties
java.lang.Object
org.apache.iceberg.aws.AwsClientProperties
- All Implemented Interfaces:
- Serializable
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final StringUsed by the client.credentials-provider configured value that will be used byAwsClientFactories.defaultFactory()and other AWS client factory classes to pass provider-specific properties.static final StringConfigure the AWS credentials provider used to create AWS clients.static final StringUsed byAwsClientFactories.DefaultAwsClientFactoryand also other client factory classes.static final StringControls whether legacy MD5 plugin should be added or not.static final StringControls whether vended credentials should be refreshed or not.static final StringWhen set, theVendedCredentialsProviderwill be used to fetch and refresh vended credentials from this endpoint.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, ClientT> 
 voidapplyClientCredentialConfigurations(BuilderT builder) Configure the credential provider for AWS clients.<T extends software.amazon.awssdk.services.s3.S3CrtAsyncClientBuilder>
 voidapplyClientCredentialConfigurations(T builder) Configure the credential provider for S3 CRT clients.<BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, ClientT> 
 voidapplyClientRegionConfiguration(BuilderT builder) Configure a client AWS region.<T extends software.amazon.awssdk.services.s3.S3CrtAsyncClientBuilder>
 voidapplyClientRegionConfiguration(T builder) Configure an S3 CRT client region.<BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, ClientT> 
 voidapplyLegacyMd5Plugin(BuilderT builder) Add a legacy md5 plugin if it is enabled.<BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, ClientT> 
 voidapplyRetryConfigurations(BuilderT builder) Configure RetryMode to ADAPTIVE_V2 for AWS clientssoftware.amazon.awssdk.auth.credentials.AwsCredentialsProvidercredentialsProvider(String accessKeyId, String secretAccessKey, String sessionToken) Returns a credentials provider instance.voidsetClientRegion(String clientRegion) 
- 
Field Details- 
CLIENT_CREDENTIALS_PROVIDERConfigure the AWS credentials provider used to create AWS clients. A fully qualified concrete class with package that implements theAwsCredentialsProviderinterface is required.Additionally, the implementation class must also have a create() or create(Map) method implemented, which returns an instance of the class that provides aws credentials provider. Example: client.credentials-provider=software.amazon.awssdk.auth.credentials.SystemPropertyCredentialsProvider When set, the default client factory AwsClientFactories.defaultFactory()and other AWS client factory classes will use this provider to get AWS credentials provided instead of reading the default credential chain to get AWS access credentials.- See Also:
 
- 
CLIENT_CREDENTIAL_PROVIDER_PREFIXUsed by the client.credentials-provider configured value that will be used byAwsClientFactories.defaultFactory()and other AWS client factory classes to pass provider-specific properties. Each property consists of a key name and an associated value.- See Also:
 
- 
CLIENT_REGIONUsed byAwsClientFactories.DefaultAwsClientFactoryand also other client factory classes. If set, all AWS clients except STS client will use the given region instead of the default region chain.- See Also:
 
- 
REFRESH_CREDENTIALS_ENDPOINTWhen set, theVendedCredentialsProviderwill be used to fetch and refresh vended credentials from this endpoint.- See Also:
 
- 
REFRESH_CREDENTIALS_ENABLEDControls whether vended credentials should be refreshed or not. Defaults to true.- See Also:
 
- 
LEGACY_MD5_PLUGIN_ENABLEDControls whether legacy MD5 plugin should be added or not. Defaults to false. AWS SDK version 2.30.0 introduced integrity protections that are not backward compatible. Enable this property only when you need to access older S3-compatible object storages that depend on the legacy MD5 checksum.- See Also:
 
 
- 
- 
Constructor Details- 
AwsClientPropertiespublic AwsClientProperties()
- 
AwsClientProperties
 
- 
- 
Method Details- 
clientRegion
- 
setClientRegion
- 
applyClientRegionConfigurationpublic <BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, void applyClientRegionConfigurationClientT> (BuilderT builder) Configure a client AWS region.Sample usage: S3Client.builder().applyMutation(awsClientProperties::applyClientRegionConfiguration)
- 
applyClientRegionConfigurationpublic <T extends software.amazon.awssdk.services.s3.S3CrtAsyncClientBuilder> void applyClientRegionConfiguration(T builder) Configure an S3 CRT client region.Sample usage: S3AsyncClient.crtBuilder().applyMutation(awsClientProperties::applyClientRegionConfiguration)
- 
applyClientCredentialConfigurationspublic <BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, void applyClientCredentialConfigurationsClientT> (BuilderT builder) Configure the credential provider for AWS clients.Sample usage: DynamoDbClient.builder().applyMutation(awsClientProperties::applyClientCredentialConfigurations)
- 
applyClientCredentialConfigurationspublic <T extends software.amazon.awssdk.services.s3.S3CrtAsyncClientBuilder> void applyClientCredentialConfigurations(T builder) Configure the credential provider for S3 CRT clients.Sample usage: S3AsyncClient.crtBuilder().applyMutation(awsClientProperties::applyClientCredentialConfigurations)
- 
credentialsProviderpublic software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider(String accessKeyId, String secretAccessKey, String sessionToken) Returns a credentials provider instance. IfrefreshCredentialsEndpointis set, an instance ofVendedCredentialsProvideris returned. If params were set, we return a new credentials instance. If none of the params are set, we try to dynamically load the provided credentials provider class. Upon loading the class, we try to invokecreate(Map<String, String>)static method. If that fails, we fall back tocreate(). If credential provider class wasn't set, we fall back to default credentials provider.- Parameters:
- accessKeyId- the AWS access key ID
- secretAccessKey- the AWS secret access key
- sessionToken- the AWS session token
- Returns:
- a credentials provider instance
 
- 
applyRetryConfigurationspublic <BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, void applyRetryConfigurationsClientT> (BuilderT builder) Configure RetryMode to ADAPTIVE_V2 for AWS clientsSample usage: KmsClient.builder().applyMutation(awsClientProperties::applyRetryConfigurations) 
- 
applyLegacyMd5Pluginpublic <BuilderT extends software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<BuilderT,ClientT>, void applyLegacyMd5PluginClientT> (BuilderT builder) Add a legacy md5 plugin if it is enabled.Sample usage: S3Client.builder().applyMutation(awsClientProperties::applyLegacyMd5Plugin)
 
-