Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MiddlewareStack<Input, Output>

Type parameters

  • Input: object

  • Output: object

Hierarchy

Index

Properties

applyToStack

applyToStack: (stack: MiddlewareStack<Input, Output>) => void

A function that mutate the passed in middleware stack. Functions implementing this interface can add, remove, modify existing middleware stack from clients or commands

Type declaration

Methods

add

addRelativeTo

clone

concat

  • Create a stack containing the middlewares in this stack as well as the middlewares in the from stack. Neither source is modified, and step bindings and handler priorities and tags are preserved in the copy.

    Type parameters

    • InputType: Input

    • OutputType: Output

    Parameters

    Returns MiddlewareStack<InputType, OutputType>

identify

  • identify(): string[]
  • Returns a list of the current order of middleware in the stack. This does not execute the middleware functions, nor does it provide a reference to the stack itself.

    Returns string[]

remove

  • Removes middleware from the stack.

    If a string is provided, it will be treated as middleware name. If a middleware is inserted with the given name, it will be removed.

    If a middleware class is provided, all usages thereof will be removed.

    Parameters

    Returns boolean

removeByTag

  • removeByTag(toRemove: string): boolean
  • Removes middleware that contains given tag

    Multiple middleware will potentially be removed

    Parameters

    • toRemove: string

    Returns boolean

resolve

  • Builds a single handler function from zero or more middleware classes and a core handler. The core handler is meant to send command objects to AWS services and return promises that will resolve with the operation result or be rejected with an error.

    When a composed handler is invoked, the arguments will pass through all middleware in a defined order, and the return from the innermost handler will pass through all middleware in the reverse of that order.

    Type parameters

    • InputType: Input

    • OutputType: Output

    Parameters

    Returns InitializeHandler<InputType, OutputType>

use

  • use(pluggable: Pluggable<Input, Output>): void
  • Apply a customization function to mutate the middleware stack, often used for customizations that requires mutating multiple middleware.

    Parameters

    Returns void