Class S3Configuration

java.lang.Object
software.amazon.awssdk.services.s3.S3Configuration
All Implemented Interfaces:
ServiceConfiguration, ToCopyableBuilder<S3Configuration.Builder,S3Configuration>

  • Method Details

    • builder

      public static S3Configuration.Builder builder()
      Create a S3Configuration.Builder, used to create a S3Configuration.
    • 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 the PutObjectRequest and enable ChecksumMode on the GetObjectRequest. 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
      For 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 and UploadPartRequest.

      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()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<S3Configuration.Builder,S3Configuration>
      Returns:
      a builder for type T