Class: AWS.ApiGatewayV2

Inherits:
AWS.Service show all
Identifier:
apigatewayv2
API Version:
2018-11-29
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon API Gateway V2

Sending a Request Using ApiGatewayV2

var apigatewayv2 = new AWS.ApiGatewayV2();
apigatewayv2.createApi(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the ApiGatewayV2 object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var apigatewayv2 = new AWS.ApiGatewayV2({apiVersion: '2018-11-29'});

You can also set the API version globally in AWS.config.apiVersions using the apigatewayv2 service identifier:

AWS.config.apiVersions = {
  apigatewayv2: '2018-11-29',
  // other service API versions
};

var apigatewayv2 = new AWS.ApiGatewayV2();

Version:

  • 2018-11-29

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.ApiGatewayV2(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a ApiGatewayV2 object

var apigatewayv2 = new AWS.ApiGatewayV2({apiVersion: '2018-11-29'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.ApiGatewayV2.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.ApiGatewayV2.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.ApiGatewayV2.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createApi(params = {}, callback) ⇒ AWS.Request

Creates an Api resource.

Service Reference:

Examples:

Calling the createApi operation

var params = {
  Name: 'STRING_VALUE', /* required */
  ProtocolType: WEBSOCKET | HTTP, /* required */
  ApiKeySelectionExpression: 'STRING_VALUE',
  CorsConfiguration: {
    AllowCredentials: true || false,
    AllowHeaders: [
      'STRING_VALUE',
      /* more items */
    ],
    AllowMethods: [
      'STRING_VALUE',
      /* more items */
    ],
    AllowOrigins: [
      'STRING_VALUE',
      /* more items */
    ],
    ExposeHeaders: [
      'STRING_VALUE',
      /* more items */
    ],
    MaxAge: 'NUMBER_VALUE'
  },
  CredentialsArn: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DisableSchemaValidation: true || false,
  RouteKey: 'STRING_VALUE',
  RouteSelectionExpression: 'STRING_VALUE',
  Tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  Target: 'STRING_VALUE',
  Version: 'STRING_VALUE'
};
apigatewayv2.createApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiKeySelectionExpression — (String)

      An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

    • CorsConfiguration — (map)

      A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

      • AllowCredentials — (Boolean)

        Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

      • AllowHeaders — (Array<String>)

        Represents a collection of allowed headers. Supported only for HTTP APIs.

      • AllowMethods — (Array<String>)

        Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

      • AllowOrigins — (Array<String>)

        Represents a collection of allowed origins. Supported only for HTTP APIs.

      • ExposeHeaders — (Array<String>)

        Represents a collection of exposed headers. Supported only for HTTP APIs.

      • MaxAge — (Integer)

        The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

    • CredentialsArn — (String)

      This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.

    • Description — (String)

      The description of the API.

    • DisableSchemaValidation — (Boolean)

      Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

    • Name — (String)

      The name of the API.

    • ProtocolType — (String)

      The API protocol.

      Possible values include:
      • "WEBSOCKET"
      • "HTTP"
    • RouteKey — (String)

      This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.

    • RouteSelectionExpression — (String)

      The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

    • Tags — (map<String>)

      The collection of tags. Each tag element is associated with a given resource.

    • Target — (String)

      This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.

    • Version — (String)

      A version identifier for the API.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiEndpoint — (String)

        The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

      • ApiId — (String)

        The API ID.

      • ApiKeySelectionExpression — (String)

        An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

      • CorsConfiguration — (map)

        A CORS configuration. Supported only for HTTP APIs.

        • AllowCredentials — (Boolean)

          Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

        • AllowHeaders — (Array<String>)

          Represents a collection of allowed headers. Supported only for HTTP APIs.

        • AllowMethods — (Array<String>)

          Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

        • AllowOrigins — (Array<String>)

          Represents a collection of allowed origins. Supported only for HTTP APIs.

        • ExposeHeaders — (Array<String>)

          Represents a collection of exposed headers. Supported only for HTTP APIs.

        • MaxAge — (Integer)

          The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

      • CreatedDate — (Date)

        The timestamp when the API was created.

      • Description — (String)

        The description of the API.

      • DisableSchemaValidation — (Boolean)

        Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

      • ImportInfo — (Array<String>)

        The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

      • Name — (String)

        The name of the API.

      • ProtocolType — (String)

        The API protocol.

        Possible values include:
        • "WEBSOCKET"
        • "HTTP"
      • RouteSelectionExpression — (String)

        The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

      • Tags — (map<String>)

        A collection of tags associated with the API.

      • Version — (String)

        A version identifier for the API.

      • Warnings — (Array<String>)

        The warning messages reported when failonwarnings is turned on during API import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createApiMapping(params = {}, callback) ⇒ AWS.Request

Creates an API mapping.

Service Reference:

Examples:

Calling the createApiMapping operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  DomainName: 'STRING_VALUE', /* required */
  Stage: 'STRING_VALUE', /* required */
  ApiMappingKey: 'STRING_VALUE'
};
apigatewayv2.createApiMapping(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ApiMappingKey — (String) The API mapping key.
    • DomainName — (String)

      The domain name.

    • Stage — (String)

      The API stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiId — (String)

        The API identifier.

      • ApiMappingId — (String)

        The API mapping identifier.

      • ApiMappingKey — (String)

        The API mapping key.

      • Stage — (String)

        The API stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAuthorizer(params = {}, callback) ⇒ AWS.Request

Creates an Authorizer for an API.

Service Reference:

Examples:

Calling the createAuthorizer operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  AuthorizerType: REQUEST | JWT, /* required */
  IdentitySource: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  Name: 'STRING_VALUE', /* required */
  AuthorizerCredentialsArn: 'STRING_VALUE',
  AuthorizerResultTtlInSeconds: 'NUMBER_VALUE',
  AuthorizerUri: 'STRING_VALUE',
  IdentityValidationExpression: 'STRING_VALUE',
  JwtConfiguration: {
    Audience: [
      'STRING_VALUE',
      /* more items */
    ],
    Issuer: 'STRING_VALUE'
  }
};
apigatewayv2.createAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • AuthorizerCredentialsArn — (String)

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.

    • AuthorizerResultTtlInSeconds — (Integer)

      Authorizer caching is not currently supported. Don't specify this value for authorizers.

    • AuthorizerType — (String)

      The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

      Possible values include:
      • "REQUEST"
      • "JWT"
    • AuthorizerUri — (String)

      The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

    • IdentitySource — (Array<String>)

      The identity source for which authorization is requested.

      For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

      For JWT, a single entry that specifies where to extract the JSON Web Token (JWT )from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

    • IdentityValidationExpression — (String)

      This parameter is not used.

    • JwtConfiguration — (map)

      Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

      • Audience — (Array<String>)

        A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

      • Issuer — (String)

        The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

    • Name — (String)

      The name of the authorizer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AuthorizerCredentialsArn — (String)

        Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.

      • AuthorizerId — (String)

        The authorizer identifier.

      • AuthorizerResultTtlInSeconds — (Integer)

        Authorizer caching is not currently supported. Don't specify this value for authorizers.

      • AuthorizerType — (String)

        The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

        Possible values include:
        • "REQUEST"
        • "JWT"
      • AuthorizerUri — (String)

        The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

      • IdentitySource — (Array<String>)

        The identity source for which authorization is requested.

        For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

        For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

      • IdentityValidationExpression — (String)

        The validation expression does not apply to the REQUEST authorizer.

      • JwtConfiguration — (map)

        Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

        • Audience — (Array<String>)

          A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

        • Issuer — (String)

          The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

      • Name — (String)

        The name of the authorizer.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDeployment(params = {}, callback) ⇒ AWS.Request

Creates a Deployment for an API.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  StageName: 'STRING_VALUE'
};
apigatewayv2.createDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • Description — (String)

      The description for the deployment resource.

    • StageName — (String)

      The name of the Stage resource for the Deployment resource to create.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AutoDeployed — (Boolean)

        Specifies whether a deployment was automatically released.

      • CreatedDate — (Date)

        The date and time when the Deployment resource was created.

      • DeploymentId — (String)

        The identifier for the deployment.

      • DeploymentStatus — (String)

        The status of the deployment: PENDING, FAILED, or SUCCEEDED.

        Possible values include:
        • "PENDING"
        • "FAILED"
        • "DEPLOYED"
      • DeploymentStatusMessage — (String)

        May contain additional feedback on the status of an API deployment.

      • Description — (String)

        The description for the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDomainName(params = {}, callback) ⇒ AWS.Request

Creates a domain name.

Service Reference:

Examples:

Calling the createDomainName operation

var params = {
  DomainName: 'STRING_VALUE', /* required */
  DomainNameConfigurations: [
    {
      ApiGatewayDomainName: 'STRING_VALUE',
      CertificateArn: 'STRING_VALUE',
      CertificateName: 'STRING_VALUE',
      CertificateUploadDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
      DomainNameStatus: AVAILABLE | UPDATING,
      DomainNameStatusMessage: 'STRING_VALUE',
      EndpointType: REGIONAL | EDGE,
      HostedZoneId: 'STRING_VALUE',
      SecurityPolicy: TLS_1_0 | TLS_1_2
    },
    /* more items */
  ],
  Tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
apigatewayv2.createDomainName(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DomainName — (String)

      The domain name.

    • DomainNameConfigurations — (Array<map>)

      The domain name configurations.

      • ApiGatewayDomainName — (String)

        A domain name for the API.

      • CertificateArn — (String)

        An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

      • CertificateName — (String)

        The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

      • CertificateUploadDate — (Date)

        The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

      • DomainNameStatus — (String)

        The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

        Possible values include:
        • "AVAILABLE"
        • "UPDATING"
      • DomainNameStatusMessage — (String)

        An optional text message containing detailed information about status of the domain name migration.

      • EndpointType — (String)

        The endpoint type.

        Possible values include:
        • "REGIONAL"
        • "EDGE"
      • HostedZoneId — (String)

        The Amazon Route 53 Hosted Zone ID of the endpoint.

      • SecurityPolicy — (String)

        The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

        Possible values include:
        • "TLS_1_0"
        • "TLS_1_2"
    • Tags — (map<String>)

      The collection of tags associated with a domain name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiMappingSelectionExpression — (String)

        The API mapping selection expression.

      • DomainName — (String)

        The name of the DomainName resource.

      • DomainNameConfigurations — (Array<map>)

        The domain name configurations.

        • ApiGatewayDomainName — (String)

          A domain name for the API.

        • CertificateArn — (String)

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName — (String)

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate — (Date)

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus — (String)

          The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

          Possible values include:
          • "AVAILABLE"
          • "UPDATING"
        • DomainNameStatusMessage — (String)

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType — (String)

          The endpoint type.

          Possible values include:
          • "REGIONAL"
          • "EDGE"
        • HostedZoneId — (String)

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • SecurityPolicy — (String)

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

          Possible values include:
          • "TLS_1_0"
          • "TLS_1_2"
      • Tags — (map<String>)

        The collection of tags associated with a domain name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createIntegration(params = {}, callback) ⇒ AWS.Request

Creates an Integration.

Service Reference:

Examples:

Calling the createIntegration operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationType: AWS | HTTP | MOCK | HTTP_PROXY | AWS_PROXY, /* required */
  ConnectionId: 'STRING_VALUE',
  ConnectionType: INTERNET | VPC_LINK,
  ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  CredentialsArn: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  IntegrationMethod: 'STRING_VALUE',
  IntegrationUri: 'STRING_VALUE',
  PassthroughBehavior: WHEN_NO_MATCH | NEVER | WHEN_NO_TEMPLATES,
  PayloadFormatVersion: 'STRING_VALUE',
  RequestParameters: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  RequestTemplates: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  TemplateSelectionExpression: 'STRING_VALUE',
  TimeoutInMillis: 'NUMBER_VALUE'
};
apigatewayv2.createIntegration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ConnectionId — (String)

      The connection ID.

    • ConnectionType — (String)

      The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

      Possible values include:
      • "INTERNET"
      • "VPC_LINK"
    • ContentHandlingStrategy — (String)

      Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

      If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"
    • CredentialsArn — (String)

      Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

    • Description — (String)

      The description of the integration.

    • IntegrationMethod — (String)

      Specifies the integration's HTTP method type.

    • IntegrationType — (String)

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

      MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

      Possible values include:
      • "AWS"
      • "HTTP"
      • "MOCK"
      • "HTTP_PROXY"
      • "AWS_PROXY"
    • IntegrationUri — (String)

      For a Lambda proxy integration, this is the URI of the Lambda function.

    • PassthroughBehavior — (String)

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

      Possible values include:
      • "WHEN_NO_MATCH"
      • "NEVER"
      • "WHEN_NO_TEMPLATES"
    • PayloadFormatVersion — (String)

      Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

    • RequestParameters — (map<String>)

      A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

    • RequestTemplates — (map<String>)

      Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

    • TemplateSelectionExpression — (String)

      The template selection expression for the integration.

    • TimeoutInMillis — (Integer)

      Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.

      • ConnectionId — (String)

        The connection ID.

      • ConnectionType — (String)

        The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

        Possible values include:
        • "INTERNET"
        • "VPC_LINK"
      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • CredentialsArn — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

      • Description — (String)

        Represents the description of an integration.

      • IntegrationId — (String)

        Represents the identifier of an integration.

      • IntegrationMethod — (String)

        Specifies the integration's HTTP method type.

      • IntegrationResponseSelectionExpression — (String)

        The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

      • IntegrationType — (String)

        The integration type of an integration. One of the following:

        AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

        AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

        HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

        HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

        MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

        Possible values include:
        • "AWS"
        • "HTTP"
        • "MOCK"
        • "HTTP_PROXY"
        • "AWS_PROXY"
      • IntegrationUri — (String)

        For a Lambda proxy integration, this is the URI of the Lambda function.

      • PassthroughBehavior — (String)

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

        WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

        Possible values include:
        • "WHEN_NO_MATCH"
        • "NEVER"
        • "WHEN_NO_TEMPLATES"
      • PayloadFormatVersion — (String)

        Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

      • RequestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

      • RequestTemplates — (map<String>)

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

      • TemplateSelectionExpression — (String)

        The template selection expression for the integration. Supported only for WebSocket APIs.

      • TimeoutInMillis — (Integer)

        Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createIntegrationResponse(params = {}, callback) ⇒ AWS.Request

Creates an IntegrationResponses.

Service Reference:

Examples:

Calling the createIntegrationResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  IntegrationResponseKey: 'STRING_VALUE', /* required */
  ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  ResponseParameters: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  ResponseTemplates: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  TemplateSelectionExpression: 'STRING_VALUE'
};
apigatewayv2.createIntegrationResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ContentHandlingStrategy — (String)

      Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

      If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"
    • IntegrationId — (String)

      The integration ID.

    • IntegrationResponseKey — (String)

      The integration response key.

    • ResponseParameters — (map<String>)

      A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where {name} is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where {name} is a valid and unique response header name and {JSON-expression} is a valid JSON expression without the $ prefix.

    • ResponseTemplates — (map<String>)

      The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

    • TemplateSelectionExpression — (String)

      The template selection expression for the integration response. Supported only for WebSocket APIs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • IntegrationResponseId — (String)

        The integration response ID.

      • IntegrationResponseKey — (String)

        The integration response key.

      • ResponseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

      • ResponseTemplates — (map<String>)

        The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • TemplateSelectionExpression — (String)

        The template selection expressions for the integration response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createModel(params = {}, callback) ⇒ AWS.Request

Creates a Model for an API.

Service Reference:

Examples:

Calling the createModel operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Schema: 'STRING_VALUE', /* required */
  ContentType: 'STRING_VALUE',
  Description: 'STRING_VALUE'
};
apigatewayv2.createModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ContentType — (String)

      The content-type for the model, for example, "application/json".

    • Description — (String)

      The description of the model.

    • Name — (String)

      The name of the model. Must be alphanumeric.

    • Schema — (String)

      The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentType — (String)

        The content-type for the model, for example, "application/json".

      • Description — (String)

        The description of the model.

      • ModelId — (String)

        The model identifier.

      • Name — (String)

        The name of the model. Must be alphanumeric.

      • Schema — (String)

        The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRoute(params = {}, callback) ⇒ AWS.Request

Creates a Route for an API.

Service Reference:

Examples:

Calling the createRoute operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteKey: 'STRING_VALUE', /* required */
  ApiKeyRequired: true || false,
  AuthorizationScopes: [
    'STRING_VALUE',
    /* more items */
  ],
  AuthorizationType: NONE | AWS_IAM | CUSTOM | JWT,
  AuthorizerId: 'STRING_VALUE',
  ModelSelectionExpression: 'STRING_VALUE',
  OperationName: 'STRING_VALUE',
  RequestModels: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  RequestParameters: {
    '<__string>': {
      Required: true || false
    },
    /* '<__string>': ... */
  },
  RouteResponseSelectionExpression: 'STRING_VALUE',
  Target: 'STRING_VALUE'
};
apigatewayv2.createRoute(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ApiKeyRequired — (Boolean)

      Specifies whether an API key is required for the route. Supported only for WebSocket APIs.

    • AuthorizationScopes — (Array<String>)

      The authorization scopes supported by this route.

    • AuthorizationType — (String)

      The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

      Possible values include:
      • "NONE"
      • "AWS_IAM"
      • "CUSTOM"
      • "JWT"
    • AuthorizerId — (String)

      The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

    • ModelSelectionExpression — (String)

      The model selection expression for the route. Supported only for WebSocket APIs.

    • OperationName — (String)

      The operation name for the route.

    • RequestModels — (map<String>)

      The request models for the route. Supported only for WebSocket APIs.

    • RequestParameters — (map<map>)

      The request parameters for the route. Supported only for WebSocket APIs.

      • Required — (Boolean)

        Whether or not the parameter is required.

    • RouteKey — (String)

      The route key for the route.

    • RouteResponseSelectionExpression — (String)

      The route response selection expression for the route. Supported only for WebSocket APIs.

    • Target — (String)

      The target for the route.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.

      • ApiKeyRequired — (Boolean)

        Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

      • AuthorizationScopes — (Array<String>)

        A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

      • AuthorizationType — (String)

        The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

        Possible values include:
        • "NONE"
        • "AWS_IAM"
        • "CUSTOM"
        • "JWT"
      • AuthorizerId — (String)

        The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

      • ModelSelectionExpression — (String)

        The model selection expression for the route. Supported only for WebSocket APIs.

      • OperationName — (String)

        The operation name for the route.

      • RequestModels — (map<String>)

        The request models for the route. Supported only for WebSocket APIs.

      • RequestParameters — (map<map>)

        The request parameters for the route. Supported only for WebSocket APIs.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteId — (String)

        The route ID.

      • RouteKey — (String)

        The route key for the route.

      • RouteResponseSelectionExpression — (String)

        The route response selection expression for the route. Supported only for WebSocket APIs.

      • Target — (String)

        The target for the route.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRouteResponse(params = {}, callback) ⇒ AWS.Request

Creates a RouteResponse for a Route.

Service Reference:

Examples:

Calling the createRouteResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  RouteResponseKey: 'STRING_VALUE', /* required */
  ModelSelectionExpression: 'STRING_VALUE',
  ResponseModels: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  ResponseParameters: {
    '<__string>': {
      Required: true || false
    },
    /* '<__string>': ... */
  }
};
apigatewayv2.createRouteResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ModelSelectionExpression — (String)

      The model selection expression for the route response. Supported only for WebSocket APIs.

    • ResponseModels — (map<String>)

      The response models for the route response.

    • ResponseParameters — (map<map>)

      The route response parameters.

      • Required — (Boolean)

        Whether or not the parameter is required.

    • RouteId — (String)

      The route ID.

    • RouteResponseKey — (String)

      The route response key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ModelSelectionExpression — (String)

        Represents the model selection expression of a route response. Supported only for WebSocket APIs.

      • ResponseModels — (map<String>)

        Represents the response models of a route response.

      • ResponseParameters — (map<map>)

        Represents the response parameters of a route response.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteResponseId — (String)

        Represents the identifier of a route response.

      • RouteResponseKey — (String)

        Represents the route response key of a route response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createStage(params = {}, callback) ⇒ AWS.Request

