Class S3OverrideAuthSchemePropertiesPlugin

java.lang.Object
software.amazon.awssdk.services.s3.internal.plugins.S3OverrideAuthSchemePropertiesPlugin
All Implemented Interfaces:
AutoCloseable, SdkPlugin, SdkAutoCloseable

public final class S3OverrideAuthSchemePropertiesPlugin extends Object implements SdkPlugin
Plugin that allows override of signer and identity properties on the selected auth scheme options. The class offers static methods to create plugins for common cases such as enable payload signing by default. For instance, if you want to unconditionally enable payload signing across the board you can create the S3 client, e.g., invalid input: '{@snippet S3AsyncClient s3 = S3AsyncClient.builder()'.region(Region.US_WEST_2) .credentialsProvider(CREDENTIALS) .httpClient(httpClient) .addPlugin(S3OverrideAuthSchemePropertiesPlugin.enablePayloadSigningPlugin()) .build(); } The plugin can also be used for a particular request, e.g., invalid input: '{@snippet s3Client'.putObject(PutObjectRequest.builder() .overrideConfiguration(c -> c.addPlugin( S3OverrideAuthSchemePropertiesPlugin.enablePayloadSigningPlugin())) .checksumAlgorithm(ChecksumAlgorithm.SHA256) .bucket("test").key("test").build(), RequestBody.fromBytes("abc".getBytes())); }
  • Method Details

    • configureClient

      public void configureClient(SdkServiceClientConfiguration.Builder config)
      Description copied from interface: SdkPlugin
      Modify the provided client configuration.
      Specified by:
      configureClient in interface SdkPlugin
    • enablePayloadSigningPlugin

      public static SdkPlugin enablePayloadSigningPlugin()
      Creates a new plugin that enables payload signing. This plugin can be used per client or by per-request.
    • disableChunkEncodingPlugin

      public static SdkPlugin disableChunkEncodingPlugin()
      Creates a new plugin that disables the ChunkEncoding signers property for the `UploadPart` and `PutObject` operations. This plugin can be used per client or by per-request.
    • builder

      Creates a new builder to configure the plugin.