public static class SdkRequestConfig.Builder extends Object
SdkRequestConfig
object.Constructor | Description |
---|---|
Builder() |
Modifier and Type | Method | Description |
---|---|---|
SdkRequestConfig |
build() |
Builds the
SdkRequestConfig with the current state of the builder. |
SdkRequestConfig.Builder |
customHeader(String name,
String value) |
Put a new custom header to the map of custom header names to custom header values.
|
SdkRequestConfig.Builder |
customQueryParam(String name,
String value) |
Add a custom query parameter for the request.
|
SdkRequestConfig.Builder |
totalExecutionTimeout(int totalExecutionTimeout) |
Sets the amount of time (in milliseconds) to allow the client to complete the execution of
an API call.
|
public SdkRequestConfig.Builder totalExecutionTimeout(int totalExecutionTimeout)
This feature requires buffering the entire response (for non-streaming APIs) into memory to enforce a hard timeout when reading the response. For APIs that return large responses this could be expensive.
The total execution 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 timeout is disabled by default.
totalExecutionTimeout
- The amount of time (in milliseconds) to allow the client to
complete the execution of an API call. A non-positive value
disables the timeout for this request.public SdkRequestConfig.Builder customHeader(String name, String value)
NOTE: Custom header values set via this method will overwrite any conflicting values coming from the request parameters.
name
- The name of the header to addvalue
- The value of the header to addpublic SdkRequestConfig.Builder customQueryParam(String name, String value)
name
- The name of the query parametervalue
- The value of the query parameter. Only the parameter name will be added in
the URI if the value is set to null. For example, customQueryParameter("param",
null) will be serialized to "?param", while customQueryParameter("param",
"") will be serialized to "?param=".public SdkRequestConfig build()
SdkRequestConfig
with the current state of the builder.SdkRequestConfig
object. See BaseRequest.sdkRequestConfig(SdkRequestConfig)
.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.