Creates a Stage for an API.

Service Reference:

Examples:

Calling the createStage operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  AccessLogSettings: {
    DestinationArn: 'STRING_VALUE',
    Format: 'STRING_VALUE'
  },
  AutoDeploy: true || false,
  ClientCertificateId: 'STRING_VALUE',
  DefaultRouteSettings: {
    DataTraceEnabled: true || false,
    DetailedMetricsEnabled: true || false,
    LoggingLevel: ERROR | INFO | false,
    ThrottlingBurstLimit: 'NUMBER_VALUE',
    ThrottlingRateLimit: 'NUMBER_VALUE'
  },
  DeploymentId: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  RouteSettings: {
    '<__string>': {
      DataTraceEnabled: true || false,
      DetailedMetricsEnabled: true || false,
      LoggingLevel: ERROR | INFO | false,
      ThrottlingBurstLimit: 'NUMBER_VALUE',
      ThrottlingRateLimit: 'NUMBER_VALUE'
    },
    /* '<__string>': ... */
  },
  StageVariables: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  Tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
apigatewayv2.createStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccessLogSettings — (map)

      Settings for logging access in this stage.

      • DestinationArn — (String)

        The ARN of the CloudWatch Logs log group to receive access logs.

      • Format — (String)

        A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

    • ApiId — (String)

      The API identifier.

    • AutoDeploy — (Boolean)

      Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

    • ClientCertificateId — (String)

      The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.

    • DefaultRouteSettings — (map)

      The default route settings for the stage.

      • DataTraceEnabled — (Boolean)

        Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

      • DetailedMetricsEnabled — (Boolean)

        Specifies whether detailed metrics are enabled.

      • LoggingLevel — (String)

        Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        Possible values include:
        • "ERROR"
        • "INFO"
        • "false"
      • ThrottlingBurstLimit — (Integer)

        Specifies the throttling burst limit. Supported only for WebSocket APIs.

      • ThrottlingRateLimit — (Float)

        Specifies the throttling rate limit. Supported only for WebSocket APIs.

    • DeploymentId — (String)

      The deployment identifier of the API stage.

    • Description — (String)

      The description for the API stage.

    • RouteSettings — (map<map>)

      Route settings for the stage, by routeKey.

      • DataTraceEnabled — (Boolean)

        Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

      • DetailedMetricsEnabled — (Boolean)

        Specifies whether detailed metrics are enabled.

      • LoggingLevel — (String)

        Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        Possible values include:
        • "ERROR"
        • "INFO"
        • "false"
      • ThrottlingBurstLimit — (Integer)

        Specifies the throttling burst limit. Supported only for WebSocket APIs.

      • ThrottlingRateLimit — (Float)

        Specifies the throttling rate limit. Supported only for WebSocket APIs.

    • StageName — (String)

      The name of the stage.

    • StageVariables — (map<String>)

      A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

    • Tags — (map<String>)

      The collection of tags. Each tag element is associated with a given resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AccessLogSettings — (map)

        Settings for logging access in this stage.

        • DestinationArn — (String)

          The ARN of the CloudWatch Logs log group to receive access logs.

        • Format — (String)

          A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • ApiGatewayManaged — (Boolean)

        Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.

      • AutoDeploy — (Boolean)

        Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

      • ClientCertificateId — (String)

        The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.

      • CreatedDate — (Date)

        The timestamp when the stage was created.

      • DefaultRouteSettings — (map)

        Default route settings for the stage.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • DeploymentId — (String)

        The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.

      • Description — (String)

        The description of the stage.

      • LastDeploymentStatusMessage — (String)

        Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.

      • LastUpdatedDate — (Date)

        The timestamp when the stage was last updated.

      • RouteSettings — (map<map>)

        Route settings for the stage, by routeKey.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • StageName — (String)

        The name of the stage.

      • StageVariables — (map<String>)

        A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

      • Tags — (map<String>)

        The collection of tags. Each tag element is associated with a given resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApi(params = {}, callback) ⇒ AWS.Request

