Class RequestOverrideConfiguration.BuilderImpl<B extends RequestOverrideConfiguration.Builder>
- All Implemented Interfaces:
RequestOverrideConfiguration.Builder<B>
- Enclosing class:
- RequestOverrideConfiguration
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBuilderImpl(RequestOverrideConfiguration sdkRequestOverrideConfig) -
Method Summary
Modifier and TypeMethodDescriptionaddApiName(Consumer<ApiName.Builder> apiNameConsumer) Set the optional name of the higher level library that constructed the request.addApiName(ApiName apiName) Set the optional name of the higher level library that constructed the request.addMetricPublisher(MetricPublisher metricPublisher) Add a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this request.Adds a plugin that will modify the configuration used by this specific request.apiCallAttemptTimeout(Duration apiCallAttemptTimeout) Configure the amount of time to wait for the http request to complete before giving up and timing out.apiCallTimeout(Duration apiCallTimeout) Configure the amount of time to allow the client to complete the execution of an API call.apiNames()The optional names of the higher level libraries that constructed the request.authSchemeProvider(AuthSchemeProvider authSchemeProvider) Sets the auth scheme provider to use for resolving the auth scheme of the request.compressionConfiguration(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer) Sets theCompressionConfigurationfor this request.compressionConfiguration(CompressionConfiguration compressionConfiguration) Sets theCompressionConfigurationfor this request.endpointProvider(EndpointProvider endpointProvider) Sets the endpointProvider to use for resolving the endpoint of the request.executionAttributes(ExecutionAttributes executionAttributes) Sets the additional execution attributes collection for this request.headers()Optional additional headers to be added to the HTTP request.Add additional headers to be set on the HTTP request.metricPublishers(List<MetricPublisher> metricPublishers) Sets the metric publishers for publishing the metrics collected for this request.plugins()Returns the list of registered pluginsSets the plugins used to update the configuration used by this request.<T> BputExecutionAttribute(ExecutionAttribute<T> executionAttribute, T value) Add an execution attribute to the existing collection of execution attributes.Add a single header with multiple values to be set on the HTTP request.putRawQueryParameter(String name, List<String> values) Add a single query parameter with multiple values to be set on the HTTP request.Optional additional query parameters to be added to the HTTP request.rawQueryParameters(Map<String, List<String>> rawQueryParameters) Configure query parameters to be set on the HTTP request.voidsetApiCallAttemptTimeout(Duration apiCallAttemptTimeout) voidsetApiCallTimeout(Duration apiCallTimeout) voidsetAuthSchemeProvider(AuthSchemeProvider authSchemeProvider) voidsetEndpointProvider(EndpointProvider endpointProvider) voidsetExecutionAttributes(ExecutionAttributes executionAttributes) voidsetMetricPublishers(List<MetricPublisher> metricPublishers) voidsigner()Sets the signer to use for signing the request.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.RequestOverrideConfiguration.Builder
build, putHeader, putRawQueryParameter
-
Constructor Details
-
BuilderImpl
protected BuilderImpl() -
BuilderImpl
-
-
Method Details
-
headers
Description copied from interface:RequestOverrideConfiguration.BuilderOptional additional headers to be added to the HTTP request.- Specified by:
headersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Returns:
- The optional additional headers.
-
putHeader
Description copied from interface:RequestOverrideConfiguration.BuilderAdd a single header with multiple values to be set on the HTTP request.This overrides any values for the given header set on the request by default by the SDK, as well as header overrides set at the client level using
ClientOverrideConfiguration.This overrides any values already configured with this header name in the builder.
- Specified by:
putHeaderin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
name- The name of the header.values- The values of the header.- Returns:
- This object for method chaining.
-
headers
Description copied from interface:RequestOverrideConfiguration.BuilderAdd additional headers to be set on the HTTP request.This overrides any values for the given headers set on the request by default by the SDK, as well as header overrides set at the client level using
ClientOverrideConfiguration.This completely overrides any values currently configured in the builder.
- Specified by:
headersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
headers- The set of additional headers.- Returns:
- This object for method chaining.
-
rawQueryParameters
Description copied from interface:RequestOverrideConfiguration.BuilderOptional additional query parameters to be added to the HTTP request.- Specified by:
rawQueryParametersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Returns:
- The optional additional query parameters.
-
putRawQueryParameter
Description copied from interface:RequestOverrideConfiguration.BuilderAdd a single query parameter with multiple values to be set on the HTTP request.This overrides any values already configured with this query name in the builder.
- Specified by:
putRawQueryParameterin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
name- The query parameter name.values- The query parameter values.- Returns:
- This object for method chaining.
-
rawQueryParameters
Description copied from interface:RequestOverrideConfiguration.BuilderConfigure query parameters to be set on the HTTP request.This completely overrides any query parameters currently configured in the builder.
- Specified by:
rawQueryParametersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
rawQueryParameters- The set of additional query parameters.- Returns:
- This object for method chaining.
-
apiNames
Description copied from interface:RequestOverrideConfiguration.BuilderThe optional names of the higher level libraries that constructed the request.- Specified by:
apiNamesin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Returns:
- The names of the libraries.
-
addApiName
Description copied from interface:RequestOverrideConfiguration.BuilderSet the optional name of the higher level library that constructed the request.- Specified by:
addApiNamein interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
apiName- The name of the library.- Returns:
- This object for method chaining.
-
addApiName
Description copied from interface:RequestOverrideConfiguration.BuilderSet the optional name of the higher level library that constructed the request.- Specified by:
addApiNamein interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
apiNameConsumer- AConsumerthat accepts aApiName.Builder.- Returns:
- This object for method chaining.
-
apiCallTimeout
Description copied from interface:RequestOverrideConfiguration.BuilderConfigure the amount of time to allow the client to complete the execution of an API call. This timeout covers the entire client execution except for marshalling. This includes request handler execution, all HTTP requests including retries, unmarshalling, etc. This value should always be positive, if present.The api call timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the client execution timeout feature should not be used when absolute precision is needed.
This may be used together with
RequestOverrideConfiguration.Builder.apiCallAttemptTimeout()to enforce both a timeout on each individual HTTP request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).Note that this timeout takes precedence over the value configured at client level via
ClientOverrideConfiguration.Builder.apiCallTimeout(Duration).- Specified by:
apiCallTimeoutin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- See Also:
-
setApiCallTimeout
-
apiCallTimeout
- Specified by:
apiCallTimeoutin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
apiCallAttemptTimeout
Description copied from interface:RequestOverrideConfiguration.BuilderConfigure the amount of time to wait for the http request to complete before giving up and timing out. This value should always be positive, if present.The request timeout feature doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The typical case aborts the request within a few milliseconds but there may occasionally be requests that don't get aborted until several seconds after the timer has been breached. Because of this, the request timeout feature should not be used when absolute precision is needed.
This may be used together with
RequestOverrideConfiguration.Builder.apiCallTimeout()to enforce both a timeout on each individual HTTP request (i.e. each retry) and the total time spent on all requests across retries (i.e. the 'api call' time).Note that this timeout takes precedence over the value configured at client level via
ClientOverrideConfiguration.Builder.apiCallAttemptTimeout(Duration).- Specified by:
apiCallAttemptTimeoutin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- See Also:
-
setApiCallAttemptTimeout
-
apiCallAttemptTimeout
- Specified by:
apiCallAttemptTimeoutin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
signer
Description copied from interface:RequestOverrideConfiguration.BuilderSets the signer to use for signing the request. This signer get priority over the signer set on the client while signing the requests. If this value is null, then the client level signer is used for signing the request.- Specified by:
signerin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
signer- Signer for signing the request- Returns:
- This object for method chaining
-
setSigner
-
signer
- Specified by:
signerin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
metricPublishers
Description copied from interface:RequestOverrideConfiguration.BuilderSets the metric publishers for publishing the metrics collected for this request. This list supersedes the metric publisher set on the client.- Specified by:
metricPublishersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
metricPublishers- The list metric publisher for this request.- Returns:
- This object for method chaining.
-
addMetricPublisher
Description copied from interface:RequestOverrideConfiguration.BuilderAdd a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this request.- Specified by:
addMetricPublisherin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
metricPublisher- The metric publisher to add.
-
setMetricPublishers
-
metricPublishers
- Specified by:
metricPublishersin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
executionAttributes
Description copied from interface:RequestOverrideConfiguration.BuilderSets the additional execution attributes collection for this request.- Specified by:
executionAttributesin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
executionAttributes- Execution attributes for this request- Returns:
- This object for method chaining.
-
putExecutionAttribute
Description copied from interface:RequestOverrideConfiguration.BuilderAdd an execution attribute to the existing collection of execution attributes.- Specified by:
putExecutionAttributein interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
executionAttribute- The execution attribute objectvalue- The value of the execution attribute.
-
executionAttributes
- Specified by:
executionAttributesin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
setExecutionAttributes
-
endpointProvider
Description copied from interface:RequestOverrideConfiguration.BuilderSets the endpointProvider to use for resolving the endpoint of the request. This endpointProvider gets priority over the endpointProvider set on the client while resolving the endpoint for the requests. If this value is null, then the client level endpointProvider is used for resolving the endpoint.- Specified by:
endpointProviderin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
endpointProvider- Endpoint Provider that will override client's configured or default EndpointProvider for the request.- Returns:
- This object for method chaining
-
setEndpointProvider
-
endpointProvider
- Specified by:
endpointProviderin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
authSchemeProvider
Description copied from interface:RequestOverrideConfiguration.BuilderSets the auth scheme provider to use for resolving the auth scheme of the request. This auth scheme provider gets priority over the auth scheme provider set on the client while resolving the auth scheme for the requests. If this value is null, then the client level auth scheme provider is used for resolving the auth scheme.Example — overriding the signing region for a single request:
- Specified by:
authSchemeProviderin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
authSchemeProvider- Auth scheme provider that will override the client's configured or default AuthSchemeProvider for the request.- Returns:
- This object for method chaining
-
setAuthSchemeProvider
-
authSchemeProvider
- Specified by:
authSchemeProviderin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
compressionConfiguration
Description copied from interface:RequestOverrideConfiguration.BuilderSets theCompressionConfigurationfor this request. The order of precedence, from highest to lowest, for this setting is: 1) Per request configuration 2) Client configuration 3) Environment variables 4) Profile setting.- Specified by:
compressionConfigurationin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
compressionConfiguration- Request compression configuration object for this request.
-
compressionConfiguration
public B compressionConfiguration(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer) Description copied from interface:RequestOverrideConfiguration.BuilderSets theCompressionConfigurationfor this request. The order of precedence, from highest to lowest, for this setting is: 1) Per request configuration 2) Client configuration 3) Environment variables 4) Profile setting.- Specified by:
compressionConfigurationin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
compressionConfigurationConsumer- AConsumerthat accepts aCompressionConfiguration.Builder- Returns:
- This object for method chaining
-
compressionConfiguration
- Specified by:
compressionConfigurationin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-
plugins
Description copied from interface:RequestOverrideConfiguration.BuilderSets the plugins used to update the configuration used by this request.- Specified by:
pluginsin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
plugins- The list of plugins for this request.- Returns:
- This object for method chaining.
-
addPlugin
Description copied from interface:RequestOverrideConfiguration.BuilderAdds a plugin that will modify the configuration used by this specific request.Request-level plugins are applied at request execution time. Multiple plugins can be added and are executed in the order they were added.
Note: Request-level override configuration (e.g.,
RequestOverrideConfiguration.Builder.apiCallTimeout(Duration)) takes precedence over request-level plugin settings. This means if you set a value directly on the request override configuration and also set it via a plugin, the direct configuration value will be used.Example:
- Specified by:
addPluginin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>- Parameters:
plugin- the plugin to add- Returns:
- this builder for method chaining
- See Also:
-
plugins
Description copied from interface:RequestOverrideConfiguration.BuilderReturns the list of registered plugins- Specified by:
pluginsin interfaceRequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
-