Class S3ClientOptions
- java.lang.Object
-
- software.amazon.awssdk.crt.s3.S3ClientOptions
-
public class S3ClientOptions extends Object
-
-
Constructor Summary
Constructors Constructor Description S3ClientOptions()
-
Method Summary
-
-
-
Method Detail
-
withRegion
public S3ClientOptions withRegion(String region)
-
getRegion
public String getRegion()
-
withClientBootstrap
public S3ClientOptions withClientBootstrap(ClientBootstrap clientBootstrap)
-
getClientBootstrap
public ClientBootstrap getClientBootstrap()
-
withCredentialsProvider
public S3ClientOptions withCredentialsProvider(CredentialsProvider credentialsProvider)
Deprecated.Please usewithSigningConfig(AwsSigningConfig)instead. The credentials provider will be used to create the signing Config when the client was created. Client will use `AwsSigningConfig.getDefaultS3SigningConfig(region, credentialsProvider);` to create the signing config.- Parameters:
credentialsProvider- provide credentials for signing.- Returns:
- this
-
getCredentialsProvider
public CredentialsProvider getCredentialsProvider()
-
withSigningConfig
public S3ClientOptions withSigningConfig(AwsSigningConfig signingConfig)
The configuration related to signing used by S3 client. `AwsSigningConfig.getDefaultS3SigningConfig(region, credentialsProvider);` can be used as helper to create the default configuration to be used for S3. If no signing config provided, the client will skip signing. In case of public object, or the http message already has a presigned URL, signing can be skipped.- Parameters:
signingConfig- configuration related to signing via an AWS signing process.- Returns:
- this
-
getSigningConfig
public AwsSigningConfig getSigningConfig()
-
withPartSize
public S3ClientOptions withPartSize(long partSize)
-
getPartSize
public long getPartSize()
-
withMultipartUploadThreshold
public S3ClientOptions withMultipartUploadThreshold(long multipartUploadThreshold)
-
getMultiPartUploadThreshold
public long getMultiPartUploadThreshold()
-
withThroughputTargetGbps
public S3ClientOptions withThroughputTargetGbps(double throughputTargetGbps)
-
getThroughputTargetGbps
public double getThroughputTargetGbps()
-
withReadBackpressureEnabled
public S3ClientOptions withReadBackpressureEnabled(boolean enable)
Set whether backpressure is enabled (false by default), to prevent response data downloading faster than you can handle it.If false, no backpressure is applied and data will download as fast as possible.
If true, each S3MetaRequest has a flow-control window that shrinks as response body data is downloaded (headers do not affect the window).
withInitialReadWindowSize(long)determines the starting size of each S3MetaRequest's window, in bytes. Data stops downloading data whenever the window reaches zero. Increment the window to keep data flowing by callingS3MetaRequest.incrementReadWindow(long), or by returning a size fromS3MetaRequestResponseHandler.onResponseBody(java.nio.ByteBuffer, long, long). Maintain a larger window to keep up a high download throughput, parts cannot download in parallel unless the window is large enough to hold multiple parts. Maintain a smaller window to limit the amount of data buffered in memory.WARNING: This feature is experimental. Currently, backpressure is only applied to GetObject requests which are split into multiple parts, and you may still receive some data after the window reaches zero.
- Parameters:
enable- whether to enable or disable backpressure- Returns:
- this
-
getReadBackpressureEnabled
public boolean getReadBackpressureEnabled()
-
withInitialReadWindowSize
public S3ClientOptions withInitialReadWindowSize(long bytes)
The starting size of each S3MetaRequest's flow-control window (if backpressure is enabled).- Parameters:
bytes- size in bytes- Returns:
- this
- See Also:
withReadBackpressureEnabled(boolean)
-
getInitialReadWindowSize
public long getInitialReadWindowSize()
-
withEndpoint
@Deprecated public S3ClientOptions withEndpoint(String endpoint)
Deprecated.
-
getEndpoint
public String getEndpoint()
-
withTlsContext
public S3ClientOptions withTlsContext(TlsContext tlsContext)
-
getTlsContext
public TlsContext getTlsContext()
-
withMaxConnections
public S3ClientOptions withMaxConnections(int maxConnections)
-
getMaxConnections
public int getMaxConnections()
-
withComputeContentMd5
public S3ClientOptions withComputeContentMd5(Boolean computeContentMd5)
-
getComputeContentMd5
public Boolean getComputeContentMd5()
-
withStandardRetryOptions
public S3ClientOptions withStandardRetryOptions(StandardRetryOptions standardRetryOptions)
-
getStandardRetryOptions
public StandardRetryOptions getStandardRetryOptions()
-
withProxyOptions
public S3ClientOptions withProxyOptions(HttpProxyOptions proxyOptions)
-
getProxyOptions
public HttpProxyOptions getProxyOptions()
-
withProxyEnvironmentVariableSetting
public S3ClientOptions withProxyEnvironmentVariableSetting(HttpProxyEnvironmentVariableSetting httpProxyEnvironmentVariableSetting)
-
getHttpProxyEnvironmentVariableSetting
public HttpProxyEnvironmentVariableSetting getHttpProxyEnvironmentVariableSetting()
-
withConnectTimeoutMs
public S3ClientOptions withConnectTimeoutMs(int connectTimeoutMs)
-
getConnectTimeoutMs
public int getConnectTimeoutMs()
-
withS3TcpKeepAliveOptions
public S3ClientOptions withS3TcpKeepAliveOptions(S3TcpKeepAliveOptions tcpKeepAliveOptions)
-
getTcpKeepAliveOptions
public S3TcpKeepAliveOptions getTcpKeepAliveOptions()
-
withHttpMonitoringOptions
public S3ClientOptions withHttpMonitoringOptions(HttpMonitoringOptions monitoringOptions)
Options for detecting bad HTTP connections. If the transfer throughput falls below the specified thresholds for long enough, the operation is retried on a new connection. If left unset, default values are used.- Parameters:
monitoringOptions- monitoring options- Returns:
- this
-
getMonitoringOptions
public HttpMonitoringOptions getMonitoringOptions()
-
-