Deletes an Api resource.

Service Reference:

Examples:

Calling the deleteApi operation

var params = {
  ApiId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApiMapping(params = {}, callback) ⇒ AWS.Request

Deletes an API mapping.

Service Reference:

Examples:

Calling the deleteApiMapping operation

var params = {
  ApiMappingId: 'STRING_VALUE', /* required */
  DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteApiMapping(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiMappingId — (String)

      The API mapping identifier.

    • DomainName — (String)

      The domain name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAuthorizer(params = {}, callback) ⇒ AWS.Request

Deletes an Authorizer.

Service Reference:

Examples:

Calling the deleteAuthorizer operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  AuthorizerId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • AuthorizerId — (String)

      The authorizer identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCorsConfiguration(params = {}, callback) ⇒ AWS.Request

Deletes a CORS configuration.

Service Reference:

Examples:

Calling the deleteCorsConfiguration operation

var params = {
  ApiId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteCorsConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDeployment(params = {}, callback) ⇒ AWS.Request

Deletes a Deployment.

Service Reference:

Examples:

Calling the deleteDeployment operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  DeploymentId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • DeploymentId — (String)

      The deployment ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDomainName(params = {}, callback) ⇒ AWS.Request

Deletes a domain name.

Service Reference:

Examples:

Calling the deleteDomainName operation

var params = {
  DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteDomainName(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DomainName — (String)

      The domain name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteIntegration(params = {}, callback) ⇒ AWS.Request

Deletes an Integration.

Service Reference:

Examples:

Calling the deleteIntegration operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteIntegration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • IntegrationId — (String)

      The integration ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteIntegrationResponse(params = {}, callback) ⇒ AWS.Request

Deletes an IntegrationResponses.

Service Reference:

Examples:

Calling the deleteIntegrationResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  IntegrationResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteIntegrationResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • IntegrationId — (String)

      The integration ID.

    • IntegrationResponseId — (String)

      The integration response ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteModel(params = {}, callback) ⇒ AWS.Request

Deletes a Model.

Service Reference:

Examples:

Calling the deleteModel operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ModelId — (String)

      The model ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRoute(params = {}, callback) ⇒ AWS.Request

Deletes a Route.

Service Reference:

Examples:

Calling the deleteRoute operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteRoute(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • RouteId — (String)

      The route ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRouteResponse(params = {}, callback) ⇒ AWS.Request

Deletes a RouteResponse.

Service Reference:

Examples:

Calling the deleteRouteResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  RouteResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteRouteResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • RouteId — (String)

      The route ID.

    • RouteResponseId — (String)

      The route response ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRouteSettings(params = {}, callback) ⇒ AWS.Request

Deletes the RouteSettings for a stage.

Service Reference:

Examples:

Calling the deleteRouteSettings operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteKey: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteRouteSettings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • RouteKey — (String)

      The route key.

    • StageName — (String)

      The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteStage(params = {}, callback) ⇒ AWS.Request

Deletes a Stage.

Service Reference:

Examples:

Calling the deleteStage operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • StageName — (String)

      The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApi(params = {}, callback) ⇒ AWS.Request

Gets an Api resource.

Service Reference:

Examples:

Calling the getApi operation

var params = {
  ApiId: 'STRING_VALUE' /* required */
};
apigatewayv2.getApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiEndpoint — (String)

        The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

      • ApiId — (String)

        The API ID.

      • ApiKeySelectionExpression — (String)

        An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

      • CorsConfiguration — (map)

        A CORS configuration. Supported only for HTTP APIs.

        • AllowCredentials — (Boolean)

          Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

        • AllowHeaders — (Array<String>)

          Represents a collection of allowed headers. Supported only for HTTP APIs.

        • AllowMethods — (Array<String>)

          Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

        • AllowOrigins — (Array<String>)

          Represents a collection of allowed origins. Supported only for HTTP APIs.

        • ExposeHeaders — (Array<String>)

          Represents a collection of exposed headers. Supported only for HTTP APIs.

        • MaxAge — (Integer)

          The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

      • CreatedDate — (Date)

        The timestamp when the API was created.

      • Description — (String)

        The description of the API.

      • DisableSchemaValidation — (Boolean)

        Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

      • ImportInfo — (Array<String>)

        The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

      • Name — (String)

        The name of the API.

      • ProtocolType — (String)

        The API protocol.

        Possible values include:
        • "WEBSOCKET"
        • "HTTP"
      • RouteSelectionExpression — (String)

        The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

      • Tags — (map<String>)

        A collection of tags associated with the API.

      • Version — (String)

        A version identifier for the API.

      • Warnings — (Array<String>)

        The warning messages reported when failonwarnings is turned on during API import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApiMapping(params = {}, callback) ⇒ AWS.Request

Gets an API mapping.

Service Reference:

Examples:

Calling the getApiMapping operation

var params = {
  ApiMappingId: 'STRING_VALUE', /* required */
  DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.getApiMapping(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiMappingId — (String)

      The API mapping identifier.

    • DomainName — (String)

      The domain name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiId — (String)

        The API identifier.

      • ApiMappingId — (String)

        The API mapping identifier.

      • ApiMappingKey — (String)

        The API mapping key.

      • Stage — (String)

        The API stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApiMappings(params = {}, callback) ⇒ AWS.Request

Gets API mappings.

Service Reference:

Examples:

Calling the getApiMappings operation

var params = {
  DomainName: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getApiMappings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DomainName — (String)

      The domain name.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ApiIdrequired — (String)

          The API identifier.

        • ApiMappingId — (String)

          The API mapping identifier.

        • ApiMappingKey — (String)

          The API mapping key.

        • Stagerequired — (String)

          The API stage.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApis(params = {}, callback) ⇒ AWS.Request

Gets a collection of Api resources.

Service Reference:

Examples:

Calling the getApis operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getApis(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ApiEndpoint — (String)

          The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

        • ApiId — (String)

          The API ID.

        • ApiKeySelectionExpression — (String)

          An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

        • CorsConfiguration — (map)

          A CORS configuration. Supported only for HTTP APIs.

          • AllowCredentials — (Boolean)

            Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

          • AllowHeaders — (Array<String>)

            Represents a collection of allowed headers. Supported only for HTTP APIs.

          • AllowMethods — (Array<String>)

            Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

          • AllowOrigins — (Array<String>)

            Represents a collection of allowed origins. Supported only for HTTP APIs.

          • ExposeHeaders — (Array<String>)

            Represents a collection of exposed headers. Supported only for HTTP APIs.

          • MaxAge — (Integer)

            The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

        • CreatedDate — (Date)

          The timestamp when the API was created.

        • Description — (String)

          The description of the API.

        • DisableSchemaValidation — (Boolean)

          Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

        • ImportInfo — (Array<String>)

          The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

        • Namerequired — (String)

          The name of the API.

        • ProtocolTyperequired — (String)

          The API protocol.

          Possible values include:
          • "WEBSOCKET"
          • "HTTP"
        • RouteSelectionExpressionrequired — (String)

          The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

        • Tags — (map<String>)

          A collection of tags associated with the API.

        • Version — (String)

          A version identifier for the API.

        • Warnings — (Array<String>)

          The warning messages reported when failonwarnings is turned on during API import.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAuthorizer(params = {}, callback) ⇒ AWS.Request

Gets an Authorizer.

Service Reference:

Examples:

Calling the getAuthorizer operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  AuthorizerId: 'STRING_VALUE' /* required */
};
apigatewayv2.getAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • AuthorizerId — (String)

      The authorizer identifier.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AuthorizerCredentialsArn — (String)

        Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.

      • AuthorizerId — (String)

        The authorizer identifier.

      • AuthorizerResultTtlInSeconds — (Integer)

        Authorizer caching is not currently supported. Don't specify this value for authorizers.

      • AuthorizerType — (String)

        The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

        Possible values include:
        • "REQUEST"
        • "JWT"
      • AuthorizerUri — (String)

        The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

      • IdentitySource — (Array<String>)

        The identity source for which authorization is requested.

        For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

        For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

      • IdentityValidationExpression — (String)

        The validation expression does not apply to the REQUEST authorizer.

      • JwtConfiguration — (map)

        Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

        • Audience — (Array<String>)

          A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

        • Issuer — (String)

          The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

      • Name — (String)

        The name of the authorizer.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAuthorizers(params = {}, callback) ⇒ AWS.Request

Gets the Authorizers for an API.

Service Reference:

Examples:

Calling the getAuthorizers operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getAuthorizers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • AuthorizerCredentialsArn — (String)

          Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.

        • AuthorizerId — (String)

          The authorizer identifier.

        • AuthorizerResultTtlInSeconds — (Integer)

          Authorizer caching is not currently supported. Don't specify this value for authorizers.

        • AuthorizerType — (String)

          The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

          Possible values include:
          • "REQUEST"
          • "JWT"
        • AuthorizerUri — (String)

          The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

        • IdentitySource — (Array<String>)

          The identity source for which authorization is requested.

          For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

          For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

        • IdentityValidationExpression — (String)

          The validation expression does not apply to the REQUEST authorizer.

        • JwtConfiguration — (map)

          Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

          • Audience — (Array<String>)

            A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

          • Issuer — (String)

            The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

        • Namerequired — (String)

          The name of the authorizer.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeployment(params = {}, callback) ⇒ AWS.Request

Gets a Deployment.

Service Reference:

Examples:

Calling the getDeployment operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  DeploymentId: 'STRING_VALUE' /* required */
};
apigatewayv2.getDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • DeploymentId — (String)

      The deployment ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AutoDeployed — (Boolean)

        Specifies whether a deployment was automatically released.

      • CreatedDate — (Date)

        The date and time when the Deployment resource was created.

      • DeploymentId — (String)

        The identifier for the deployment.

      • DeploymentStatus — (String)

        The status of the deployment: PENDING, FAILED, or SUCCEEDED.

        Possible values include:
        • "PENDING"
        • "FAILED"
        • "DEPLOYED"
      • DeploymentStatusMessage — (String)

        May contain additional feedback on the status of an API deployment.

      • Description — (String)

        The description for the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDeployments(params = {}, callback) ⇒ AWS.Request

Gets the Deployments for an API.

Service Reference:

Examples:

Calling the getDeployments operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getDeployments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • AutoDeployed — (Boolean)

          Specifies whether a deployment was automatically released.

        • CreatedDate — (Date)

          The date and time when the Deployment resource was created.

        • DeploymentId — (String)

          The identifier for the deployment.

        • DeploymentStatus — (String)

          The status of the deployment: PENDING, FAILED, or SUCCEEDED.

          Possible values include:
          • "PENDING"
          • "FAILED"
          • "DEPLOYED"
        • DeploymentStatusMessage — (String)

          May contain additional feedback on the status of an API deployment.

        • Description — (String)

          The description for the deployment.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDomainName(params = {}, callback) ⇒ AWS.Request

Gets a domain name.

Service Reference:

Examples:

Calling the getDomainName operation

var params = {
  DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.getDomainName(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DomainName — (String)

      The domain name.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiMappingSelectionExpression — (String)

        The API mapping selection expression.

      • DomainName — (String)

        The name of the DomainName resource.

      • DomainNameConfigurations — (Array<map>)

        The domain name configurations.

        • ApiGatewayDomainName — (String)

          A domain name for the API.

        • CertificateArn — (String)

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName — (String)

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate — (Date)

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus — (String)

          The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

          Possible values include:
          • "AVAILABLE"
          • "UPDATING"
        • DomainNameStatusMessage — (String)

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType — (String)

          The endpoint type.

          Possible values include:
          • "REGIONAL"
          • "EDGE"
        • HostedZoneId — (String)

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • SecurityPolicy — (String)

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

          Possible values include:
          • "TLS_1_0"
          • "TLS_1_2"
      • Tags — (map<String>)

        The collection of tags associated with a domain name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDomainNames(params = {}, callback) ⇒ AWS.Request

Gets the domain names for an AWS account.

Service Reference:

Examples:

Calling the getDomainNames operation

var params = {
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getDomainNames(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ApiMappingSelectionExpression — (String)

          The API mapping selection expression.

        • DomainNamerequired — (String)

          The name of the DomainName resource.

        • DomainNameConfigurations — (Array<map>)

          The domain name configurations.

          • ApiGatewayDomainName — (String)

            A domain name for the API.

          • CertificateArn — (String)

            An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

          • CertificateName — (String)

            The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

          • CertificateUploadDate — (Date)

            The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

          • DomainNameStatus — (String)

            The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

            Possible values include:
            • "AVAILABLE"
            • "UPDATING"
          • DomainNameStatusMessage — (String)

            An optional text message containing detailed information about status of the domain name migration.

          • EndpointType — (String)

            The endpoint type.

            Possible values include:
            • "REGIONAL"
            • "EDGE"
          • HostedZoneId — (String)

            The Amazon Route 53 Hosted Zone ID of the endpoint.

          • SecurityPolicy — (String)

            The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

            Possible values include:
            • "TLS_1_0"
            • "TLS_1_2"
        • Tags — (map<String>)

          The collection of tags associated with a domain name.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getIntegration(params = {}, callback) ⇒ AWS.Request

Gets an Integration.

Service Reference:

Examples:

Calling the getIntegration operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE' /* required */
};
apigatewayv2.getIntegration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • IntegrationId — (String)

      The integration ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.

      • ConnectionId — (String)

        The connection ID.

      • ConnectionType — (String)

        The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

        Possible values include:
        • "INTERNET"
        • "VPC_LINK"
      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • CredentialsArn — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

      • Description — (String)

        Represents the description of an integration.

      • IntegrationId — (String)

        Represents the identifier of an integration.

      • IntegrationMethod — (String)

        Specifies the integration's HTTP method type.

      • IntegrationResponseSelectionExpression — (String)

        The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

      • IntegrationType — (String)

        The integration type of an integration. One of the following:

        AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

        AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

        HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

        HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

        MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

        Possible values include:
        • "AWS"
        • "HTTP"
        • "MOCK"
        • "HTTP_PROXY"
        • "AWS_PROXY"
      • IntegrationUri — (String)

        For a Lambda proxy integration, this is the URI of the Lambda function.

      • PassthroughBehavior — (String)

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

        WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

        Possible values include:
        • "WHEN_NO_MATCH"
        • "NEVER"
        • "WHEN_NO_TEMPLATES"
      • PayloadFormatVersion — (String)

        Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

      • RequestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

      • RequestTemplates — (map<String>)

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

      • TemplateSelectionExpression — (String)

        The template selection expression for the integration. Supported only for WebSocket APIs.

      • TimeoutInMillis — (Integer)

        Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getIntegrationResponse(params = {}, callback) ⇒ AWS.Request

Gets an IntegrationResponses.

Service Reference:

Examples:

Calling the getIntegrationResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  IntegrationResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.getIntegrationResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • IntegrationId — (String)

      The integration ID.

    • IntegrationResponseId — (String)

      The integration response ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • IntegrationResponseId — (String)

        The integration response ID.

      • IntegrationResponseKey — (String)

        The integration response key.

      • ResponseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

      • ResponseTemplates — (map<String>)

        The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • TemplateSelectionExpression — (String)

        The template selection expressions for the integration response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getIntegrationResponses(params = {}, callback) ⇒ AWS.Request

Gets the IntegrationResponses for an Integration.

Service Reference:

Examples:

Calling the getIntegrationResponses operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getIntegrationResponses(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • IntegrationId — (String)

      The integration ID.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ContentHandlingStrategy — (String)

          Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

          CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

          CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

          If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

          Possible values include:
          • "CONVERT_TO_BINARY"
          • "CONVERT_TO_TEXT"
        • IntegrationResponseId — (String)

          The integration response ID.

        • IntegrationResponseKeyrequired — (String)

          The integration response key.

        • ResponseParameters — (map<String>)

          A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

        • ResponseTemplates — (map<String>)

          The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

        • TemplateSelectionExpression — (String)

          The template selection expressions for the integration response.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getIntegrations(params = {}, callback) ⇒ AWS.Request

Gets the Integrations for an API.

Service Reference:

Examples:

Calling the getIntegrations operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getIntegrations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ApiGatewayManaged — (Boolean)

          Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.

        • ConnectionId — (String)

          The connection ID.

        • ConnectionType — (String)

          The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

          Possible values include:
          • "INTERNET"
          • "VPC_LINK"
        • ContentHandlingStrategy — (String)

          Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

          CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

          CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

          If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

          Possible values include:
          • "CONVERT_TO_BINARY"
          • "CONVERT_TO_TEXT"
        • CredentialsArn — (String)

          Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

        • Description — (String)

          Represents the description of an integration.

        • IntegrationId — (String)

          Represents the identifier of an integration.

        • IntegrationMethod — (String)

          Specifies the integration's HTTP method type.

        • IntegrationResponseSelectionExpression — (String)

          The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

        • IntegrationType — (String)

          The integration type of an integration. One of the following:

          AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

          AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

          HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

          HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

          MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

          Possible values include:
          • "AWS"
          • "HTTP"
          • "MOCK"
          • "HTTP_PROXY"
          • "AWS_PROXY"
        • IntegrationUri — (String)

          For a Lambda proxy integration, this is the URI of the Lambda function.

        • PassthroughBehavior — (String)

          Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

          WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

          NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

          WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

          Possible values include:
          • "WHEN_NO_MATCH"
          • "NEVER"
          • "WHEN_NO_TEMPLATES"
        • PayloadFormatVersion — (String)

          Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

        • RequestParameters — (map<String>)

          A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

        • RequestTemplates — (map<String>)

          Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

        • TemplateSelectionExpression — (String)

          The template selection expression for the integration. Supported only for WebSocket APIs.

        • TimeoutInMillis — (Integer)

          Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getModel(params = {}, callback) ⇒ AWS.Request

Gets a Model.

Service Reference:

Examples:

Calling the getModel operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.getModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ModelId — (String)

      The model ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentType — (String)

        The content-type for the model, for example, "application/json".

      • Description — (String)

        The description of the model.

      • ModelId — (String)

        The model identifier.

      • Name — (String)

        The name of the model. Must be alphanumeric.

      • Schema — (String)

        The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getModels(params = {}, callback) ⇒ AWS.Request

Gets the Models for an API.

Service Reference:

Examples:

Calling the getModels operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getModels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ContentType — (String)

          The content-type for the model, for example, "application/json".

        • Description — (String)

          The description of the model.

        • ModelId — (String)

          The model identifier.

        • Namerequired — (String)

          The name of the model. Must be alphanumeric.

        • Schema — (String)

          The schema for the model. For application/json models, this should be JSON schema draft 4 model.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getModelTemplate(params = {}, callback) ⇒ AWS.Request

Gets a model template.

Service Reference:

Examples:

Calling the getModelTemplate operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.getModelTemplate(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ModelId — (String)

      The model ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Value — (String)

        The template value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRoute(params = {}, callback) ⇒ AWS.Request

Gets a Route.

Service Reference:

Examples:

Calling the getRoute operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE' /* required */
};
apigatewayv2.getRoute(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • RouteId — (String)

      The route ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.

      • ApiKeyRequired — (Boolean)

        Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

      • AuthorizationScopes — (Array<String>)

        A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

      • AuthorizationType — (String)

        The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

        Possible values include:
        • "NONE"
        • "AWS_IAM"
        • "CUSTOM"
        • "JWT"
      • AuthorizerId — (String)

        The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

      • ModelSelectionExpression — (String)

        The model selection expression for the route. Supported only for WebSocket APIs.

      • OperationName — (String)

        The operation name for the route.

      • RequestModels — (map<String>)

        The request models for the route. Supported only for WebSocket APIs.

      • RequestParameters — (map<map>)

        The request parameters for the route. Supported only for WebSocket APIs.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteId — (String)

        The route ID.

      • RouteKey — (String)

        The route key for the route.

      • RouteResponseSelectionExpression — (String)

        The route response selection expression for the route. Supported only for WebSocket APIs.

      • Target — (String)

        The target for the route.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRouteResponse(params = {}, callback) ⇒ AWS.Request

Gets a RouteResponse.

Service Reference:

Examples:

Calling the getRouteResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  RouteResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.getRouteResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • RouteId — (String)

      The route ID.

    • RouteResponseId — (String)

      The route response ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ModelSelectionExpression — (String)

        Represents the model selection expression of a route response. Supported only for WebSocket APIs.

      • ResponseModels — (map<String>)

        Represents the response models of a route response.

      • ResponseParameters — (map<map>)

        Represents the response parameters of a route response.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteResponseId — (String)

        Represents the identifier of a route response.

      • RouteResponseKey — (String)

        Represents the route response key of a route response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRouteResponses(params = {}, callback) ⇒ AWS.Request

Gets the RouteResponses for a Route.

Service Reference:

Examples:

Calling the getRouteResponses operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getRouteResponses(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

    • RouteId — (String)

      The route ID.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ModelSelectionExpression — (String)

          Represents the model selection expression of a route response. Supported only for WebSocket APIs.

        • ResponseModels — (map<String>)

          Represents the response models of a route response.

        • ResponseParameters — (map<map>)

          Represents the response parameters of a route response.

          • Required — (Boolean)

            Whether or not the parameter is required.

        • RouteResponseId — (String)

          Represents the identifier of a route response.

        • RouteResponseKeyrequired — (String)

          Represents the route response key of a route response.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRoutes(params = {}, callback) ⇒ AWS.Request

Gets the Routes for an API.

Service Reference:

Examples:

Calling the getRoutes operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getRoutes(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • ApiGatewayManaged — (Boolean)

          Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.

        • ApiKeyRequired — (Boolean)

          Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

        • AuthorizationScopes — (Array<String>)

          A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

        • AuthorizationType — (String)

          The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

          Possible values include:
          • "NONE"
          • "AWS_IAM"
          • "CUSTOM"
          • "JWT"
        • AuthorizerId — (String)

          The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

        • ModelSelectionExpression — (String)

          The model selection expression for the route. Supported only for WebSocket APIs.

        • OperationName — (String)

          The operation name for the route.

        • RequestModels — (map<String>)

          The request models for the route. Supported only for WebSocket APIs.

        • RequestParameters — (map<map>)

          The request parameters for the route. Supported only for WebSocket APIs.

          • Required — (Boolean)

            Whether or not the parameter is required.

        • RouteId — (String)

          The route ID.

        • RouteKeyrequired — (String)

          The route key for the route.

        • RouteResponseSelectionExpression — (String)

          The route response selection expression for the route. Supported only for WebSocket APIs.

        • Target — (String)

          The target for the route.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStage(params = {}, callback) ⇒ AWS.Request

Gets a Stage.

Service Reference:

Examples:

Calling the getStage operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE' /* required */
};
apigatewayv2.getStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • StageName — (String)

      The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AccessLogSettings — (map)

        Settings for logging access in this stage.

        • DestinationArn — (String)

          The ARN of the CloudWatch Logs log group to receive access logs.

        • Format — (String)

          A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • ApiGatewayManaged — (Boolean)

        Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.

      • AutoDeploy — (Boolean)

        Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

      • ClientCertificateId — (String)

        The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.

      • CreatedDate — (Date)

        The timestamp when the stage was created.

      • DefaultRouteSettings — (map)

        Default route settings for the stage.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • DeploymentId — (String)

        The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.

      • Description — (String)

        The description of the stage.

      • LastDeploymentStatusMessage — (String)

        Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.

      • LastUpdatedDate — (Date)

        The timestamp when the stage was last updated.

      • RouteSettings — (map<map>)

        Route settings for the stage, by routeKey.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • StageName — (String)

        The name of the stage.

      • StageVariables — (map<String>)

        A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

      • Tags — (map<String>)

        The collection of tags. Each tag element is associated with a given resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getStages(params = {}, callback) ⇒ AWS.Request

Gets the Stages for an API.

Service Reference:

Examples:

Calling the getStages operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  MaxResults: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
apigatewayv2.getStages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • MaxResults — (String)

      The maximum number of elements to be returned for this resource.

    • NextToken — (String)

      The next page of elements from this collection. Not valid for the last element of the collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Items — (Array<map>)

        The elements from this collection.

        • AccessLogSettings — (map)

          Settings for logging access in this stage.

          • DestinationArn — (String)

            The ARN of the CloudWatch Logs log group to receive access logs.

          • Format — (String)

            A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

        • ApiGatewayManaged — (Boolean)

          Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.

        • AutoDeploy — (Boolean)

          Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

        • ClientCertificateId — (String)

          The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.

        • CreatedDate — (Date)

          The timestamp when the stage was created.

        • DefaultRouteSettings — (map)

          Default route settings for the stage.

          • DataTraceEnabled — (Boolean)

            Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          • DetailedMetricsEnabled — (Boolean)

            Specifies whether detailed metrics are enabled.

          • LoggingLevel — (String)

            Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

            Possible values include:
            • "ERROR"
            • "INFO"
            • "false"
          • ThrottlingBurstLimit — (Integer)

            Specifies the throttling burst limit. Supported only for WebSocket APIs.

          • ThrottlingRateLimit — (Float)

            Specifies the throttling rate limit. Supported only for WebSocket APIs.

        • DeploymentId — (String)

          The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.

        • Description — (String)

          The description of the stage.

        • LastDeploymentStatusMessage — (String)

          Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.

        • LastUpdatedDate — (Date)

          The timestamp when the stage was last updated.

        • RouteSettings — (map<map>)

          Route settings for the stage, by routeKey.

          • DataTraceEnabled — (Boolean)

            Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          • DetailedMetricsEnabled — (Boolean)

            Specifies whether detailed metrics are enabled.

          • LoggingLevel — (String)

            Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

            Possible values include:
            • "ERROR"
            • "INFO"
            • "false"
          • ThrottlingBurstLimit — (Integer)

            Specifies the throttling burst limit. Supported only for WebSocket APIs.

          • ThrottlingRateLimit — (Float)

            Specifies the throttling rate limit. Supported only for WebSocket APIs.

        • StageNamerequired — (String)

          The name of the stage.

        • StageVariables — (map<String>)

          A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

        • Tags — (map<String>)

          The collection of tags. Each tag element is associated with a given resource.

      • NextToken — (String)

        The next page of elements from this collection. Not valid for the last element of the collection.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getTags(params = {}, callback) ⇒ AWS.Request

Gets a collection of Tag resources.

Service Reference:

Examples:

Calling the getTags operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
apigatewayv2.getTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The resource ARN for the tag.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (map<String>)

        Represents a collection of tags associated with the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

importApi(params = {}, callback) ⇒ AWS.Request

Imports an API.

Service Reference:

Examples:

Calling the importApi operation

var params = {
  Body: 'STRING_VALUE', /* required */
  Basepath: 'STRING_VALUE',
  FailOnWarnings: true || false
};
apigatewayv2.importApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Basepath — (String)

      Represents the base path of the imported API. Supported only for HTTP APIs.

    • Body — (String)

      The OpenAPI definition. Supported only for HTTP APIs.

    • FailOnWarnings — (Boolean)

      Specifies whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiEndpoint — (String)

        The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

      • ApiId — (String)

        The API ID.

      • ApiKeySelectionExpression — (String)

        An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

      • CorsConfiguration — (map)

        A CORS configuration. Supported only for HTTP APIs.

        • AllowCredentials — (Boolean)

          Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

        • AllowHeaders — (Array<String>)

          Represents a collection of allowed headers. Supported only for HTTP APIs.

        • AllowMethods — (Array<String>)

          Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

        • AllowOrigins — (Array<String>)

          Represents a collection of allowed origins. Supported only for HTTP APIs.

        • ExposeHeaders — (Array<String>)

          Represents a collection of exposed headers. Supported only for HTTP APIs.

        • MaxAge — (Integer)

          The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

      • CreatedDate — (Date)

        The timestamp when the API was created.

      • Description — (String)

        The description of the API.

      • DisableSchemaValidation — (Boolean)

        Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

      • ImportInfo — (Array<String>)

        The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

      • Name — (String)

        The name of the API.

      • ProtocolType — (String)

        The API protocol.

        Possible values include:
        • "WEBSOCKET"
        • "HTTP"
      • RouteSelectionExpression — (String)

        The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

      • Tags — (map<String>)

        A collection of tags associated with the API.

      • Version — (String)

        A version identifier for the API.

      • Warnings — (Array<String>)

        The warning messages reported when failonwarnings is turned on during API import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

reimportApi(params = {}, callback) ⇒ AWS.Request

Puts an Api resource.

Service Reference:

Examples:

Calling the reimportApi operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  Body: 'STRING_VALUE', /* required */
  Basepath: 'STRING_VALUE',
  FailOnWarnings: true || false
};
apigatewayv2.reimportApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • Basepath — (String)

      Represents the base path of the imported API. Supported only for HTTP APIs.

    • Body — (String)

      The OpenAPI definition. Supported only for HTTP APIs.

    • FailOnWarnings — (Boolean)

      Specifies whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiEndpoint — (String)

        The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

      • ApiId — (String)

        The API ID.

      • ApiKeySelectionExpression — (String)

        An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

      • CorsConfiguration — (map)

        A CORS configuration. Supported only for HTTP APIs.

        • AllowCredentials — (Boolean)

          Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

        • AllowHeaders — (Array<String>)

          Represents a collection of allowed headers. Supported only for HTTP APIs.

        • AllowMethods — (Array<String>)

          Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

        • AllowOrigins — (Array<String>)

          Represents a collection of allowed origins. Supported only for HTTP APIs.

        • ExposeHeaders — (Array<String>)

          Represents a collection of exposed headers. Supported only for HTTP APIs.

        • MaxAge — (Integer)

          The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

      • CreatedDate — (Date)

        The timestamp when the API was created.

      • Description — (String)

        The description of the API.

      • DisableSchemaValidation — (Boolean)

        Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

      • ImportInfo — (Array<String>)

        The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

      • Name — (String)

        The name of the API.

      • ProtocolType — (String)

        The API protocol.

        Possible values include:
        • "WEBSOCKET"
        • "HTTP"
      • RouteSelectionExpression — (String)

        The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

      • Tags — (map<String>)

        A collection of tags associated with the API.

      • Version — (String)

        A version identifier for the API.

      • Warnings — (Array<String>)

        The warning messages reported when failonwarnings is turned on during API import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Creates a new Tag resource to represent a tag.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
apigatewayv2.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The resource ARN for the tag.

    • Tags — (map<String>)

      The collection of tags. Each tag element is associated with a given resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Deletes a Tag.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
apigatewayv2.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The resource ARN for the tag.

    • TagKeys — (Array<String>)

      The Tag keys to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApi(params = {}, callback) ⇒ AWS.Request

Updates an Api resource.

Service Reference:

Examples:

Calling the updateApi operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ApiKeySelectionExpression: 'STRING_VALUE',
  CorsConfiguration: {
    AllowCredentials: true || false,
    AllowHeaders: [
      'STRING_VALUE',
      /* more items */
    ],
    AllowMethods: [
      'STRING_VALUE',
      /* more items */
    ],
    AllowOrigins: [
      'STRING_VALUE',
      /* more items */
    ],
    ExposeHeaders: [
      'STRING_VALUE',
      /* more items */
    ],
    MaxAge: 'NUMBER_VALUE'
  },
  CredentialsArn: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  DisableSchemaValidation: true || false,
  Name: 'STRING_VALUE',
  RouteKey: 'STRING_VALUE',
  RouteSelectionExpression: 'STRING_VALUE',
  Target: 'STRING_VALUE',
  Version: 'STRING_VALUE'
};
apigatewayv2.updateApi(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ApiKeySelectionExpression — (String)

      An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

    • CorsConfiguration — (map)

      A CORS configuration. Supported only for HTTP APIs.

      • AllowCredentials — (Boolean)

        Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

      • AllowHeaders — (Array<String>)

        Represents a collection of allowed headers. Supported only for HTTP APIs.

      • AllowMethods — (Array<String>)

        Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

      • AllowOrigins — (Array<String>)

        Represents a collection of allowed origins. Supported only for HTTP APIs.

      • ExposeHeaders — (Array<String>)

        Represents a collection of exposed headers. Supported only for HTTP APIs.

      • MaxAge — (Integer)

        The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

    • CredentialsArn — (String)

      This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. If provided, this value replaces the credentials associated with the quick create integration. Supported only for HTTP APIs.

    • Description — (String)

      The description of the API.

    • DisableSchemaValidation — (Boolean)

      Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

    • Name — (String)

      The name of the API.

    • RouteKey — (String)

      This property is part of quick create. If not specified, the route created using quick create is kept. Otherwise, this value replaces the route key of the quick create route. Additional routes may still be added after the API is updated. Supported only for HTTP APIs.

    • RouteSelectionExpression — (String)

      The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

    • Target — (String)

      This property is part of quick create. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided updates the integration URI and integration type. You can update a quick-created target, but you can't remove it from an API. Supported only for HTTP APIs.

    • Version — (String)

      A version identifier for the API.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiEndpoint — (String)

        The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.

      • ApiId — (String)

        The API ID.

      • ApiKeySelectionExpression — (String)

        An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions.

      • CorsConfiguration — (map)

        A CORS configuration. Supported only for HTTP APIs.

        • AllowCredentials — (Boolean)

          Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

        • AllowHeaders — (Array<String>)

          Represents a collection of allowed headers. Supported only for HTTP APIs.

        • AllowMethods — (Array<String>)

          Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

        • AllowOrigins — (Array<String>)

          Represents a collection of allowed origins. Supported only for HTTP APIs.

        • ExposeHeaders — (Array<String>)

          Represents a collection of exposed headers. Supported only for HTTP APIs.

        • MaxAge — (Integer)

          The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

      • CreatedDate — (Date)

        The timestamp when the API was created.

      • Description — (String)

        The description of the API.

      • DisableSchemaValidation — (Boolean)

        Avoid validating models when creating a deployment. Supported only for WebSocket APIs.

      • ImportInfo — (Array<String>)

        The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.

      • Name — (String)

        The name of the API.

      • ProtocolType — (String)

        The API protocol.

        Possible values include:
        • "WEBSOCKET"
        • "HTTP"
      • RouteSelectionExpression — (String)

        The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.

      • Tags — (map<String>)

        A collection of tags associated with the API.

      • Version — (String)

        A version identifier for the API.

      • Warnings — (Array<String>)

        The warning messages reported when failonwarnings is turned on during API import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApiMapping(params = {}, callback) ⇒ AWS.Request

The API mapping.

Service Reference:

Examples:

Calling the updateApiMapping operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ApiMappingId: 'STRING_VALUE', /* required */
  DomainName: 'STRING_VALUE', /* required */
  ApiMappingKey: 'STRING_VALUE',
  Stage: 'STRING_VALUE'
};
apigatewayv2.updateApiMapping(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ApiMappingId — (String)

      The API mapping identifier.

    • ApiMappingKey — (String)

      The API mapping key.

    • DomainName — (String)

      The domain name.

    • Stage — (String)

      The API stage.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiId — (String)

        The API identifier.

      • ApiMappingId — (String)

        The API mapping identifier.

      • ApiMappingKey — (String)

        The API mapping key.

      • Stage — (String)

        The API stage.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateAuthorizer(params = {}, callback) ⇒ AWS.Request

Updates an Authorizer.

Service Reference:

Examples:

Calling the updateAuthorizer operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  AuthorizerId: 'STRING_VALUE', /* required */
  AuthorizerCredentialsArn: 'STRING_VALUE',
  AuthorizerResultTtlInSeconds: 'NUMBER_VALUE',
  AuthorizerType: REQUEST | JWT,
  AuthorizerUri: 'STRING_VALUE',
  IdentitySource: [
    'STRING_VALUE',
    /* more items */
  ],
  IdentityValidationExpression: 'STRING_VALUE',
  JwtConfiguration: {
    Audience: [
      'STRING_VALUE',
      /* more items */
    ],
    Issuer: 'STRING_VALUE'
  },
  Name: 'STRING_VALUE'
};
apigatewayv2.updateAuthorizer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • AuthorizerCredentialsArn — (String)

      Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

    • AuthorizerId — (String)

      The authorizer identifier.

    • AuthorizerResultTtlInSeconds — (Integer)

      Authorizer caching is not currently supported. Don't specify this value for authorizers.

    • AuthorizerType — (String)

      The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

      Possible values include:
      • "REQUEST"
      • "JWT"
    • AuthorizerUri — (String)

      The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

    • IdentitySource — (Array<String>)

      The identity source for which authorization is requested.

      For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

      For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

    • IdentityValidationExpression — (String)

      This parameter is not used.

    • JwtConfiguration — (map)

      Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

      • Audience — (Array<String>)

        A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

      • Issuer — (String)

        The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

    • Name — (String)

      The name of the authorizer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AuthorizerCredentialsArn — (String)

        Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.

      • AuthorizerId — (String)

        The authorizer identifier.

      • AuthorizerResultTtlInSeconds — (Integer)

        Authorizer caching is not currently supported. Don't specify this value for authorizers.

      • AuthorizerType — (String)

        The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.

        Possible values include:
        • "REQUEST"
        • "JWT"
      • AuthorizerUri — (String)

        The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}</replaceable>:function:<replaceable>{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}</replaceable>:lambda:path/<replaceable>{service_api} , where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.

      • IdentitySource — (Array<String>)

        The identity source for which authorization is requested.

        For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.

        For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".

      • IdentityValidationExpression — (String)

        The validation expression does not apply to the REQUEST authorizer.

      • JwtConfiguration — (map)

        Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.

        • Audience — (Array<String>)

          A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519. Supported only for HTTP APIs.

        • Issuer — (String)

          The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}</replaceable>.amazonaws.com/<replaceable>{userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.

      • Name — (String)

        The name of the authorizer.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDeployment(params = {}, callback) ⇒ AWS.Request

Updates a Deployment.

Service Reference:

Examples:

Calling the updateDeployment operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  DeploymentId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE'
};
apigatewayv2.updateDeployment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • DeploymentId — (String)

      The deployment ID.

    • Description — (String)

      The description for the deployment resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AutoDeployed — (Boolean)

        Specifies whether a deployment was automatically released.

      • CreatedDate — (Date)

        The date and time when the Deployment resource was created.

      • DeploymentId — (String)

        The identifier for the deployment.

      • DeploymentStatus — (String)

        The status of the deployment: PENDING, FAILED, or SUCCEEDED.

        Possible values include:
        • "PENDING"
        • "FAILED"
        • "DEPLOYED"
      • DeploymentStatusMessage — (String)

        May contain additional feedback on the status of an API deployment.

      • Description — (String)

        The description for the deployment.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDomainName(params = {}, callback) ⇒ AWS.Request

Updates a domain name.

Service Reference:

Examples:

Calling the updateDomainName operation

var params = {
  DomainName: 'STRING_VALUE', /* required */
  DomainNameConfigurations: [
    {
      ApiGatewayDomainName: 'STRING_VALUE',
      CertificateArn: 'STRING_VALUE',
      CertificateName: 'STRING_VALUE',
      CertificateUploadDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
      DomainNameStatus: AVAILABLE | UPDATING,
      DomainNameStatusMessage: 'STRING_VALUE',
      EndpointType: REGIONAL | EDGE,
      HostedZoneId: 'STRING_VALUE',
      SecurityPolicy: TLS_1_0 | TLS_1_2
    },
    /* more items */
  ]
};
apigatewayv2.updateDomainName(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DomainName — (String)

      The domain name.

    • DomainNameConfigurations — (Array<map>)

      The domain name configurations.

      • ApiGatewayDomainName — (String)

        A domain name for the API.

      • CertificateArn — (String)

        An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

      • CertificateName — (String)

        The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

      • CertificateUploadDate — (Date)

        The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

      • DomainNameStatus — (String)

        The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

        Possible values include:
        • "AVAILABLE"
        • "UPDATING"
      • DomainNameStatusMessage — (String)

        An optional text message containing detailed information about status of the domain name migration.

      • EndpointType — (String)

        The endpoint type.

        Possible values include:
        • "REGIONAL"
        • "EDGE"
      • HostedZoneId — (String)

        The Amazon Route 53 Hosted Zone ID of the endpoint.

      • SecurityPolicy — (String)

        The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

        Possible values include:
        • "TLS_1_0"
        • "TLS_1_2"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiMappingSelectionExpression — (String)

        The API mapping selection expression.

      • DomainName — (String)

        The name of the DomainName resource.

      • DomainNameConfigurations — (Array<map>)

        The domain name configurations.

        • ApiGatewayDomainName — (String)

          A domain name for the API.

        • CertificateArn — (String)

          An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.

        • CertificateName — (String)

          The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.

        • CertificateUploadDate — (Date)

          The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.

        • DomainNameStatus — (String)

          The status of the domain name migration. The valid values are AVAILABLE and UPDATING. If the status is UPDATING, the domain cannot be modified further until the existing operation is complete. If it is AVAILABLE, the domain can be updated.

          Possible values include:
          • "AVAILABLE"
          • "UPDATING"
        • DomainNameStatusMessage — (String)

          An optional text message containing detailed information about status of the domain name migration.

        • EndpointType — (String)

          The endpoint type.

          Possible values include:
          • "REGIONAL"
          • "EDGE"
        • HostedZoneId — (String)

          The Amazon Route 53 Hosted Zone ID of the endpoint.

        • SecurityPolicy — (String)

          The Transport Layer Security (TLS) version of the security policy for this domain name. The valid values are TLS_1_0 and TLS_1_2.

          Possible values include:
          • "TLS_1_0"
          • "TLS_1_2"
      • Tags — (map<String>)

        The collection of tags associated with a domain name.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateIntegration(params = {}, callback) ⇒ AWS.Request

Updates an Integration.

Service Reference:

Examples:

Calling the updateIntegration operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  ConnectionId: 'STRING_VALUE',
  ConnectionType: INTERNET | VPC_LINK,
  ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  CredentialsArn: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  IntegrationMethod: 'STRING_VALUE',
  IntegrationType: AWS | HTTP | MOCK | HTTP_PROXY | AWS_PROXY,
  IntegrationUri: 'STRING_VALUE',
  PassthroughBehavior: WHEN_NO_MATCH | NEVER | WHEN_NO_TEMPLATES,
  PayloadFormatVersion: 'STRING_VALUE',
  RequestParameters: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  RequestTemplates: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  TemplateSelectionExpression: 'STRING_VALUE',
  TimeoutInMillis: 'NUMBER_VALUE'
};
apigatewayv2.updateIntegration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ConnectionId — (String)

      The connection ID.

    • ConnectionType — (String)

      The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

      Possible values include:
      • "INTERNET"
      • "VPC_LINK"
    • ContentHandlingStrategy — (String)

      Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

      If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"
    • CredentialsArn — (String)

      Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

    • Description — (String)

      The description of the integration

    • IntegrationId — (String)

      The integration ID.

    • IntegrationMethod — (String)

      Specifies the integration's HTTP method type.

    • IntegrationType — (String)

      The integration type of an integration. One of the following:

      AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

      AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

      HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

      HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

      MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

      Possible values include:
      • "AWS"
      • "HTTP"
      • "MOCK"
      • "HTTP_PROXY"
      • "AWS_PROXY"
    • IntegrationUri — (String)

      For a Lambda proxy integration, this is the URI of the Lambda function.

    • PassthroughBehavior — (String)

      Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

      WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

      NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

      WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

      Possible values include:
      • "WHEN_NO_MATCH"
      • "NEVER"
      • "WHEN_NO_TEMPLATES"
    • PayloadFormatVersion — (String)

      Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

    • RequestParameters — (map<String>)

      A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

    • RequestTemplates — (map<String>)

      Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

    • TemplateSelectionExpression — (String)

      The template selection expression for the integration.

    • TimeoutInMillis — (Integer)

      Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.

      • ConnectionId — (String)

        The connection ID.

      • ConnectionType — (String)

        The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.

        Possible values include:
        • "INTERNET"
        • "VPC_LINK"
      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • CredentialsArn — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.

      • Description — (String)

        Represents the description of an integration.

      • IntegrationId — (String)

        Represents the identifier of an integration.

      • IntegrationMethod — (String)

        Specifies the integration's HTTP method type.

      • IntegrationResponseSelectionExpression — (String)

        The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions.

      • IntegrationType — (String)

        The integration type of an integration. One of the following:

        AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.

        AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.

        HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.

        HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.

        MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.

        Possible values include:
        • "AWS"
        • "HTTP"
        • "MOCK"
        • "HTTP_PROXY"
        • "AWS_PROXY"
      • IntegrationUri — (String)

        For a Lambda proxy integration, this is the URI of the Lambda function.

      • PassthroughBehavior — (String)

        Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.

        WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.

        NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.

        WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.

        Possible values include:
        • "WHEN_NO_MATCH"
        • "NEVER"
        • "WHEN_NO_TEMPLATES"
      • PayloadFormatVersion — (String)

        Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.

      • RequestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}</replaceable>.<replaceable>{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. Supported only for WebSocket APIs.

      • RequestTemplates — (map<String>)

        Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.

      • TemplateSelectionExpression — (String)

        The template selection expression for the integration. Supported only for WebSocket APIs.

      • TimeoutInMillis — (Integer)

        Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateIntegrationResponse(params = {}, callback) ⇒ AWS.Request

Updates an IntegrationResponses.

Service Reference:

Examples:

Calling the updateIntegrationResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  IntegrationId: 'STRING_VALUE', /* required */
  IntegrationResponseId: 'STRING_VALUE', /* required */
  ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  IntegrationResponseKey: 'STRING_VALUE',
  ResponseParameters: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  ResponseTemplates: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  TemplateSelectionExpression: 'STRING_VALUE'
};
apigatewayv2.updateIntegrationResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ContentHandlingStrategy — (String)

      Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

      CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

      CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

      If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"
    • IntegrationId — (String)

      The integration ID.

    • IntegrationResponseId — (String)

      The integration response ID.

    • IntegrationResponseKey — (String)

      The integration response key.

    • ResponseParameters — (map<String>)

      A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name} , where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression} , where {name} is a valid and unique response header name and {JSON-expression} is a valid JSON expression without the $ prefix.

    • ResponseTemplates — (map<String>)

      The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

    • TemplateSelectionExpression — (String)

      The template selection expression for the integration response. Supported only for WebSocket APIs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentHandlingStrategy — (String)

        Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:

        CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.

        CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.

        If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"
      • IntegrationResponseId — (String)

        The integration response ID.

      • IntegrationResponseKey — (String)

        The integration response key.

      • ResponseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.

      • ResponseTemplates — (map<String>)

        The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • TemplateSelectionExpression — (String)

        The template selection expressions for the integration response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateModel(params = {}, callback) ⇒ AWS.Request

Updates a Model.

Service Reference:

Examples:

Calling the updateModel operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  ModelId: 'STRING_VALUE', /* required */
  ContentType: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  Schema: 'STRING_VALUE'
};
apigatewayv2.updateModel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ContentType — (String)

      The content-type for the model, for example, "application/json".

    • Description — (String)

      The description of the model.

    • ModelId — (String)

      The model ID.

    • Name — (String)

      The name of the model.

    • Schema — (String)

      The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ContentType — (String)

        The content-type for the model, for example, "application/json".

      • Description — (String)

        The description of the model.

      • ModelId — (String)

        The model identifier.

      • Name — (String)

        The name of the model. Must be alphanumeric.

      • Schema — (String)

        The schema for the model. For application/json models, this should be JSON schema draft 4 model.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRoute(params = {}, callback) ⇒ AWS.Request

Updates a Route.

Service Reference:

Examples:

Calling the updateRoute operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  ApiKeyRequired: true || false,
  AuthorizationScopes: [
    'STRING_VALUE',
    /* more items */
  ],
  AuthorizationType: NONE | AWS_IAM | CUSTOM | JWT,
  AuthorizerId: 'STRING_VALUE',
  ModelSelectionExpression: 'STRING_VALUE',
  OperationName: 'STRING_VALUE',
  RequestModels: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  RequestParameters: {
    '<__string>': {
      Required: true || false
    },
    /* '<__string>': ... */
  },
  RouteKey: 'STRING_VALUE',
  RouteResponseSelectionExpression: 'STRING_VALUE',
  Target: 'STRING_VALUE'
};
apigatewayv2.updateRoute(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ApiKeyRequired — (Boolean)

      Specifies whether an API key is required for the route. Supported only for WebSocket APIs.

    • AuthorizationScopes — (Array<String>)

      The authorization scopes supported by this route.

    • AuthorizationType — (String)

      The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

      Possible values include:
      • "NONE"
      • "AWS_IAM"
      • "CUSTOM"
      • "JWT"
    • AuthorizerId — (String)

      The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

    • ModelSelectionExpression — (String)

      The model selection expression for the route. Supported only for WebSocket APIs.

    • OperationName — (String)

      The operation name for the route.

    • RequestModels — (map<String>)

      The request models for the route. Supported only for WebSocket APIs.

    • RequestParameters — (map<map>)

      The request parameters for the route. Supported only for WebSocket APIs.

      • Required — (Boolean)

        Whether or not the parameter is required.

    • RouteId — (String)

      The route ID.

    • RouteKey — (String)

      The route key for the route.

    • RouteResponseSelectionExpression — (String)

      The route response selection expression for the route. Supported only for WebSocket APIs.

    • Target — (String)

      The target for the route.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApiGatewayManaged — (Boolean)

        Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.

      • ApiKeyRequired — (Boolean)

        Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

      • AuthorizationScopes — (Array<String>)

        A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.

      • AuthorizationType — (String)

        The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.

        Possible values include:
        • "NONE"
        • "AWS_IAM"
        • "CUSTOM"
        • "JWT"
      • AuthorizerId — (String)

        The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.

      • ModelSelectionExpression — (String)

        The model selection expression for the route. Supported only for WebSocket APIs.

      • OperationName — (String)

        The operation name for the route.

      • RequestModels — (map<String>)

        The request models for the route. Supported only for WebSocket APIs.

      • RequestParameters — (map<map>)

        The request parameters for the route. Supported only for WebSocket APIs.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteId — (String)

        The route ID.

      • RouteKey — (String)

        The route key for the route.

      • RouteResponseSelectionExpression — (String)

        The route response selection expression for the route. Supported only for WebSocket APIs.

      • Target — (String)

        The target for the route.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRouteResponse(params = {}, callback) ⇒ AWS.Request

Updates a RouteResponse.

Service Reference:

Examples:

Calling the updateRouteResponse operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  RouteId: 'STRING_VALUE', /* required */
  RouteResponseId: 'STRING_VALUE', /* required */
  ModelSelectionExpression: 'STRING_VALUE',
  ResponseModels: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  },
  ResponseParameters: {
    '<__string>': {
      Required: true || false
    },
    /* '<__string>': ... */
  },
  RouteResponseKey: 'STRING_VALUE'
};
apigatewayv2.updateRouteResponse(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApiId — (String)

      The API identifier.

    • ModelSelectionExpression — (String)

      The model selection expression for the route response. Supported only for WebSocket APIs.

    • ResponseModels — (map<String>)

      The response models for the route response.

    • ResponseParameters — (map<map>)

      The route response parameters.

      • Required — (Boolean)

        Whether or not the parameter is required.

    • RouteId — (String)

      The route ID.

    • RouteResponseId — (String)

      The route response ID.

    • RouteResponseKey — (String)

      The route response key.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ModelSelectionExpression — (String)

        Represents the model selection expression of a route response. Supported only for WebSocket APIs.

      • ResponseModels — (map<String>)

        Represents the response models of a route response.

      • ResponseParameters — (map<map>)

        Represents the response parameters of a route response.

        • Required — (Boolean)

          Whether or not the parameter is required.

      • RouteResponseId — (String)

        Represents the identifier of a route response.

      • RouteResponseKey — (String)

        Represents the route response key of a route response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateStage(params = {}, callback) ⇒ AWS.Request

Updates a Stage.

Service Reference:

Examples:

Calling the updateStage operation

var params = {
  ApiId: 'STRING_VALUE', /* required */
  StageName: 'STRING_VALUE', /* required */
  AccessLogSettings: {
    DestinationArn: 'STRING_VALUE',
    Format: 'STRING_VALUE'
  },
  AutoDeploy: true || false,
  ClientCertificateId: 'STRING_VALUE',
  DefaultRouteSettings: {
    DataTraceEnabled: true || false,
    DetailedMetricsEnabled: true || false,
    LoggingLevel: ERROR | INFO | false,
    ThrottlingBurstLimit: 'NUMBER_VALUE',
    ThrottlingRateLimit: 'NUMBER_VALUE'
  },
  DeploymentId: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  RouteSettings: {
    '<__string>': {
      DataTraceEnabled: true || false,
      DetailedMetricsEnabled: true || false,
      LoggingLevel: ERROR | INFO | false,
      ThrottlingBurstLimit: 'NUMBER_VALUE',
      ThrottlingRateLimit: 'NUMBER_VALUE'
    },
    /* '<__string>': ... */
  },
  StageVariables: {
    '<__string>': 'STRING_VALUE',
    /* '<__string>': ... */
  }
};
apigatewayv2.updateStage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AccessLogSettings — (map)

      Settings for logging access in this stage.

      • DestinationArn — (String)

        The ARN of the CloudWatch Logs log group to receive access logs.

      • Format — (String)

        A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

    • ApiId — (String)

      The API identifier.

    • AutoDeploy — (Boolean)

      Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

    • ClientCertificateId — (String)

      The identifier of a client certificate for a Stage.

    • DefaultRouteSettings — (map)

      The default route settings for the stage.

      • DataTraceEnabled — (Boolean)

        Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

      • DetailedMetricsEnabled — (Boolean)

        Specifies whether detailed metrics are enabled.

      • LoggingLevel — (String)

        Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        Possible values include:
        • "ERROR"
        • "INFO"
        • "false"
      • ThrottlingBurstLimit — (Integer)

        Specifies the throttling burst limit. Supported only for WebSocket APIs.

      • ThrottlingRateLimit — (Float)

        Specifies the throttling rate limit. Supported only for WebSocket APIs.

    • DeploymentId — (String)

      The deployment identifier for the API stage. Can't be updated if autoDeploy is enabled.

    • Description — (String)

      The description for the API stage.

    • RouteSettings — (map<map>)

      Route settings for the stage.

      • DataTraceEnabled — (Boolean)

        Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

      • DetailedMetricsEnabled — (Boolean)

        Specifies whether detailed metrics are enabled.

      • LoggingLevel — (String)

        Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        Possible values include:
        • "ERROR"
        • "INFO"
        • "false"
      • ThrottlingBurstLimit — (Integer)

        Specifies the throttling burst limit. Supported only for WebSocket APIs.

      • ThrottlingRateLimit — (Float)

        Specifies the throttling rate limit. Supported only for WebSocket APIs.

    • StageName — (String)

      The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

    • StageVariables — (map<String>)

      A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • AccessLogSettings — (map)

        Settings for logging access in this stage.

        • DestinationArn — (String)

          The ARN of the CloudWatch Logs log group to receive access logs.

        • Format — (String)

          A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.

      • ApiGatewayManaged — (Boolean)

        Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.

      • AutoDeploy — (Boolean)

        Specifies whether updates to an API automatically trigger a new deployment. The default value is false.

      • ClientCertificateId — (String)

        The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.

      • CreatedDate — (Date)

        The timestamp when the stage was created.

      • DefaultRouteSettings — (map)

        Default route settings for the stage.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • DeploymentId — (String)

        The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.

      • Description — (String)

        The description of the stage.

      • LastDeploymentStatusMessage — (String)

        Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.

      • LastUpdatedDate — (Date)

        The timestamp when the stage was last updated.

      • RouteSettings — (map<map>)

        Route settings for the stage, by routeKey.

        • DataTraceEnabled — (Boolean)

          Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

        • DetailedMetricsEnabled — (Boolean)

          Specifies whether detailed metrics are enabled.

        • LoggingLevel — (String)

          Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

          Possible values include:
          • "ERROR"
          • "INFO"
          • "false"
        • ThrottlingBurstLimit — (Integer)

          Specifies the throttling burst limit. Supported only for WebSocket APIs.

        • ThrottlingRateLimit — (Float)

          Specifies the throttling rate limit. Supported only for WebSocket APIs.

      • StageName — (String)

        The name of the stage.

      • StageVariables — (map<String>)

        A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.

      • Tags — (map<String>)

        The collection of tags. Each tag element is associated with a given resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.