Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Hierarchy

Properties

Properties

name?: string

A unique name to refer to a middleware

override?: boolean

A flag to override the existing middleware with the same name. Without setting it, adding middleware with duplicated name will throw an exception.

step?: "initialize"

Handlers are ordered using a "step" that describes the stage of command execution at which the handler will be executed. The available steps are:

  • initialize: The input is being prepared. Examples of typical initialization tasks include injecting default options computing derived parameters.

  • serialize: The input is complete and ready to be serialized. Examples of typical serialization tasks include input validation and building an HTTP request from user input.

  • build: The input has been serialized into an HTTP request, but that request may require further modification. Any request alterations will be applied to all retries. Examples of typical build tasks include injecting HTTP headers that describe a stable aspect of the request, such as Content-Length or a body checksum.

  • finalizeRequest: The request is being prepared to be sent over the wire. The request in this stage should already be semantically complete and should therefore only be altered as match the recipient's expectations. Examples of typical finalization tasks include request signing and injecting hop-by-hop headers.

  • deserialize: The response has arrived, the middleware here will deserialize the raw response object to structured response

    Unlike initialization and build handlers, which are executed once per operation execution, finalization and deserialize handlers will be executed foreach HTTP request sent.

Default Value

'initialize'

tags?: string[]

A list of strings to any that identify the general purpose or important characteristics of a given handler.