Class S3OverrideAuthSchemePropertiesPlugin
java.lang.Object
software.amazon.awssdk.services.s3.internal.plugins.S3OverrideAuthSchemePropertiesPlugin
- All Implemented Interfaces:
AutoCloseable
,SdkPlugin
,SdkAutoCloseable
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()));
}
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a new builder to configure the plugin.void
Modify the provided client configuration.static SdkPlugin
Creates a new plugin that disables the ChunkEncoding signers property for the `UploadPart` and `PutObject` operations.static SdkPlugin
Creates a new plugin that enables payload signing.
-
Method Details
-
configureClient
Description copied from interface:SdkPlugin
Modify the provided client configuration.- Specified by:
configureClient
in interfaceSdkPlugin
-
enablePayloadSigningPlugin
Creates a new plugin that enables payload signing. This plugin can be used per client or by per-request. -
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.
-