public static final class S3ClientOptions.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
S3ClientOptions |
build()
Builder.
|
S3ClientOptions.Builder |
disableChunkedEncoding()
Configures the client to disable chunked encoding for all requests.
|
S3ClientOptions.Builder |
enableDualstack()
Configures the client to use the dualstack endpoint for a region
|
S3ClientOptions.Builder |
setAccelerateModeEnabled(boolean accelerateModeEnabled)
Configures the client to use S3 accelerate endpoint for all requests.
|
S3ClientOptions.Builder |
setPathStyleAccess(boolean pathStyleAccess)
Configures the client to use path-style access for all requests.
|
S3ClientOptions.Builder |
setPayloadSigningEnabled(boolean payloadSigningEnabled)
Configures the client to sign payloads in all situations.
|
S3ClientOptions.Builder |
skipContentMd5Check(boolean skipContentMd5Check)
Configures the client to skip content MD5 check for all requests
and responses.
|
public S3ClientOptions build()
public S3ClientOptions.Builder skipContentMd5Check(boolean skipContentMd5Check)
Configures the client to skip content MD5 check for all requests and responses.
Setting this flag will allow the client to disregard data transfer integrity check by bypassing content MD5 check for all requests and responses.
skipContentMd5Check
- True to always skip content MD5 check.public S3ClientOptions.Builder setPathStyleAccess(boolean pathStyleAccess)
Configures the client to use path-style access for all requests.
Amazon S3 supports virtual-hosted-style and path-style access in all Regions. The path-style syntax, however, requires that you use the region-specific endpoint when attempting to access a bucket.
The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.
pathStyleAccess
- True to always use path-style access.public S3ClientOptions.Builder setAccelerateModeEnabled(boolean accelerateModeEnabled)
Configures the client to use S3 accelerate endpoint for all requests.
A bucket by default cannot be accessed in accelerate mode. If you wish to do so, you need to enable the accelerate configuration for the bucket in advance.
accelerateModeEnabled
- boolean for accelerateModeEnabled.AmazonS3#setBucketAccelerateConfiguration(com.amazonaws.services.s3.model.SetBucketAccelerateConfigurationRequest)}
public S3ClientOptions.Builder setPayloadSigningEnabled(boolean payloadSigningEnabled)
Configures the client to sign payloads in all situations.
Payload signing is optional when chunked encoding is not used and requests are made against an HTTPS endpoint. Under these conditions the client will by default opt to not sign payloads to optimize performance. If this flag is set to true the client will instead always sign payloads.
Note: Payload signing can be expensive, particularly if transferring large payloads in a single chunk. Enabling this option will result in a performance penalty.
payloadSigningEnabled
- True to explicitly enable payload signing in all situationspublic S3ClientOptions.Builder disableChunkedEncoding()
Configures the client to disable chunked encoding for all requests.
The default behavior is to enable chunked encoding automatically for PutObjectRequest and UploadPartRequest. Setting this flag will result in disabling chunked encoding for all requests.
Note: Enabling this option has performance implications since the checksum for the payload will have to be pre-calculated before sending the data. If your payload is large this will affect the overall time required to upload an object. Using this option is recommended only if your endpoint does not implement chunked uploading.
public S3ClientOptions.Builder enableDualstack()
Configures the client to use the dualstack endpoint for a region
S3 supports dualstack endpoints which return both IPv6 and IPv4 values. Use of these endpoints is optional.
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.