Interface ClientOverrideConfiguration.Builder

    • Method Detail

      • putHeader

        default ClientOverrideConfiguration.Builder putHeader​(String name,
                                                              String value)
        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.

        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

        ClientOverrideConfiguration.Builder putHeader​(String name,
                                                      List<String> values)
        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.

        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

        ClientOverrideConfiguration.Builder headers​(Map<String,​List<String>> headers)
        Configure 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.

        This overrides any values currently configured in the builder.

        Parameters:
        headers - The set of additional headers.
        Returns:
        This object for method chaining.
      • retryPolicy

        default ClientOverrideConfiguration.Builder retryPolicy​(RetryMode retryMode)
        Configure the retry mode used to determine the retry policy that is used when handling failure cases. This is shorthand for retryPolicy(RetryPolicy.forRetryMode(retryMode)), and overrides any configured retry policy on this builder.
      • putAdvancedOption

        <T> ClientOverrideConfiguration.Builder putAdvancedOption​(SdkAdvancedClientOption<T> option,
                                                                  T value)
        Configure an advanced override option. These values are used very rarely, and the majority of SDK customers can ignore them.
        Type Parameters:
        T - The type of the option.
        Parameters:
        option - The option to configure.
        value - The value of the option.
      • advancedOptions

        ClientOverrideConfiguration.Builder advancedOptions​(Map<SdkAdvancedClientOption<?>,​?> advancedOptions)
        Configure the map of advanced override options. This will override all values currently configured. The values in the map must match the key type of the map, or a runtime exception will be raised.
      • advancedOptions

        software.amazon.awssdk.utils.AttributeMap advancedOptions()
      • apiCallTimeout

        ClientOverrideConfiguration.Builder apiCallTimeout​(Duration 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.

        For synchronous streaming operations, implementations of ResponseTransformer must handle interrupt properly to allow the the SDK to timeout the request in a timely manner.

        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).

        You can also configure it on a per-request basis via RequestOverrideConfiguration.Builder.apiCallTimeout(Duration). Note that request-level timeout takes precedence.

        See Also:
        ClientOverrideConfiguration.apiCallTimeout()
      • apiCallTimeout

        Duration apiCallTimeout()
      • apiCallAttemptTimeout

        ClientOverrideConfiguration.Builder apiCallAttemptTimeout​(Duration 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 api call attempt timeout feature should not be used when absolute precision is needed.

        For synchronous streaming operations, the process in ResponseTransformer is not timed and will not be aborted.

        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).

        You can also configure it on a per-request basis via RequestOverrideConfiguration.Builder.apiCallAttemptTimeout(Duration). Note that request-level timeout takes precedence.

        See Also:
        ClientOverrideConfiguration.apiCallAttemptTimeout()
      • apiCallAttemptTimeout

        Duration apiCallAttemptTimeout()
      • defaultProfileName

        String defaultProfileName()
      • metricPublishers

        ClientOverrideConfiguration.Builder metricPublishers​(List<software.amazon.awssdk.metrics.MetricPublisher> metricPublishers)
        Set the Metric publishers to be use to publish metrics for this client. This overwrites the current list of metric publishers set on the builder.
        Parameters:
        metricPublishers - The metric publishers.
      • addMetricPublisher

        ClientOverrideConfiguration.Builder addMetricPublisher​(software.amazon.awssdk.metrics.MetricPublisher metricPublisher)
        Add a metric publisher to the existing list of previously set publishers to be used for publishing metrics for this client.
        Parameters:
        metricPublisher - The metric publisher to add.
      • metricPublishers

        List<software.amazon.awssdk.metrics.MetricPublisher> metricPublishers()
      • executionAttributes

        ClientOverrideConfiguration.Builder executionAttributes​(ExecutionAttributes executionAttributes)
        Sets the additional execution attributes collection for this client.
        Parameters:
        executionAttributes - Execution attributes map for this client.
        Returns:
        This object for method chaining.
      • putExecutionAttribute

        <T> ClientOverrideConfiguration.Builder putExecutionAttribute​(ExecutionAttribute<T> attribute,
                                                                      T value)
        Put an execution attribute into to the existing collection of execution attributes.
        Parameters:
        attribute - The execution attribute object
        value - The value of the execution attribute.