Class S3Configuration
- java.lang.Object
-
- software.amazon.awssdk.services.s3.S3Configuration
-
- All Implemented Interfaces:
ServiceConfiguration
,ToCopyableBuilder<S3Configuration.Builder,S3Configuration>
@Immutable @ThreadSafe public final class S3Configuration extends Object implements ServiceConfiguration, ToCopyableBuilder<S3Configuration.Builder,S3Configuration>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
S3Configuration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accelerateModeEnabled()
Returns whether the client has enabled accelerate mode for getting and putting objects.static S3Configuration.Builder
builder()
Create aS3Configuration.Builder
, used to create aS3Configuration
.boolean
checksumValidationEnabled()
Returns whether MD5 trailing checksum validation is enabled.boolean
chunkedEncodingEnabled()
Returns whether the client should use chunked encoding when signing the payload body.boolean
dualstackEnabled()
Returns whether the client is configured to use dualstack mode for accessing S3.boolean
multiRegionEnabled()
Returns whether the client is allowed to make cross-region calls when using an S3 Multi-Region Access Point ARN.boolean
pathStyleAccessEnabled()
Returns whether the client uses path-style access for all requests.S3Configuration.Builder
toBuilder()
boolean
useArnRegionEnabled()
Returns whether the client is allowed to make cross-region calls when an S3 Access Point ARN has a different region to the one configured on the client.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
public static S3Configuration.Builder builder()
Create aS3Configuration.Builder
, used to create aS3Configuration
.
-
pathStyleAccessEnabled
public boolean pathStyleAccessEnabled()
Returns whether the client uses 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.
- Returns:
- True is the client should always use path-style access
-
accelerateModeEnabled
public boolean accelerateModeEnabled()
Returns whether the client has enabled accelerate mode for getting and putting objects.
The default behavior is to disable accelerate mode for any operations (GET, PUT, DELETE). You need to call
S3Client.putBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest)
first to use this feature.- Returns:
- True if accelerate mode is enabled.
-
dualstackEnabled
public boolean dualstackEnabled()
Returns whether the client is configured to use dualstack mode for accessing S3. If you want to use IPv6 when accessing S3, dualstack must be enabled.
Dualstack endpoints are disabled by default.
- Returns:
- True if the client will use the dualstack endpoints
-
checksumValidationEnabled
public boolean checksumValidationEnabled()
Returns whether MD5 trailing checksum validation is enabled. This is enabled by default.The recommended approach is to specify a
ChecksumAlgorithm
on thePutObjectRequest
and enableChecksumMode
on theGetObjectRequest
. In that case, validation will be performed for the specified flexible checksum, and validation will not be performed for MD5 checksum.For
PutObjectRequest
, MD5 trailing checksum validation will be performed if:- Checksum validation is not disabled
- Server-side encryption is not used
- Flexible checksum
ChecksumAlgorithm
is not specified
GetObjectRequest
, MD5 trailing checksum validation will be performed if:- Checksum validation is not disabled
ChecksumMode
is disabled (default)- Regular S3 is used (non-S3Express)
- Returns:
- True if trailing checksum validation is enabled
-
chunkedEncodingEnabled
public boolean chunkedEncodingEnabled()
Returns whether the client should use chunked encoding when signing the payload body.This option only currently applies to
PutObjectRequest
andUploadPartRequest
.- Returns:
- True if chunked encoding should be used.
-
useArnRegionEnabled
public boolean useArnRegionEnabled()
Returns whether the client is allowed to make cross-region calls when an S3 Access Point ARN has a different region to the one configured on the client.- Returns:
- True if a different region in the ARN can be used.
-
multiRegionEnabled
public boolean multiRegionEnabled()
Returns whether the client is allowed to make cross-region calls when using an S3 Multi-Region Access Point ARN.- Returns:
- True if multi-region ARNs is enabled.
-
toBuilder
public S3Configuration.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<S3Configuration.Builder,S3Configuration>
-
-