Interface RequestOverrideConfiguration.Builder<B extends RequestOverrideConfiguration.Builder>
- All Known Subinterfaces:
AwsRequestOverrideConfiguration.Builder
,SdkRequestOverrideConfiguration.Builder
- Enclosing class:
RequestOverrideConfiguration
-
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.Add a plugin used to update the configuration used by this 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.build()
Create a newSdkRequestOverrideConfiguration
with the properties set on this builder.compressionConfiguration
(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer) Sets theCompressionConfiguration
for this request.compressionConfiguration
(CompressionConfiguration compressionConfiguration) Sets theCompressionConfiguration
for 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> metricPublisher) 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> B
putExecutionAttribute
(ExecutionAttribute<T> attribute, T value) Add an execution attribute to the existing collection of execution attributes.default B
Add a single header to be set on the HTTP request.Add a single header with multiple values to be set on the HTTP request.default B
putRawQueryParameter
(String name, String value) Add a single query parameter 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.signer()
Sets the signer to use for signing the request.
-
Method Details
-
headers
Optional additional headers to be added to the HTTP request.- Returns:
- The optional additional headers.
-
putHeader
Add a single header 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.
- Parameters:
name
- The name of the header.value
- The value of the header.- Returns:
- This object for method chaining.
-
putHeader
Add 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.
- Parameters:
name
- The name of the header.values
- The values of the header.- Returns:
- This object for method chaining.
-
headers
Add 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.
- Parameters:
headers
- The set of additional headers.- Returns:
- This object for method chaining.
-
rawQueryParameters
Optional additional query parameters to be added to the HTTP request.- Returns:
- The optional additional query parameters.
-
putRawQueryParameter
Add a single query parameter to be set on the HTTP request.This overrides any values already configured with this query name in the builder.
- Parameters:
name
- The query parameter name.value
- The query parameter value.- Returns:
- This object for method chaining.
-
putRawQueryParameter
Add 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.
- Parameters:
name
- The query parameter name.values
- The query parameter values.- Returns:
- This object for method chaining.
-
rawQueryParameters
Configure query parameters to be set on the HTTP request.This completely overrides any query parameters currently configured in the builder.
- Parameters:
rawQueryParameters
- The set of additional query parameters.- Returns:
- This object for method chaining.
-
apiNames
The optional names of the higher level libraries that constructed the request.- Returns:
- The names of the libraries.
-
addApiName
Set the optional name of the higher level library that constructed the request.- Parameters:
apiName
- The name of the library.- Returns:
- This object for method chaining.
-
addApiName
Set the optional name of the higher level library that constructed the request.- Parameters:
apiNameConsumer
- AConsumer
that accepts aApiName.Builder
.- Returns:
- This object for method chaining.
-
apiCallTimeout
Configure 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
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)
.- See Also:
-
apiCallTimeout
Duration apiCallTimeout() -
apiCallAttemptTimeout
Configure 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
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)
.- See Also:
-
apiCallAttemptTimeout
Duration apiCallAttemptTimeout() -
signer
Sets 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.- Parameters:
signer
- Signer for signing the request- Returns:
- This object for method chaining
-
signer
Signer signer() -
metricPublishers
Sets the metric publishers for publishing the metrics collected for this request. This list supersedes the metric publisher set on the client.- Parameters:
metricPublisher
- The list metric publisher for this request.- Returns:
- This object for method chaining.
-
addMetricPublisher
Add a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this request.- Parameters:
metricPublisher
- The metric publisher to add.
-
metricPublishers
List<MetricPublisher> metricPublishers() -
executionAttributes
Sets the additional execution attributes collection for this request.- Parameters:
executionAttributes
- Execution attributes for this request- Returns:
- This object for method chaining.
-
putExecutionAttribute
Add an execution attribute to the existing collection of execution attributes.- Parameters:
attribute
- The execution attribute objectvalue
- The value of the execution attribute.
-
executionAttributes
ExecutionAttributes executionAttributes() -
endpointProvider
Sets 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.- Parameters:
endpointProvider
- Endpoint Provider that will override the resolving the endpoint for the request.- Returns:
- This object for method chaining
-
endpointProvider
EndpointProvider endpointProvider() -
compressionConfiguration
Sets theCompressionConfiguration
for 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.- Parameters:
compressionConfiguration
- Request compression configuration object for this request.
-
compressionConfiguration
B compressionConfiguration(Consumer<CompressionConfiguration.Builder> compressionConfigurationConsumer) Sets theCompressionConfiguration
for 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.- Parameters:
compressionConfigurationConsumer
- AConsumer
that accepts aCompressionConfiguration.Builder
- Returns:
- This object for method chaining
-
compressionConfiguration
CompressionConfiguration compressionConfiguration() -
plugins
Sets the plugins used to update the configuration used by this request.- Parameters:
plugins
- The list of plugins for this request.- Returns:
- This object for method chaining.
-
addPlugin
Add a plugin used to update the configuration used by this request.- Parameters:
plugin
- The plugin to add.
-
plugins
Returns the list of registered plugins -
build
RequestOverrideConfiguration build()Create a newSdkRequestOverrideConfiguration
with the properties set on this builder.- Returns:
- The new
SdkRequestOverrideConfiguration
.
-