• Version 3.525.0
  • Published
  • 25.8 kB
  • 5 dependencies
  • Apache-2.0 license


npm i @aws-sdk/middleware-user-agent
yarn add @aws-sdk/middleware-user-agent
pnpm add @aws-sdk/middleware-user-agent


[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-user-agent/latest.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-user-agent) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-user-agent.svg)](https://www.npmjs.c



variable getUserAgentMiddlewareOptions

const getUserAgentMiddlewareOptions: any;


    function getUserAgentPlugin

    getUserAgentPlugin: (config: UserAgentResolvedConfig) => Pluggable<any, any>;

      function resolveUserAgentConfig

      resolveUserAgentConfig: <T>(
      input: T & PreviouslyResolved & UserAgentInputConfig
      ) => T & UserAgentResolvedConfig;

        function userAgentMiddleware

        userAgentMiddleware: (
        options: UserAgentResolvedConfig
        ) => <Output extends MetadataBearer>(
        next: BuildHandler<any, any>,
        context: HandlerExecutionContext
        ) => BuildHandler<any, any>;
        • Build user agent header sections from: 1. runtime-specific default user agent provider; 2. custom user agent from customUserAgent client config; 3. handler execution context set by internal SDK components; The built user agent will be set to x-amz-user-agent header for ALL the runtimes. Please note that any override to the user-agent or x-amz-user-agent header in the HTTP request is discouraged. Please use customUserAgent client config or middleware setting the userAgent context to generate desired user agent.


        interface UserAgentInputConfig

        interface UserAgentInputConfig {}
        • Modifiers

          • @public

        property customUserAgent

        customUserAgent?: string | UserAgent;
        • The custom user agent header that would be appended to default one

        interface UserAgentResolvedConfig

        interface UserAgentResolvedConfig {}

          property customUserAgent

          customUserAgent?: UserAgent;
          • The custom user agent header that would be appended to default one

          property runtime

          runtime: string;
          • The runtime environment

          Package Files (3)

          Dependencies (5)

          Dev Dependencies (5)

          Peer Dependencies (0)

          No peer dependencies.


          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@aws-sdk/middleware-user-agent.

          • Markdown
          • HTML
            <a href="https://www.jsdocs.io/package/@aws-sdk/middleware-user-agent"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>