Class: AWS.APIGateway

Inherits:
AWS.Service show all
Identifier:
apigateway
API Version:
2015-07-09
Defined in:
(unknown)

Overview

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

Sending a Request Using APIGateway

var apigateway = new AWS.APIGateway();
apigateway.createApiKey(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 APIGateway object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var apigateway = new AWS.APIGateway({apiVersion: '2015-07-09'});

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

AWS.config.apiVersions = {
  apigateway: '2015-07-09',
  // other service API versions
};

var apigateway = new AWS.APIGateway();

Version:

  • 2015-07-09

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, defineService

Constructor Details

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

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

Examples:

Constructing a APIGateway object

var apigateway = new AWS.APIGateway({apiVersion: '2015-07-09'});

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.APIGateway.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.APIGateway.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.

  • 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 returns the amount of time to delay in milliseconds. 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.

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

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

Create an ApiKey resource.

Service Reference:

Examples:

Calling the createApiKey operation

var params = {
  customerId: 'STRING_VALUE',
  description: 'STRING_VALUE',
  enabled: true || false,
  generateDistinctId: true || false,
  name: 'STRING_VALUE',
  stageKeys: [
    {
      restApiId: 'STRING_VALUE',
      stageName: 'STRING_VALUE'
    },
    /* more items */
  ],
  value: 'STRING_VALUE'
};
apigateway.createApiKey(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: {})
    • name — (String)

      The name of the ApiKey.

    • description — (String)

      The description of the ApiKey.

    • enabled — (Boolean)

      Specifies whether the ApiKey can be used by callers.

    • generateDistinctId — (Boolean)

      Specifies whether (true) or not (false) the key identifier is distinct from the created API key value.

    • value — (String)

      Specifies a value of the API key.

    • stageKeys — (Array<map>)

      DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.

      • restApiId — (String)

        A list of Stage resources that are associated with the ApiKey resource.

      • stageName — (String)

        The stage name in the RestApi that the stage key references.

    • customerId — (String)

      An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

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:

      • id — (String)

        The identifier of the API Key.

      • value — (String)

        The value of the API Key.

      • name — (String)

        The name of the API Key.

      • customerId — (String)

        An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

      • description — (String)

        The description of the API Key.

      • enabled — (Boolean)

        Specifies whether the API Key can be used by callers.

      • createdDate — (Date)

        The timestamp when the API Key was created.

      • lastUpdatedDate — (Date)

        The timestamp when the API Key was last updated.

      • stageKeys — (Array<String>)

        A list of Stage resources that are associated with the ApiKey resource.

Returns:

  • (AWS.Request)

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

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

Adds a new Authorizer resource to an existing RestApi resource.

Service Reference:

Examples:

Calling the createAuthorizer operation

var params = {
  identitySource: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  type: TOKEN | COGNITO_USER_POOLS, /* required */
  authType: 'STRING_VALUE',
  authorizerCredentials: 'STRING_VALUE',
  authorizerResultTtlInSeconds: 0,
  authorizerUri: 'STRING_VALUE',
  identityValidationExpression: 'STRING_VALUE',
  providerARNs: [
    'STRING_VALUE',
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier under which the Authorizer will be created.

    • name — (String)

      [Required] The name of the authorizer.

    • type — (String)

      [Required] The type of the authorizer.

      Possible values include:
      • "TOKEN"
      • "COGNITO_USER_POOLS"
    • providerARNs — (Array<String>)

      A list of the Cognito Your User Pool authorizer's provider ARNs.

    • authType — (String)

      Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.

    • authorizerUri — (String)

      [Required] Specifies the authorizer's Uniform Resource Identifier (URI).

    • authorizerCredentials — (String)

      Specifies the credentials required for the authorizer, if any.

    • identitySource — (String)

      [Required] The source of the identity in an incoming request.

    • identityValidationExpression — (String)

      A validation expression for the incoming identity.

    • authorizerResultTtlInSeconds — (Integer)

      The TTL of cached authorizer results.

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:

      • id — (String)

        The identifier for the authorizer resource.

      • name — (String)

        [Required] The name of the authorizer.

      • type — (String)

        [Required] The type of the authorizer. Currently, the valid type is TOKEN for a Lambda function or COGNITO_USER_POOLS for an Amazon Cognito user pool.

        Possible values include:
        • "TOKEN"
        • "COGNITO_USER_POOLS"
      • providerARNs — (Array<String>)

        A list of the provider ARNs of the authorizer. For an TOKEN authorizer, this is not defined. For authorizers of the COGNITO_USER_POOLS type, each element corresponds to a user pool ARN of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.

      • authType — (String)

        Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.

      • authorizerUri — (String)

        [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN 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}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{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.

      • authorizerCredentials — (String)

        Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

      • identitySource — (String)

        [Required] The source of the identity in an incoming request. For a TOKEN authorizer, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token. For COGNITO_USER_POOLS authorizers, this property is used.

      • identityValidationExpression — (String)

        A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.

      • authorizerResultTtlInSeconds — (Integer)

        The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

Returns:

  • (AWS.Request)

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

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

Creates a new BasePathMapping resource.

Service Reference:

Examples:

Calling the createBasePathMapping operation

var params = {
  domainName: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  basePath: 'STRING_VALUE',
  stage: 'STRING_VALUE'
};
apigateway.createBasePathMapping(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 of the BasePathMapping resource to create.

    • basePath — (String)

      The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify a base path name after the domain name.

    • restApiId — (String)

      The name of the API that you want to apply this mapping to.

    • stage — (String)

      The name of the API's stage that you want to use for this mapping. Leave this blank if you do not want callers to explicitly specify the stage name after any base path 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:

      • basePath — (String)

        The base path name that callers of the API must provide as part of the URL after the domain name.

      • restApiId — (String)

        The name of the API.

      • stage — (String)

        The name of the API's stage.

Returns:

  • (AWS.Request)

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

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

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

Service Reference:

Examples:

Calling the createDeployment operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  cacheClusterEnabled: true || false,
  cacheClusterSize: 0.5 | 1.6 | 6.1 | 13.5 | 28.4 | 58.2 | 118 | 237,
  description: 'STRING_VALUE',
  stageDescription: 'STRING_VALUE',
  stageName: 'STRING_VALUE',
  variables: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi resource identifier for the Deployment resource to create.

    • stageName — (String)

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

    • stageDescription — (String)

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

    • description — (String)

      The description for the Deployment resource to create.

    • cacheClusterEnabled — (Boolean)

      Enables a cache cluster for the Stage resource specified in the input.

    • cacheClusterSize — (String)

      Specifies the cache cluster size for the Stage resource specified in the input, if a cache cluster is enabled.

      Possible values include:
      • "0.5"
      • "1.6"
      • "6.1"
      • "13.5"
      • "28.4"
      • "58.2"
      • "118"
      • "237"
    • variables — (map<String>)

      A map that defines the stage variables for the Stage resource that is associated with the new deployment. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.

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:

      • id — (String)

        The identifier for the deployment resource.

      • description — (String)

        The description for the deployment resource.

      • createdDate — (Date)

        The date and time that the deployment resource was created.

      • apiSummary — (map<map<map>>)

        A summary of the RestApi at the date and time that the deployment resource was created.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • apiKeyRequired — (Boolean)

          Specifies whether the method requires a valid ApiKey.

Returns:

  • (AWS.Request)

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

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

Calls the CreateDocumentationPart API operation.

Service Reference:

Examples:

Calling the createDocumentationPart operation

var params = {
  location: { /* required */
    type: API | AUTHORIZER | MODEL | RESOURCE | METHOD | PATH_PARAMETER | QUERY_PARAMETER | REQUEST_HEADER | REQUEST_BODY | RESPONSE | RESPONSE_HEADER | RESPONSE_BODY, /* required */
    method: 'STRING_VALUE',
    name: 'STRING_VALUE',
    path: 'STRING_VALUE',
    statusCode: 'STRING_VALUE'
  },
  properties: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.createDocumentationPart(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-created documentation part.

    • location — (map)

      [Required] The location of the targeted API entity of the to-be-created documentation part.

      • typerequired — (String)

        The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

        Possible values include:
        • "API"
        • "AUTHORIZER"
        • "MODEL"
        • "RESOURCE"
        • "METHOD"
        • "PATH_PARAMETER"
        • "QUERY_PARAMETER"
        • "REQUEST_HEADER"
        • "REQUEST_BODY"
        • "RESPONSE"
        • "RESPONSE_HEADER"
        • "RESPONSE_BODY"
      • path — (String)

        The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

      • method — (String)

        The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

      • statusCode — (String)

        The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

      • name — (String)

        The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

    • properties — (String)

      [Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value pairs can be exported and, hence, published.

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:

      • id — (String)

        The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

      • location — (map)

        The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

        • typerequired — (String)

          The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

          Possible values include:
          • "API"
          • "AUTHORIZER"
          • "MODEL"
          • "RESOURCE"
          • "METHOD"
          • "PATH_PARAMETER"
          • "QUERY_PARAMETER"
          • "REQUEST_HEADER"
          • "REQUEST_BODY"
          • "RESPONSE"
          • "RESPONSE_HEADER"
          • "RESPONSE_BODY"
        • path — (String)

          The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

        • method — (String)

          The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

        • statusCode — (String)

          The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

        • name — (String)

          The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

      • properties — (String)

        A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

Returns:

  • (AWS.Request)

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

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

Calls the CreateDocumentationVersion API operation.

Service Reference:

Examples:

Calling the createDocumentationVersion operation

var params = {
  documentationVersion: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  stageName: 'STRING_VALUE'
};
apigateway.createDocumentationVersion(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: {})
    • restApiId — (String)

      [Required] Specifies the API identifier of the to-be-created documentation version.

    • documentationVersion — (String)

      [Required] The version identifier of the new snapshot.

    • stageName — (String)

      The stage name to be associated with the new documentation snapshot.

    • description — (String)

      A description about the new documentation snapshot.

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:

      • version — (String)

        The version identifier of the API documentation snapshot.

      • createdDate — (Date)

        The date when the API documentation snapshot is created.

      • description — (String)

        The description of the API documentation snapshot.

Returns:

  • (AWS.Request)

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

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

Creates a new domain name.

Service Reference:

Examples:

Calling the createDomainName operation

var params = {
  domainName: 'STRING_VALUE', /* required */
  certificateArn: 'STRING_VALUE',
  certificateBody: 'STRING_VALUE',
  certificateChain: 'STRING_VALUE',
  certificateName: 'STRING_VALUE',
  certificatePrivateKey: 'STRING_VALUE'
};
apigateway.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)

      (Required) The name of the DomainName resource.

    • certificateName — (String)

      The user-friendly name of the certificate.

    • certificateBody — (String)

      [Deprecated] The body of the server certificate provided by your certificate authority.

    • certificatePrivateKey — (String)

      [Deprecated] Your certificate's private key.

    • certificateChain — (String)

      [Deprecated] The intermediate certificates and optionally the root certificate, one after the other without any blank lines. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates that were provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path.

    • certificateArn — (String)

      The reference to an AWS-managed certificate. AWS Certificate Manager is the only supported source.

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:

      • domainName — (String)

        The name of the DomainName resource.

      • certificateName — (String)

        The name of the certificate.

      • certificateArn — (String)

        The reference to an AWS-managed certificate. AWS Certificate Manager is the only supported source.

      • certificateUploadDate — (Date)

        The timestamp when the certificate was uploaded.

      • distributionDomainName — (String)

        The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

Returns:

  • (AWS.Request)

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

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

Adds a new Model resource to an existing RestApi resource.

Service Reference:

Examples:

Calling the createModel operation

var params = {
  contentType: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  schema: 'STRING_VALUE'
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier under which the Model will be created.

    • name — (String)

      The name of the model.

    • description — (String)

      The description of the model.

    • schema — (String)

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

    • contentType — (String)

      The content-type for the 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:

      • id — (String)

        The identifier for the model resource.

      • name — (String)

        The name of the model.

      • description — (String)

        The description of the model.

      • schema — (String)

        The schema for the model. For application/json models, this should be JSON-schema draft v4 model. Do not include "*/" characters in the description of any properties because such "*/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

      • contentType — (String)

        The content-type for the model.

Returns:

  • (AWS.Request)

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

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

Creates a ReqeustValidator of a given RestApi.

Service Reference:

Examples:

Calling the createRequestValidator operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  name: 'STRING_VALUE',
  validateRequestBody: true || false,
  validateRequestParameters: true || false
};
apigateway.createRequestValidator(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: {})
    • restApiId — (String)

      [Required] The identifier of the RestApi for which the RequestValidator is created.

    • name — (String)

      The name of the to-be-created RequestValidator.

    • validateRequestBody — (Boolean)

      A Boolean flag to indicate whether to validate request body according to the configured model schema for the method (true) or not (false).

    • validateRequestParameters — (Boolean)

      A Boolean flag to indicate whether to validate request parameters, true, or not 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:

      • id — (String)

        The identifier of this RequestValidator.

      • name — (String)

        The name of this RequestValidator

      • validateRequestBody — (Boolean)

        A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

      • validateRequestParameters — (Boolean)

        A Boolean flag to indicate whether to validate request parameters (true) or not (false).

Returns:

  • (AWS.Request)

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

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

Creates a Resource resource.

Service Reference:

Examples:

Calling the createResource operation

var params = {
  parentId: 'STRING_VALUE', /* required */
  pathPart: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.createResource(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: {})
    • restApiId — (String)

      The identifier of the RestApi for the resource.

    • parentId — (String)

      The parent resource's identifier.

    • pathPart — (String)

      The last path segment for this 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:

      • id — (String)

        The resource's identifier.

      • parentId — (String)

        The parent resource's identifier.

      • pathPart — (String)

        The last path segment for this resource.

      • path — (String)

        The full path for this resource.

      • resourceMethods — (map<map>)

        Gets an API resource's method of a given HTTP verb.

        The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods request.

        Example: Get the GET method of an API resource

        Request
        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response
        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE", "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } }

        If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS.

        • httpMethod — (String)

          The method's HTTP verb.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • authorizerId — (String)

          The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

        • apiKeyRequired — (Boolean)

          A boolean flag specifying whether a valid ApiKey is required to invoke this method.

        • requestValidatorId — (String)

          The identifier of a RequestValidator for request validation.

        • operationName — (String)

          A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

        • requestParameters — (map<Boolean>)

          A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

        • requestModels — (map<String>)

          A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

        • methodResponses — (map<map>)

          Gets a method response associated with a given HTTP status code.

          The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

          Example: Get a 200 OK response of a GET method

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

          • statusCode — (String)

            The method response's status code.

          • responseParameters — (map<Boolean>)

            A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

          • responseModels — (map<String>)

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

        • methodIntegration — (map)

          Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

          Example:

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

          • type — (String)

            Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

            Specifies the integration's HTTP method type.

          • uri — (String)

            Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

          • credentials — (String)

            Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

          • requestParameters — (map<String>)

            A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

          • passthroughBehavior — (String)

            Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

            • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
            • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
            • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
          • contentHandling — (String)

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

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

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

            If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

            Specifies the integration's cache namespace.

          • cacheKeyParameters — (Array<String>)

            Specifies the integration's cache key parameters.

          • integrationResponses — (map<map>)

            Specifies the integration's responses.

            Example: Get integration responses of a method

            Request

            GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
            Response

            The successful response returns 200 OK status and a payload as follows:

            { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

            • statusCode — (String)

              Specifies the status code that is used to map the integration response to an existing MethodResponse.

            • selectionPattern — (String)

              Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

            • responseParameters — (map<String>)

              A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • contentHandling — (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 method response without modification.

              Possible values include:
              • "CONVERT_TO_BINARY"
              • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Creates a new RestApi resource.

Service Reference:

Examples:

Calling the createRestApi operation

var params = {
  name: 'STRING_VALUE', /* required */
  binaryMediaTypes: [
    'STRING_VALUE',
    /* more items */
  ],
  cloneFrom: 'STRING_VALUE',
  description: 'STRING_VALUE',
  version: 'STRING_VALUE'
};
apigateway.createRestApi(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: {})
    • name — (String)

      The name of the RestApi.

    • description — (String)

      The description of the RestApi.

    • version — (String)

      A version identifier for the API.

    • cloneFrom — (String)

      The ID of the RestApi that you want to clone from.

    • binaryMediaTypes — (Array<String>)

      The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

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:

      • id — (String)

        The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

      • name — (String)

        The API's name.

      • description — (String)

        The API's description.

      • createdDate — (Date)

        The timestamp when the API was created.

      • version — (String)

        A version identifier for the API.

      • warnings — (Array<String>)

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

      • binaryMediaTypes — (Array<String>)

        The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Creates a new Stage resource that references a pre-existing Deployment for the API.

Service Reference:

Examples:

Calling the createStage operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE', /* required */
  cacheClusterEnabled: true || false,
  cacheClusterSize: 0.5 | 1.6 | 6.1 | 13.5 | 28.4 | 58.2 | 118 | 237,
  description: 'STRING_VALUE',
  documentationVersion: 'STRING_VALUE',
  variables: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Stage resource to create.

    • stageName — (String)

      The name for the Stage resource.

    • deploymentId — (String)

      The identifier of the Deployment resource for the Stage resource.

    • description — (String)

      The description of the Stage resource.

    • cacheClusterEnabled — (Boolean)

      Whether cache clustering is enabled for the stage.

    • cacheClusterSize — (String)

      The stage's cache cluster size.

      Possible values include:
      • "0.5"
      • "1.6"
      • "6.1"
      • "13.5"
      • "28.4"
      • "58.2"
      • "118"
      • "237"
    • variables — (map<String>)

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

    • documentationVersion — (String)

      The version of the associated API documentation.

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:

      • deploymentId — (String)

        The identifier of the Deployment that the stage points to.

      • clientCertificateId — (String)

        The identifier of a client certificate for an API stage.

      • stageName — (String)

        The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

      • description — (String)

        The stage's description.

      • cacheClusterEnabled — (Boolean)

        Specifies whether a cache cluster is enabled for the stage.

      • cacheClusterSize — (String)

        The size of the cache cluster for the stage, if enabled.

        Possible values include:
        • "0.5"
        • "1.6"
        • "6.1"
        • "13.5"
        • "28.4"
        • "58.2"
        • "118"
        • "237"
      • cacheClusterStatus — (String)

        The status of the cache cluster for the stage, if enabled.

        Possible values include:
        • "CREATE_IN_PROGRESS"
        • "AVAILABLE"
        • "DELETE_IN_PROGRESS"
        • "NOT_AVAILABLE"
        • "FLUSH_IN_PROGRESS"
      • methodSettings — (map<map>)

        A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /&#42;/&#42; for overriding all methods in the stage.

        • metricsEnabled — (Boolean)

          Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

        • loggingLevel — (String)

          Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

        • dataTraceEnabled — (Boolean)

          Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

        • throttlingBurstLimit — (Integer)

          Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

        • throttlingRateLimit — (Float)

          Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

        • cachingEnabled — (Boolean)

          Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

        • cacheTtlInSeconds — (Integer)

          Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

        • cacheDataEncrypted — (Boolean)

          Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

        • requireAuthorizationForCacheControl — (Boolean)

          Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

        • unauthorizedCacheControlHeaderStrategy — (String)

          Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

          Possible values include:
          • "FAIL_WITH_403"
          • "SUCCEED_WITH_RESPONSE_HEADER"
          • "SUCCEED_WITHOUT_RESPONSE_HEADER"
      • variables — (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-._~:/?#&=,]+.

      • documentationVersion — (String)

        The version of the associated API documentation.

      • createdDate — (Date)

        The timestamp when the stage was created.

      • lastUpdatedDate — (Date)

        The timestamp when the stage last updated.

Returns:

  • (AWS.Request)

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

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

Creates a usage plan with the throttle and quota limits, as well as the associated API stages, specified in the payload.

Service Reference:

Examples:

Calling the createUsagePlan operation

var params = {
  name: 'STRING_VALUE', /* required */
  apiStages: [
    {
      apiId: 'STRING_VALUE',
      stage: 'STRING_VALUE'
    },
    /* more items */
  ],
  description: 'STRING_VALUE',
  quota: {
    limit: 0,
    offset: 0,
    period: DAY | WEEK | MONTH
  },
  throttle: {
    burstLimit: 0,
    rateLimit: 0.0
  }
};
apigateway.createUsagePlan(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: {})
    • name — (String)

      The name of the usage plan.

    • description — (String)

      The description of the usage plan.

    • apiStages — (Array<map>)

      The associated API stages of the usage plan.

      • apiId — (String)

        API Id of the associated API stage in a usage plan.

      • stage — (String)

        API stage name of the associated API stage in a usage plan.

    • throttle — (map)

      The throttling limits of the usage plan.

      • burstLimit — (Integer)

        The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

      • rateLimit — (Float)

        The API request steady-state rate limit.

    • quota — (map)

      The quota of the usage plan.

      • limit — (Integer)

        The maximum number of requests that can be made in a given time period.

      • offset — (Integer)

        The number of requests subtracted from the given limit in the initial time period.

      • period — (String)

        The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

        Possible values include:
        • "DAY"
        • "WEEK"
        • "MONTH"

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:

      • id — (String)

        The identifier of a UsagePlan resource.

      • name — (String)

        The name of a usage plan.

      • description — (String)

        The description of a usage plan.

      • apiStages — (Array<map>)

        The associated API stages of a usage plan.

        • apiId — (String)

          API Id of the associated API stage in a usage plan.

        • stage — (String)

          API stage name of the associated API stage in a usage plan.

      • throttle — (map)

        The request throttle limits of a usage plan.

        • burstLimit — (Integer)

          The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

        • rateLimit — (Float)

          The API request steady-state rate limit.

      • quota — (map)

        The maximum number of permitted requests per a given unit time interval.

        • limit — (Integer)

          The maximum number of requests that can be made in a given time period.

        • offset — (Integer)

          The number of requests subtracted from the given limit in the initial time period.

        • period — (String)

          The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

          Possible values include:
          • "DAY"
          • "WEEK"
          • "MONTH"
      • productCode — (String)

        The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

Returns:

  • (AWS.Request)

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

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

Creates a usage plan key for adding an existing API key to a usage plan.

Service Reference:

Examples:

Calling the createUsagePlanKey operation

var params = {
  keyId: 'STRING_VALUE', /* required */
  keyType: 'STRING_VALUE', /* required */
  usagePlanId: 'STRING_VALUE' /* required */
};
apigateway.createUsagePlanKey(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: {})
    • usagePlanId — (String)

      The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.

    • keyId — (String)

      The identifier of a UsagePlanKey resource for a plan customer.

    • keyType — (String)

      The type of a UsagePlanKey resource for a plan customer.

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:

      • id — (String)

        The Id of a usage plan key.

      • type — (String)

        The type of a usage plan key. Currently, the valid key type is API_KEY.

      • value — (String)

        The value of a usage plan key.

      • name — (String)

        The name of a usage plan key.

Returns:

  • (AWS.Request)

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

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

Deletes the ApiKey resource.

Service Reference:

Examples:

Calling the deleteApiKey operation

var params = {
  apiKey: 'STRING_VALUE' /* required */
};
apigateway.deleteApiKey(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: {})
    • apiKey — (String)

      The identifier of the ApiKey resource to be deleted.

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 existing Authorizer resource.

Service Reference:

Examples:

Calling the deleteAuthorizer operation

var params = {
  authorizerId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier for the Authorizer resource.

    • authorizerId — (String)

      The identifier of the Authorizer 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.

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

Deletes the BasePathMapping resource.

Service Reference:

Examples:

Calling the deleteBasePathMapping operation

var params = {
  basePath: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE' /* required */
};
apigateway.deleteBasePathMapping(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 of the BasePathMapping resource to delete.

    • basePath — (String)

      The base path name of the BasePathMapping resource 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.

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

Deletes the ClientCertificate resource.

Service Reference:

Examples:

Calling the deleteClientCertificate operation

var params = {
  clientCertificateId: 'STRING_VALUE' /* required */
};
apigateway.deleteClientCertificate(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: {})
    • clientCertificateId — (String)

      The identifier of the ClientCertificate resource to be deleted.

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 resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.

Service Reference:

Examples:

Calling the deleteDeployment operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Deployment resource to delete.

    • deploymentId — (String)

      The identifier of the Deployment resource 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.

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

Calls the DeleteDocumentationPart API operation.

Service Reference:

Examples:

Calling the deleteDocumentationPart operation

var params = {
  documentationPartId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteDocumentationPart(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: {})
    • restApiId — (String)

      [Required] Specifies the identifier of an API of the to-be-deleted documentation part.

    • documentationPartId — (String)

      [Required] The identifier of the to-be-deleted documentation part.

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.

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

Calls the DeleteDocumentationVersion API operation.

Service Reference:

Examples:

Calling the deleteDocumentationVersion operation

var params = {
  documentationVersion: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteDocumentationVersion(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of a to-be-deleted documentation snapshot.

    • documentationVersion — (String)

      [Required] The version identifier of a to-be-deleted documentation snapshot.

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 the DomainName resource.

Service Reference:

Examples:

Calling the deleteDomainName operation

var params = {
  domainName: 'STRING_VALUE' /* required */
};
apigateway.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 name of the DomainName resource to be deleted.

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

Represents a delete integration.

Service Reference:

Examples:

Calling the deleteIntegration operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      Specifies a delete integration request's API identifier.

    • resourceId — (String)

      Specifies a delete integration request's resource identifier.

    • httpMethod — (String)

      Specifies a delete integration request's HTTP method.

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

Represents a delete integration response.

Service Reference:

Examples:

Calling the deleteIntegrationResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      Specifies a delete integration response request's API identifier.

    • resourceId — (String)

      Specifies a delete integration response request's resource identifier.

    • httpMethod — (String)

      Specifies a delete integration response request's HTTP method.

    • statusCode — (String)

      Specifies a delete integration response request's status code.

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.

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

Deletes an existing Method resource.

Service Reference:

Examples:

Calling the deleteMethod operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteMethod(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: {})
    • restApiId — (String)

      The RestApi identifier for the Method resource.

    • resourceId — (String)

      The Resource identifier for the Method resource.

    • httpMethod — (String)

      The HTTP verb of the Method 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.

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

Deletes an existing MethodResponse resource.

Service Reference:

Examples:

Calling the deleteMethodResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE' /* required */
};
apigateway.deleteMethodResponse(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: {})

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 = {
  modelName: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi under which the model will be deleted.

    • modelName — (String)

      The name of the model 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.

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

Deletes a RequestValidator of a given RestApi.

Service Reference:

Examples:

Calling the deleteRequestValidator operation

var params = {
  requestValidatorId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteRequestValidator(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: {})
    • restApiId — (String)

      [Required] The identifier of the RestApi from which the given RequestValidator is deleted.

    • requestValidatorId — (String)

      [Required] The identifier of the RequestValidator to be deleted.

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.

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

Deletes a Resource resource.

Service Reference:

Examples:

Calling the deleteResource operation

var params = {
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteResource(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: {})
    • restApiId — (String)

      The RestApi identifier for the Resource resource.

    • resourceId — (String)

      The identifier of the Resource 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.

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

Deletes the specified API.

Service Reference:

Examples:

Calling the deleteRestApi operation

var params = {
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.deleteRestApi(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: {})
    • restApiId — (String)

      The ID of the RestApi you want 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.

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

Deletes a Stage resource.

Service Reference:

Examples:

Calling the deleteStage operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Stage resource to delete.

    • stageName — (String)

      The name of the Stage resource 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.

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

Deletes a usage plan of a given plan Id.

Service Reference:

Examples:

Calling the deleteUsagePlan operation

var params = {
  usagePlanId: 'STRING_VALUE' /* required */
};
apigateway.deleteUsagePlan(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: {})
    • usagePlanId — (String)

      The Id of the to-be-deleted usage plan.

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.

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

Deletes a usage plan key and remove the underlying API key from the associated usage plan.

Service Reference:

Examples:

Calling the deleteUsagePlanKey operation

var params = {
  keyId: 'STRING_VALUE', /* required */
  usagePlanId: 'STRING_VALUE' /* required */
};
apigateway.deleteUsagePlanKey(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: {})
    • usagePlanId — (String)

      The Id of the UsagePlan resource representing the usage plan containing the to-be-deleted UsagePlanKey resource representing a plan customer.

    • keyId — (String)

      The Id of the UsagePlanKey resource to be deleted.

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.

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

Flushes all authorizer cache entries on a stage.

Service Reference:

Examples:

Calling the flushStageAuthorizersCache operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE' /* required */
};
apigateway.flushStageAuthorizersCache(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: {})
    • restApiId — (String)

      The API identifier of the stage to flush.

    • stageName — (String)

      The name of the stage to flush.

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.

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

Flushes a stage's cache.

Service Reference:

Examples:

Calling the flushStageCache operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE' /* required */
};
apigateway.flushStageCache(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: {})
    • restApiId — (String)

      The API identifier of the stage to flush its cache.

    • stageName — (String)

      The name of the stage to flush its cache.

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.

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

Generates a ClientCertificate resource.

Service Reference:

Examples:

Calling the generateClientCertificate operation

var params = {
  description: 'STRING_VALUE'
};
apigateway.generateClientCertificate(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: {})

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:

      • clientCertificateId — (String)

        The identifier of the client certificate.

      • description — (String)

        The description of the client certificate.

      • pemEncodedCertificate — (String)

        The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .

      • createdDate — (Date)

        The timestamp when the client certificate was created.

      • expirationDate — (Date)

        The timestamp when the client certificate will expire.

Returns:

  • (AWS.Request)

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

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

Gets information about the current Account resource.

Service Reference:

Examples:

Calling the getAccount operation

var params = {
};
apigateway.getAccount(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: {})

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:

      • cloudwatchRoleArn — (String)

        The ARN of an Amazon CloudWatch role for the current Account.

      • throttleSettings — (map)

        Specifies the API request limits configured for the current Account.

        • burstLimit — (Integer)

          The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

        • rateLimit — (Float)

          The API request steady-state rate limit.

      • features — (Array<String>)

        A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".

      • apiKeyVersion — (String)

        The version of the API keys used for the account.

Returns:

  • (AWS.Request)

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

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

Gets information about the current ApiKey resource.

Service Reference:

Examples:

Calling the getApiKey operation

var params = {
  apiKey: 'STRING_VALUE', /* required */
  includeValue: true || false
};
apigateway.getApiKey(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: {})
    • apiKey — (String)

      The identifier of the ApiKey resource.

    • includeValue — (Boolean)

      A boolean flag to specify whether (true) or not (false) the result contains the key value.

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:

      • id — (String)

        The identifier of the API Key.

      • value — (String)

        The value of the API Key.

      • name — (String)

        The name of the API Key.

      • customerId — (String)

        An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

      • description — (String)

        The description of the API Key.

      • enabled — (Boolean)

        Specifies whether the API Key can be used by callers.

      • createdDate — (Date)

        The timestamp when the API Key was created.

      • lastUpdatedDate — (Date)

        The timestamp when the API Key was last updated.

      • stageKeys — (Array<String>)

        A list of Stage resources that are associated with the ApiKey resource.

Returns:

  • (AWS.Request)

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

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

Gets information about the current ApiKeys resource.

Service Reference:

Examples:

Calling the getApiKeys operation

var params = {
  customerId: 'STRING_VALUE',
  includeValues: true || false,
  limit: 0,
  nameQuery: 'STRING_VALUE',
  position: 'STRING_VALUE'
};
apigateway.getApiKeys(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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of ApiKeys to get information about.

    • nameQuery — (String)

      The name of queried API keys.

    • customerId — (String)

      The identifier of a customer in AWS Marketplace or an external system, such as a developer portal.

    • includeValues — (Boolean)

      A boolean flag to specify whether (true) or not (false) the result contains key values.

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:

      • warnings — (Array<String>)

        A list of warning messages logged during the import of API keys when the failOnWarnings option is set to true.

      • position — (String)
      • items — (Array<map>)

        The current page of any ApiKey resources in the collection of ApiKey resources.

        • id — (String)

          The identifier of the API Key.

        • value — (String)

          The value of the API Key.

        • name — (String)

          The name of the API Key.

        • customerId — (String)

          An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

        • description — (String)

          The description of the API Key.

        • enabled — (Boolean)

          Specifies whether the API Key can be used by callers.

        • createdDate — (Date)

          The timestamp when the API Key was created.

        • lastUpdatedDate — (Date)

          The timestamp when the API Key was last updated.

        • stageKeys — (Array<String>)

          A list of Stage resources that are associated with the ApiKey resource.

Returns:

  • (AWS.Request)

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

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

Describe an existing Authorizer resource.

Service Reference:

Examples:

Calling the getAuthorizer operation

var params = {
  authorizerId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier for the Authorizer resource.

    • authorizerId — (String)

      The identifier of the Authorizer 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:

      • id — (String)

        The identifier for the authorizer resource.

      • name — (String)

        [Required] The name of the authorizer.

      • type — (String)

        [Required] The type of the authorizer. Currently, the valid type is TOKEN for a Lambda function or COGNITO_USER_POOLS for an Amazon Cognito user pool.

        Possible values include:
        • "TOKEN"
        • "COGNITO_USER_POOLS"
      • providerARNs — (Array<String>)

        A list of the provider ARNs of the authorizer. For an TOKEN authorizer, this is not defined. For authorizers of the COGNITO_USER_POOLS type, each element corresponds to a user pool ARN of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.

      • authType — (String)

        Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.

      • authorizerUri — (String)

        [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN 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}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{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.

      • authorizerCredentials — (String)

        Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

      • identitySource — (String)

        [Required] The source of the identity in an incoming request. For a TOKEN authorizer, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token. For COGNITO_USER_POOLS authorizers, this property is used.

      • identityValidationExpression — (String)

        A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.

      • authorizerResultTtlInSeconds — (Integer)

        The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

Returns:

  • (AWS.Request)

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

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

Describe an existing Authorizers resource.

Service Reference:

Examples:

Calling the getAuthorizers operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier for the Authorizers resource.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        Gets the current list of Authorizer resources in the collection.

        • id — (String)

          The identifier for the authorizer resource.

        • name — (String)

          [Required] The name of the authorizer.

        • type — (String)

          [Required] The type of the authorizer. Currently, the valid type is TOKEN for a Lambda function or COGNITO_USER_POOLS for an Amazon Cognito user pool.

          Possible values include:
          • "TOKEN"
          • "COGNITO_USER_POOLS"
        • providerARNs — (Array<String>)

          A list of the provider ARNs of the authorizer. For an TOKEN authorizer, this is not defined. For authorizers of the COGNITO_USER_POOLS type, each element corresponds to a user pool ARN of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.

        • authType — (String)

          Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.

        • authorizerUri — (String)

          [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN 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}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{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.

        • authorizerCredentials — (String)

          Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

        • identitySource — (String)

          [Required] The source of the identity in an incoming request. For a TOKEN authorizer, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token. For COGNITO_USER_POOLS authorizers, this property is used.

        • identityValidationExpression — (String)

          A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.

        • authorizerResultTtlInSeconds — (Integer)

          The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

Returns:

  • (AWS.Request)

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

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

Describe a BasePathMapping resource.

Service Reference:

Examples:

Calling the getBasePathMapping operation

var params = {
  basePath: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE' /* required */
};
apigateway.getBasePathMapping(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 of the BasePathMapping resource to be described.

    • basePath — (String)

      The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Leave this blank if you do not want callers to specify any base path name after 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:

      • basePath — (String)

        The base path name that callers of the API must provide as part of the URL after the domain name.

      • restApiId — (String)

        The name of the API.

      • stage — (String)

        The name of the API's stage.

Returns:

  • (AWS.Request)

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

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

Represents a collection of BasePathMapping resources.

Service Reference:

Examples:

Calling the getBasePathMappings operation

var params = {
  domainName: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getBasePathMappings(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 of a BasePathMapping resource.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of any BasePathMapping resources in the collection of base path mapping resources.

        • basePath — (String)

          The base path name that callers of the API must provide as part of the URL after the domain name.

        • restApiId — (String)

          The name of the API.

        • stage — (String)

          The name of the API's stage.

Returns:

  • (AWS.Request)

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

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

Gets information about the current ClientCertificate resource.

Service Reference:

Examples:

Calling the getClientCertificate operation

var params = {
  clientCertificateId: 'STRING_VALUE' /* required */
};
apigateway.getClientCertificate(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: {})
    • clientCertificateId — (String)

      The identifier of the ClientCertificate resource to be described.

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:

      • clientCertificateId — (String)

        The identifier of the client certificate.

      • description — (String)

        The description of the client certificate.

      • pemEncodedCertificate — (String)

        The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .

      • createdDate — (Date)

        The timestamp when the client certificate was created.

      • expirationDate — (Date)

        The timestamp when the client certificate will expire.

Returns:

  • (AWS.Request)

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

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

Gets a collection of ClientCertificate resources.

Service Reference:

Examples:

Calling the getClientCertificates operation

var params = {
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getClientCertificates(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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of any ClientCertificate resources in the collection of ClientCertificate resources.

        • clientCertificateId — (String)

          The identifier of the client certificate.

        • description — (String)

          The description of the client certificate.

        • pemEncodedCertificate — (String)

          The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .

        • createdDate — (Date)

          The timestamp when the client certificate was created.

        • expirationDate — (Date)

          The timestamp when the client certificate will expire.

Returns:

  • (AWS.Request)

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

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

Gets information about a Deployment resource.

Service Reference:

Examples:

Calling the getDeployment operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  embed: [
    'STRING_VALUE',
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Deployment resource to get information about.

    • deploymentId — (String)

      The identifier of the Deployment resource to get information about.

    • embed — (Array<String>)

      A query parameter to retrieve the specified embedded resources of the returned Deployment resource in the response. In a REST API call, this embed parameter value is a list of comma-separated strings, as in GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=var1,var2. The SDK and other platform-dependent libraries might use a different format for the list. Currently, this request supports only retrieval of the embedded API summary this way. Hence, the parameter value must be a single-valued list containing only the "apisummary" string. For example, GET /restapis/{restapi_id}/deployments/{deployment_id}?embed=apisummary.

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:

      • id — (String)

        The identifier for the deployment resource.

      • description — (String)

        The description for the deployment resource.

      • createdDate — (Date)

        The date and time that the deployment resource was created.

      • apiSummary — (map<map<map>>)

        A summary of the RestApi at the date and time that the deployment resource was created.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • apiKeyRequired — (Boolean)

          Specifies whether the method requires a valid ApiKey.

Returns:

  • (AWS.Request)

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

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

Gets information about a Deployments collection.

Service Reference:

Examples:

Calling the getDeployments operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the collection of Deployment resources to get information about.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of any Deployment resources in the collection of deployment resources.

        • id — (String)

          The identifier for the deployment resource.

        • description — (String)

          The description for the deployment resource.

        • createdDate — (Date)

          The date and time that the deployment resource was created.

        • apiSummary — (map<map<map>>)

          A summary of the RestApi at the date and time that the deployment resource was created.

          • authorizationType — (String)

            The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

          • apiKeyRequired — (Boolean)

            Specifies whether the method requires a valid ApiKey.

Returns:

  • (AWS.Request)

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

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

Calls the GetDocumentationPart API operation.

Service Reference:

Examples:

Calling the getDocumentationPart operation

var params = {
  documentationPartId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.getDocumentationPart(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-retrieved documentation part.

    • documentationPartId — (String)

      [Required] The identifier of the to-be-retrieved documentation part.

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:

      • id — (String)

        The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

      • location — (map)

        The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

        • typerequired — (String)

          The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

          Possible values include:
          • "API"
          • "AUTHORIZER"
          • "MODEL"
          • "RESOURCE"
          • "METHOD"
          • "PATH_PARAMETER"
          • "QUERY_PARAMETER"
          • "REQUEST_HEADER"
          • "REQUEST_BODY"
          • "RESPONSE"
          • "RESPONSE_HEADER"
          • "RESPONSE_BODY"
        • path — (String)

          The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

        • method — (String)

          The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

        • statusCode — (String)

          The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

        • name — (String)

          The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

      • properties — (String)

        A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

Returns:

  • (AWS.Request)

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

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

Calls the GetDocumentationParts API operation.

Service Reference:

Examples:

Calling the getDocumentationParts operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  nameQuery: 'STRING_VALUE',
  path: 'STRING_VALUE',
  position: 'STRING_VALUE',
  type: API | AUTHORIZER | MODEL | RESOURCE | METHOD | PATH_PARAMETER | QUERY_PARAMETER | REQUEST_HEADER | REQUEST_BODY | RESPONSE | RESPONSE_HEADER | RESPONSE_BODY
};
apigateway.getDocumentationParts(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: {})
    • restApiId — (String)

      [Required] The identifier of the API of the to-be-retrieved documentation parts.

    • type — (String)

      The type of API entities of the to-be-retrieved documentation parts.

      Possible values include:
      • "API"
      • "AUTHORIZER"
      • "MODEL"
      • "RESOURCE"
      • "METHOD"
      • "PATH_PARAMETER"
      • "QUERY_PARAMETER"
      • "REQUEST_HEADER"
      • "REQUEST_BODY"
      • "RESPONSE"
      • "RESPONSE_HEADER"
      • "RESPONSE_BODY"
    • nameQuery — (String)

      The name of API entities of the to-be-retrieved documentation parts.

    • path — (String)

      The path of API entities of the to-be-retrieved documentation parts.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of DocumentationPart resources in the DocumentationParts collection.

        • id — (String)

          The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

        • location — (map)

          The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

          • typerequired — (String)

            The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

            Possible values include:
            • "API"
            • "AUTHORIZER"
            • "MODEL"
            • "RESOURCE"
            • "METHOD"
            • "PATH_PARAMETER"
            • "QUERY_PARAMETER"
            • "REQUEST_HEADER"
            • "REQUEST_BODY"
            • "RESPONSE"
            • "RESPONSE_HEADER"
            • "RESPONSE_BODY"
          • path — (String)

            The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

          • method — (String)

            The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

          • statusCode — (String)

            The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

          • name — (String)

            The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

        • properties — (String)

          A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

Returns:

  • (AWS.Request)

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

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

Calls the GetDocumentationVersion API operation.

Service Reference:

Examples:

Calling the getDocumentationVersion operation

var params = {
  documentationVersion: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.getDocumentationVersion(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: {})
    • restApiId — (String)

      [Required] The identifier of the API of the to-be-retrieved documentation snapshot.

    • documentationVersion — (String)

      [Required] The version identifier of the to-be-retrieved documentation snapshot.

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:

      • version — (String)

        The version identifier of the API documentation snapshot.

      • createdDate — (Date)

        The date when the API documentation snapshot is created.

      • description — (String)

        The description of the API documentation snapshot.

Returns:

  • (AWS.Request)

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

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

Calls the GetDocumentationVersions API operation.

Service Reference:

Examples:

Calling the getDocumentationVersions operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getDocumentationVersions(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-retrieved documentation versions.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of DocumentationVersion items from the DocumentationVersions collection of an API.

        • version — (String)

          The version identifier of the API documentation snapshot.

        • createdDate — (Date)

          The date when the API documentation snapshot is created.

        • description — (String)

          The description of the API documentation snapshot.

Returns:

  • (AWS.Request)

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

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

Represents a domain name that is contained in a simpler, more intuitive URL that can be called.

Service Reference:

Examples:

Calling the getDomainName operation

var params = {
  domainName: 'STRING_VALUE' /* required */
};
apigateway.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 name of the DomainName 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:

      • domainName — (String)

        The name of the DomainName resource.

      • certificateName — (String)

        The name of the certificate.

      • certificateArn — (String)

        The reference to an AWS-managed certificate. AWS Certificate Manager is the only supported source.

      • certificateUploadDate — (Date)

        The timestamp when the certificate was uploaded.

      • distributionDomainName — (String)

        The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

Returns:

  • (AWS.Request)

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

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

Represents a collection of DomainName resources.

Service Reference:

Examples:

Calling the getDomainNames operation

var params = {
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of any DomainName resources in the collection of DomainName resources.

        • domainName — (String)

          The name of the DomainName resource.

        • certificateName — (String)

          The name of the certificate.

        • certificateArn — (String)

          The reference to an AWS-managed certificate. AWS Certificate Manager is the only supported source.

        • certificateUploadDate — (Date)

          The timestamp when the certificate was uploaded.

        • distributionDomainName — (String)

          The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

Returns:

  • (AWS.Request)

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

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

Exports a deployed version of a RestApi in a specified format.

Service Reference:

Examples:

Calling the getExport operation

var params = {
  exportType: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE', /* required */
  accepts: 'STRING_VALUE',
  parameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.getExport(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: {})
    • restApiId — (String)

      The identifier of the RestApi to be exported.

    • stageName — (String)

      The name of the Stage that will be exported.

    • exportType — (String)

      The type of export. Currently only 'swagger' is supported.

    • parameters — (map<String>)

      A key-value map of query string parameters that specify properties of the export, depending on the requested exportType. For exportType swagger, any combination of the following parameters are supported: integrations will export the API with x-amazon-apigateway-integration extensions. authorizers will export the API with x-amazon-apigateway-authorizer extensions. postman will export the API with Postman extensions, allowing for import to the Postman tool

    • accepts — (String)

      The content-type of the export, for example application/json. Currently application/json and application/yaml are supported for exportType of swagger. This should be specified in the Accept header for direct API requests.

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 header value in the HTTP response. This will correspond to a valid 'accept' type in the request.

      • contentDisposition — (String)

        The content-disposition header value in the HTTP response.

      • body — (Buffer, Typed Array, Blob, String)

        The binary blob response to GetExport, which contains the export.

Returns:

  • (AWS.Request)

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

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

Represents a get integration.

Service Reference:

Examples:

Calling the getIntegration operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      Specifies a get integration request's API identifier.

    • resourceId — (String)

      Specifies a get integration request's resource identifier

    • httpMethod — (String)

      Specifies a get integration request's HTTP method.

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:

      • type — (String)

        Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

        Specifies the integration's HTTP method type.

      • uri — (String)

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

      • passthroughBehavior — (String)

        Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
        • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
        • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
      • contentHandling — (String)

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

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

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

        If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

        Specifies the integration's cache namespace.

      • cacheKeyParameters — (Array<String>)

        Specifies the integration's cache key parameters.

      • integrationResponses — (map<map>)

        Specifies the integration's responses.

        Example: Get integration responses of a method

        Request

        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
        Response

        The successful response returns 200 OK status and a payload as follows:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

        • statusCode — (String)

          Specifies the status code that is used to map the integration response to an existing MethodResponse.

        • selectionPattern — (String)

          Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

        • responseParameters — (map<String>)

          A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

          Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

        • contentHandling — (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 method response without modification.

          Possible values include:
          • "CONVERT_TO_BINARY"
          • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Represents a get integration response.

Service Reference:

Examples:

Calling the getIntegrationResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      Specifies a get integration response request's API identifier.

    • resourceId — (String)

      Specifies a get integration response request's resource identifier.

    • httpMethod — (String)

      Specifies a get integration response request's HTTP method.

    • statusCode — (String)

      Specifies a get integration response request's status code.

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:

      • statusCode — (String)

        Specifies the status code that is used to map the integration response to an existing MethodResponse.

      • selectionPattern — (String)

        Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

      • responseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

        Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • contentHandling — (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 method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Describe an existing Method resource.

Service Reference:

Examples:

Calling the getMethod operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.getMethod(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: {})
    • restApiId — (String)

      The RestApi identifier for the Method resource.

    • resourceId — (String)

      The Resource identifier for the Method resource.

    • httpMethod — (String)

      Specifies the method request's HTTP method type.

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:

      • httpMethod — (String)

        The method's HTTP verb.

      • authorizationType — (String)

        The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

      • authorizerId — (String)

        The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

      • apiKeyRequired — (Boolean)

        A boolean flag specifying whether a valid ApiKey is required to invoke this method.

      • requestValidatorId — (String)

        The identifier of a RequestValidator for request validation.

      • operationName — (String)

        A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

      • requestParameters — (map<Boolean>)

        A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

      • requestModels — (map<String>)

        A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

      • methodResponses — (map<map>)

        Gets a method response associated with a given HTTP status code.

        The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

        Example: Get a 200 OK response of a GET method

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

        • statusCode — (String)

          The method response's status code.

        • responseParameters — (map<Boolean>)

          A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

        • responseModels — (map<String>)

          Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

      • methodIntegration — (map)

        Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

        Example:

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

        • type — (String)

          Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

          Specifies the integration's HTTP method type.

        • uri — (String)

          Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

        • credentials — (String)

          Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

        • requestParameters — (map<String>)

          A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

        • passthroughBehavior — (String)

          Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

          • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
          • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
          • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
        • contentHandling — (String)

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

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

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

          If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

          Specifies the integration's cache namespace.

        • cacheKeyParameters — (Array<String>)

          Specifies the integration's cache key parameters.

        • integrationResponses — (map<map>)

          Specifies the integration's responses.

          Example: Get integration responses of a method

          Request

          GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
          Response

          The successful response returns 200 OK status and a payload as follows:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

          • statusCode — (String)

            Specifies the status code that is used to map the integration response to an existing MethodResponse.

          • selectionPattern — (String)

            Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

          • responseParameters — (map<String>)

            A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

          • contentHandling — (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 method response without modification.

            Possible values include:
            • "CONVERT_TO_BINARY"
            • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Describes a MethodResponse resource.

Service Reference:

Examples:

Calling the getMethodResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE' /* required */
};
apigateway.getMethodResponse(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: {})

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:

      • statusCode — (String)

        The method response's status code.

      • responseParameters — (map<Boolean>)

        A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

      • responseModels — (map<String>)

        Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

Returns:

  • (AWS.Request)

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

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

Describes an existing model defined for a RestApi resource.

Service Reference:

Examples:

Calling the getModel operation

var params = {
  modelName: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  flatten: true || false
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier under which the Model exists.

    • modelName — (String)

      The name of the model as an identifier.

    • flatten — (Boolean)

      A query parameter of a Boolean value to resolve (true) all external model references and returns a flattened model schema or not (false) The default 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:

      • id — (String)

        The identifier for the model resource.

      • name — (String)

        The name of the model.

      • description — (String)

        The description of the model.

      • schema — (String)

        The schema for the model. For application/json models, this should be JSON-schema draft v4 model. Do not include "*/" characters in the description of any properties because such "*/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

      • contentType — (String)

        The content-type for the model.

Returns:

  • (AWS.Request)

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

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

Describes existing Models defined for a RestApi resource.

Service Reference:

Examples:

Calling the getModels operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        Gets the current Model resource in the collection.

        • id — (String)

          The identifier for the model resource.

        • name — (String)

          The name of the model.

        • description — (String)

          The description of the model.

        • schema — (String)

          The schema for the model. For application/json models, this should be JSON-schema draft v4 model. Do not include "*/" characters in the description of any properties because such "*/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

        • contentType — (String)

          The content-type for the model.

Returns:

  • (AWS.Request)

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

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

Generates a sample mapping template that can be used to transform a payload into the structure of a model.

Service Reference:

Examples:

Calling the getModelTemplate operation

var params = {
  modelName: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The ID of the RestApi under which the model exists.

    • modelName — (String)

      The name of the model for which to generate a template.

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:

Returns:

  • (AWS.Request)

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

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

Gets a RequestValidator of a given RestApi.

Service Reference:

Examples:

Calling the getRequestValidator operation

var params = {
  requestValidatorId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.getRequestValidator(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: {})
    • restApiId — (String)

      [Required] The identifier of the RestApi to which the specified RequestValidator belongs.

    • requestValidatorId — (String)

      [Required] The identifier of the RequestValidator to be retrieved.

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:

      • id — (String)

        The identifier of this RequestValidator.

      • name — (String)

        The name of this RequestValidator

      • validateRequestBody — (Boolean)

        A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

      • validateRequestParameters — (Boolean)

        A Boolean flag to indicate whether to validate request parameters (true) or not (false).

Returns:

  • (AWS.Request)

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

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

Gets the RequestValidators collection of a given RestApi.

Service Reference:

Examples:

Calling the getRequestValidators operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getRequestValidators(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: {})
    • restApiId — (String)

      [Required] The identifier of a RestApi to which the RequestValidators collection belongs.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        The current page of RequestValidator resources in the RequestValidators collection.

        • id — (String)

          The identifier of this RequestValidator.

        • name — (String)

          The name of this RequestValidator

        • validateRequestBody — (Boolean)

          A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

        • validateRequestParameters — (Boolean)

          A Boolean flag to indicate whether to validate request parameters (true) or not (false).

Returns:

  • (AWS.Request)

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

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

Lists information about a resource.

Service Reference:

Examples:

Calling the getResource operation

var params = {
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  embed: [
    'STRING_VALUE',
    /* more items */
  ]
};
apigateway.getResource(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: {})
    • restApiId — (String)

      The RestApi identifier for the resource.

    • resourceId — (String)

      The identifier for the Resource resource.

    • embed — (Array<String>)

      A query parameter to retrieve the specified resources embedded in the returned Resource representation in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the "methods" string. For example, GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods.

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:

      • id — (String)

        The resource's identifier.

      • parentId — (String)

        The parent resource's identifier.

      • pathPart — (String)

        The last path segment for this resource.

      • path — (String)

        The full path for this resource.

      • resourceMethods — (map<map>)

        Gets an API resource's method of a given HTTP verb.

        The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods request.

        Example: Get the GET method of an API resource

        Request
        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response
        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE", "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } }

        If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS.

        • httpMethod — (String)

          The method's HTTP verb.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • authorizerId — (String)

          The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

        • apiKeyRequired — (Boolean)

          A boolean flag specifying whether a valid ApiKey is required to invoke this method.

        • requestValidatorId — (String)

          The identifier of a RequestValidator for request validation.

        • operationName — (String)

          A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

        • requestParameters — (map<Boolean>)

          A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

        • requestModels — (map<String>)

          A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

        • methodResponses — (map<map>)

          Gets a method response associated with a given HTTP status code.

          The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

          Example: Get a 200 OK response of a GET method

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

          • statusCode — (String)

            The method response's status code.

          • responseParameters — (map<Boolean>)

            A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

          • responseModels — (map<String>)

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

        • methodIntegration — (map)

          Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

          Example:

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

          • type — (String)

            Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

            Specifies the integration's HTTP method type.

          • uri — (String)

            Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

          • credentials — (String)

            Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

          • requestParameters — (map<String>)

            A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

          • passthroughBehavior — (String)

            Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

            • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
            • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
            • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
          • contentHandling — (String)

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

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

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

            If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

            Specifies the integration's cache namespace.

          • cacheKeyParameters — (Array<String>)

            Specifies the integration's cache key parameters.

          • integrationResponses — (map<map>)

            Specifies the integration's responses.

            Example: Get integration responses of a method

            Request

            GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
            Response

            The successful response returns 200 OK status and a payload as follows:

            { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

            • statusCode — (String)

              Specifies the status code that is used to map the integration response to an existing MethodResponse.

            • selectionPattern — (String)

              Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

            • responseParameters — (map<String>)

              A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • contentHandling — (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 method response without modification.

              Possible values include:
              • "CONVERT_TO_BINARY"
              • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Lists information about a collection of Resource resources.

Service Reference:

Examples:

Calling the getResources operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  embed: [
    'STRING_VALUE',
    /* more items */
  ],
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getResources(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: {})
    • restApiId — (String)

      The RestApi identifier for the Resource.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

    • embed — (Array<String>)

      A query parameter used to retrieve the specified resources embedded in the returned Resources resource in the response. This embed parameter value is a list of comma-separated strings. Currently, the request supports only retrieval of the embedded Method resources this way. The query parameter value must be a single-valued list and contain the "methods" string. For example, GET /restapis/{restapi_id}/resources?embed=methods.

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:

      • position — (String)
      • items — (Array<map>)

        Gets the current Resource resource in the collection.

        • id — (String)

          The resource's identifier.

        • parentId — (String)

          The parent resource's identifier.

        • pathPart — (String)

          The last path segment for this resource.

        • path — (String)

          The full path for this resource.

        • resourceMethods — (map<map>)

          Gets an API resource's method of a given HTTP verb.

          The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods request.

          Example: Get the GET method of an API resource

          Request
          GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response
          { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE", "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } }

          If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS.

          • httpMethod — (String)

            The method's HTTP verb.

          • authorizationType — (String)

            The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

          • authorizerId — (String)

            The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

          • apiKeyRequired — (Boolean)

            A boolean flag specifying whether a valid ApiKey is required to invoke this method.

          • requestValidatorId — (String)

            The identifier of a RequestValidator for request validation.

          • operationName — (String)

            A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

          • requestParameters — (map<Boolean>)

            A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

          • requestModels — (map<String>)

            A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

          • methodResponses — (map<map>)

            Gets a method response associated with a given HTTP status code.

            The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

            Example: Get a 200 OK response of a GET method

            Request

            GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
            Response

            The successful response returns a 200 OK status code and a payload similar to the following:

            { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

            • statusCode — (String)

              The method response's status code.

            • responseParameters — (map<Boolean>)

              A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

            • responseModels — (map<String>)

              Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

          • methodIntegration — (map)

            Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

            Example:

            Request

            GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
            Response

            The successful response returns a 200 OK status code and a payload similar to the following:

            { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

            • type — (String)

              Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

              Specifies the integration's HTTP method type.

            • uri — (String)

              Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

            • credentials — (String)

              Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

            • requestParameters — (map<String>)

              A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

            • passthroughBehavior — (String)

              Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

              • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
              • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
              • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
            • contentHandling — (String)

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

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

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

              If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

              Specifies the integration's cache namespace.

            • cacheKeyParameters — (Array<String>)

              Specifies the integration's cache key parameters.

            • integrationResponses — (map<map>)

              Specifies the integration's responses.

              Example: Get integration responses of a method

              Request

              GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
              Response

              The successful response returns 200 OK status and a payload as follows:

              { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

              • statusCode — (String)

                Specifies the status code that is used to map the integration response to an existing MethodResponse.

              • selectionPattern — (String)

                Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

              • responseParameters — (map<String>)

                A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

                Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

              • contentHandling — (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 method response without modification.

                Possible values include:
                • "CONVERT_TO_BINARY"
                • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Lists the RestApi resource in the collection.

Service Reference:

Examples:

Calling the getRestApi operation

var params = {
  restApiId: 'STRING_VALUE' /* required */
};
apigateway.getRestApi(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: {})
    • restApiId — (String)

      The identifier of the RestApi 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:

      • id — (String)

        The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

      • name — (String)

        The API's name.

      • description — (String)

        The API's description.

      • createdDate — (Date)

        The timestamp when the API was created.

      • version — (String)

        A version identifier for the API.

      • warnings — (Array<String>)

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

      • binaryMediaTypes — (Array<String>)

        The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Lists the RestApis resources for your collection.

Service Reference:

Examples:

Calling the getRestApis operation

var params = {
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getRestApis(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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page. The value is 25 by default and could be between 1 - 500.

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:

      • position — (String)
      • items — (Array<map>)

        An array of links to the current page of RestApi resources.

        • id — (String)

          The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

        • name — (String)

          The API's name.

        • description — (String)

          The API's description.

        • createdDate — (Date)

          The timestamp when the API was created.

        • version — (String)

          A version identifier for the API.

        • warnings — (Array<String>)

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

        • binaryMediaTypes — (Array<String>)

          The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Generates a client SDK for a RestApi and Stage.

Service Reference:

Examples:

Calling the getSdk operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  sdkType: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE', /* required */
  parameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.getSdk(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: {})
    • restApiId — (String)

      The identifier of the RestApi that the SDK will use.

    • stageName — (String)

      The name of the Stage that the SDK will use.

    • sdkType — (String)

      The language for the generated SDK. Currently javascript, android, and objectivec (for iOS) are supported.

    • parameters — (map<String>)

      A key-value map of query string parameters that specify properties of the SDK, depending on the requested sdkType. For sdkType of objectivec, a parameter named classPrefix is required. For sdkType of android, parameters named groupId, artifactId, artifactVersion, and invokerPackage are required.

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 header value in the HTTP response.

      • contentDisposition — (String)

        The content-disposition header value in the HTTP response.

      • body — (Buffer, Typed Array, Blob, String)

        The binary blob response to GetSdk, which contains the generated SDK.

Returns:

  • (AWS.Request)

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

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

Calls the GetSdkType API operation.

Service Reference:

Examples:

Calling the getSdkType operation

var params = {
  id: 'STRING_VALUE' /* required */
};
apigateway.getSdkType(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: {})
    • id — (String)

      The identifier of the queried SdkType instance.

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:

      • id — (String)

        The identifier of an SdkType instance.

      • friendlyName — (String)

        The user-friendly name of an SdkType instance.

      • description — (String)

        The description of an SdkType.

      • configurationProperties — (Array<map>)

        A list of configuration properties of an SdkType.

        • name — (String)

          The name of a an SdkType configuration property.

        • friendlyName — (String)

          The user-friendly name of an SdkType configuration property.

        • description — (String)

          The description of an SdkType configuration property.

        • required — (Boolean)

          A boolean flag of an SdkType configuration property to indicate if the associated SDK configuration property is required (true) or not (false).

        • defaultValue — (String)

          The default value of an SdkType configuration property.

Returns:

  • (AWS.Request)

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

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

Calls the GetSdkTypes API operation.

Service Reference:

Examples:

Calling the getSdkTypes operation

var params = {
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getSdkTypes(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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        The set of SdkType items that comprise this view of the SdkTypes collection.

        • id — (String)

          The identifier of an SdkType instance.

        • friendlyName — (String)

          The user-friendly name of an SdkType instance.

        • description — (String)

          The description of an SdkType.

        • configurationProperties — (Array<map>)

          A list of configuration properties of an SdkType.

          • name — (String)

            The name of a an SdkType configuration property.

          • friendlyName — (String)

            The user-friendly name of an SdkType configuration property.

          • description — (String)

            The description of an SdkType configuration property.

          • required — (Boolean)

            A boolean flag of an SdkType configuration property to indicate if the associated SDK configuration property is required (true) or not (false).

          • defaultValue — (String)

            The default value of an SdkType configuration property.

Returns:

  • (AWS.Request)

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

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

Gets information about a Stage resource.

Service Reference:

Examples:

Calling the getStage operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE' /* required */
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Stage resource to get information about.

    • stageName — (String)

      The name of the Stage resource to get information about.

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:

      • deploymentId — (String)

        The identifier of the Deployment that the stage points to.

      • clientCertificateId — (String)

        The identifier of a client certificate for an API stage.

      • stageName — (String)

        The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

      • description — (String)

        The stage's description.

      • cacheClusterEnabled — (Boolean)

        Specifies whether a cache cluster is enabled for the stage.

      • cacheClusterSize — (String)

        The size of the cache cluster for the stage, if enabled.

        Possible values include:
        • "0.5"
        • "1.6"
        • "6.1"
        • "13.5"
        • "28.4"
        • "58.2"
        • "118"
        • "237"
      • cacheClusterStatus — (String)

        The status of the cache cluster for the stage, if enabled.

        Possible values include:
        • "CREATE_IN_PROGRESS"
        • "AVAILABLE"
        • "DELETE_IN_PROGRESS"
        • "NOT_AVAILABLE"
        • "FLUSH_IN_PROGRESS"
      • methodSettings — (map<map>)

        A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /&#42;/&#42; for overriding all methods in the stage.

        • metricsEnabled — (Boolean)

          Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

        • loggingLevel — (String)

          Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

        • dataTraceEnabled — (Boolean)

          Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

        • throttlingBurstLimit — (Integer)

          Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

        • throttlingRateLimit — (Float)

          Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

        • cachingEnabled — (Boolean)

          Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

        • cacheTtlInSeconds — (Integer)

          Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

        • cacheDataEncrypted — (Boolean)

          Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

        • requireAuthorizationForCacheControl — (Boolean)

          Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

        • unauthorizedCacheControlHeaderStrategy — (String)

          Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

          Possible values include:
          • "FAIL_WITH_403"
          • "SUCCEED_WITH_RESPONSE_HEADER"
          • "SUCCEED_WITHOUT_RESPONSE_HEADER"
      • variables — (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-._~:/?#&=,]+.

      • documentationVersion — (String)

        The version of the associated API documentation.

      • createdDate — (Date)

        The timestamp when the stage was created.

      • lastUpdatedDate — (Date)

        The timestamp when the stage last updated.

Returns:

  • (AWS.Request)

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

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

Gets information about one or more Stage resources.

Service Reference:

Examples:

Calling the getStages operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  deploymentId: 'STRING_VALUE'
};
apigateway.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: {})
    • restApiId — (String)

      The stages' API identifiers.

    • deploymentId — (String)

      The stages' deployment identifiers.

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:

      • item — (Array<map>)

        An individual Stage resource.

        • deploymentId — (String)

          The identifier of the Deployment that the stage points to.

        • clientCertificateId — (String)

          The identifier of a client certificate for an API stage.

        • stageName — (String)

          The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

        • description — (String)

          The stage's description.

        • cacheClusterEnabled — (Boolean)

          Specifies whether a cache cluster is enabled for the stage.

        • cacheClusterSize — (String)

          The size of the cache cluster for the stage, if enabled.

          Possible values include:
          • "0.5"
          • "1.6"
          • "6.1"
          • "13.5"
          • "28.4"
          • "58.2"
          • "118"
          • "237"
        • cacheClusterStatus — (String)

          The status of the cache cluster for the stage, if enabled.

          Possible values include:
          • "CREATE_IN_PROGRESS"
          • "AVAILABLE"
          • "DELETE_IN_PROGRESS"
          • "NOT_AVAILABLE"
          • "FLUSH_IN_PROGRESS"
        • methodSettings — (map<map>)

          A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /&#42;/&#42; for overriding all methods in the stage.

          • metricsEnabled — (Boolean)

            Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

          • loggingLevel — (String)

            Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

          • dataTraceEnabled — (Boolean)

            Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

          • throttlingBurstLimit — (Integer)

            Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

          • throttlingRateLimit — (Float)

            Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

          • cachingEnabled — (Boolean)

            Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

          • cacheTtlInSeconds — (Integer)

            Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

          • cacheDataEncrypted — (Boolean)

            Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

          • requireAuthorizationForCacheControl — (Boolean)

            Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

          • unauthorizedCacheControlHeaderStrategy — (String)

            Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

            Possible values include:
            • "FAIL_WITH_403"
            • "SUCCEED_WITH_RESPONSE_HEADER"
            • "SUCCEED_WITHOUT_RESPONSE_HEADER"
        • variables — (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-._~:/?#&=,]+.

        • documentationVersion — (String)

          The version of the associated API documentation.

        • createdDate — (Date)

          The timestamp when the stage was created.

        • lastUpdatedDate — (Date)

          The timestamp when the stage last updated.

Returns:

  • (AWS.Request)

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

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

Gets the usage data of a usage plan in a specified time interval.

Service Reference:

Examples:

Calling the getUsage operation

var params = {
  endDate: 'STRING_VALUE', /* required */
  startDate: 'STRING_VALUE', /* required */
  usagePlanId: 'STRING_VALUE', /* required */
  keyId: 'STRING_VALUE',
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getUsage(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: {})
    • usagePlanId — (String)

      The Id of the usage plan associated with the usage data.

    • keyId — (String)

      The Id of the API key associated with the resultant usage data.

    • startDate — (String)

      The starting date (e.g., 2016-01-01) of the usage data.

    • endDate — (String)

      The ending date (e.g., 2016-12-31) of the usage data.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • usagePlanId — (String)

        The plan Id associated with this usage data.

      • startDate — (String)

        The starting date of the usage data.

      • endDate — (String)

        The ending date of the usage data.

      • position — (String)
      • items — (map<Array<Array<Integer>>>)

        The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota].

Returns:

  • (AWS.Request)

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

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

Gets a usage plan of a given plan identifier.

Service Reference:

Examples:

Calling the getUsagePlan operation

var params = {
  usagePlanId: 'STRING_VALUE' /* required */
};
apigateway.getUsagePlan(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: {})
    • usagePlanId — (String)

      The identifier of the UsagePlan resource to be retrieved.

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:

      • id — (String)

        The identifier of a UsagePlan resource.

      • name — (String)

        The name of a usage plan.

      • description — (String)

        The description of a usage plan.

      • apiStages — (Array<map>)

        The associated API stages of a usage plan.

        • apiId — (String)

          API Id of the associated API stage in a usage plan.

        • stage — (String)

          API stage name of the associated API stage in a usage plan.

      • throttle — (map)

        The request throttle limits of a usage plan.

        • burstLimit — (Integer)

          The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

        • rateLimit — (Float)

          The API request steady-state rate limit.

      • quota — (map)

        The maximum number of permitted requests per a given unit time interval.

        • limit — (Integer)

          The maximum number of requests that can be made in a given time period.

        • offset — (Integer)

          The number of requests subtracted from the given limit in the initial time period.

        • period — (String)

          The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

          Possible values include:
          • "DAY"
          • "WEEK"
          • "MONTH"
      • productCode — (String)

        The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

Returns:

  • (AWS.Request)

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

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

Gets a usage plan key of a given key identifier.

Service Reference:

Examples:

Calling the getUsagePlanKey operation

var params = {
  keyId: 'STRING_VALUE', /* required */
  usagePlanId: 'STRING_VALUE' /* required */
};
apigateway.getUsagePlanKey(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: {})
    • usagePlanId — (String)

      The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

    • keyId — (String)

      The key Id of the to-be-retrieved UsagePlanKey resource representing a plan customer.

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:

      • id — (String)

        The Id of a usage plan key.

      • type — (String)

        The type of a usage plan key. Currently, the valid key type is API_KEY.

      • value — (String)

        The value of a usage plan key.

      • name — (String)

        The name of a usage plan key.

Returns:

  • (AWS.Request)

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

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

Gets all the usage plan keys representing the API keys added to a specified usage plan.

Service Reference:

Examples:

Calling the getUsagePlanKeys operation

var params = {
  usagePlanId: 'STRING_VALUE', /* required */
  limit: 0,
  nameQuery: 'STRING_VALUE',
  position: 'STRING_VALUE'
};
apigateway.getUsagePlanKeys(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: {})
    • usagePlanId — (String)

      The Id of the UsagePlan resource representing the usage plan containing the to-be-retrieved UsagePlanKey resource representing a plan customer.

    • position — (String)

      The current pagination position in the paged result set.

    • limit — (Integer)

      The maximum number of returned results per page.

    • nameQuery — (String)

      A query parameter specifying the name of the to-be-returned usage plan keys.

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:

      • position — (String)
      • items — (Array<map>)

        Gets the current item of the usage plan keys collection.

        • id — (String)

          The Id of a usage plan key.

        • type — (String)

          The type of a usage plan key. Currently, the valid key type is API_KEY.

        • value — (String)

          The value of a usage plan key.

        • name — (String)

          The name of a usage plan key.

Returns:

  • (AWS.Request)

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

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

Gets all the usage plans of the caller's account.

Service Reference:

Examples:

Calling the getUsagePlans operation

var params = {
  keyId: 'STRING_VALUE',
  limit: 0,
  position: 'STRING_VALUE'
};
apigateway.getUsagePlans(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: {})
    • position — (String)

      The current pagination position in the paged result set.

    • keyId — (String)

      The identifier of the API key associated with the usage plans.

    • limit — (Integer)

      The maximum number of returned results per page.

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:

      • position — (String)
      • items — (Array<map>)

        Gets the current item when enumerating the collection of UsagePlan.

        • id — (String)

          The identifier of a UsagePlan resource.

        • name — (String)

          The name of a usage plan.

        • description — (String)

          The description of a usage plan.

        • apiStages — (Array<map>)

          The associated API stages of a usage plan.

          • apiId — (String)

            API Id of the associated API stage in a usage plan.

          • stage — (String)

            API stage name of the associated API stage in a usage plan.

        • throttle — (map)

          The request throttle limits of a usage plan.

          • burstLimit — (Integer)

            The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

          • rateLimit — (Float)

            The API request steady-state rate limit.

        • quota — (map)

          The maximum number of permitted requests per a given unit time interval.

          • limit — (Integer)

            The maximum number of requests that can be made in a given time period.

          • offset — (Integer)

            The number of requests subtracted from the given limit in the initial time period.

          • period — (String)

            The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

            Possible values include:
            • "DAY"
            • "WEEK"
            • "MONTH"
        • productCode — (String)

          The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

Returns:

  • (AWS.Request)

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

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

Import API keys from an external source, such as a CSV-formatted file.

Service Reference:

Examples:

Calling the importApiKeys operation

var params = {
  body: new Buffer('...') || 'STRING_VALUE', /* required */
  format: csv, /* required */
  failOnWarnings: true || false
};
apigateway.importApiKeys(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: {})
    • body — (Buffer, Typed Array, Blob, String)

      The payload of the POST request to import API keys. For the payload format, see API Key File Format.

    • format — (String)

      A query parameter to specify the input format to imported API keys. Currently, only the csv format is supported.

      Possible values include:
      • "csv"
    • failOnWarnings — (Boolean)

      A query parameter to indicate whether to rollback ApiKey importation (true) or not (false) when error is encountered.

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:

      • ids — (Array<String>)

        A list of all the ApiKey identifiers.

      • warnings — (Array<String>)

        A list of warning messages.

Returns:

  • (AWS.Request)

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

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

Calls the ImportDocumentationParts API operation.

Service Reference:

Examples:

Calling the importDocumentationParts operation

var params = {
  body: new Buffer('...') || 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  failOnWarnings: true || false,
  mode: merge | overwrite
};
apigateway.importDocumentationParts(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-imported documentation parts.

    • mode — (String)

      A query parameter to indicate whether to overwrite (OVERWRITE) any existing DocumentationParts definition or to merge (MERGE) the new definition into the existing one. The default value is MERGE.

      Possible values include:
      • "merge"
      • "overwrite"
    • failOnWarnings — (Boolean)

      A query parameter to specify whether to rollback the documentation importation (true) or not (false) when a warning is encountered. The default value is false.

    • body — (Buffer, Typed Array, Blob, String)

      [Required] Raw byte array representing the to-be-imported documentation parts. To import from a Swagger file, this is a JSON object.

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:

      • ids — (Array<String>)

        A list of the returned documentation part identifiers.

      • warnings — (Array<String>)

        A list of warning messages reported during import of documentation parts.

Returns:

  • (AWS.Request)

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

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

A feature of the Amazon API Gateway control service for creating a new API from an external API definition file.

Service Reference:

Examples:

Calling the importRestApi operation

var params = {
  body: new Buffer('...') || 'STRING_VALUE', /* required */
  failOnWarnings: true || false,
  parameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.importRestApi(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: {})
    • failOnWarnings — (Boolean)

      A query parameter to indicate whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.

    • parameters — (map<String>)

      Custom header parameters as part of the request.

    • body — (Buffer, Typed Array, Blob, String)

      The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.

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:

      • id — (String)

        The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

      • name — (String)

        The API's name.

      • description — (String)

        The API's description.

      • createdDate — (Date)

        The timestamp when the API was created.

      • version — (String)

        A version identifier for the API.

      • warnings — (Array<String>)

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

      • binaryMediaTypes — (Array<String>)

        The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Represents a put integration.

Service Reference:

Examples:

Calling the putIntegration operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  type: HTTP | AWS | MOCK | HTTP_PROXY | AWS_PROXY, /* required */
  cacheKeyParameters: [
    'STRING_VALUE',
    /* more items */
  ],
  cacheNamespace: 'STRING_VALUE',
  contentHandling: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  credentials: 'STRING_VALUE',
  integrationHttpMethod: 'STRING_VALUE',
  passthroughBehavior: 'STRING_VALUE',
  requestParameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  requestTemplates: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  uri: 'STRING_VALUE'
};
apigateway.putIntegration(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: {})
    • restApiId — (String)

      Specifies a put integration request's API identifier.

    • resourceId — (String)

      Specifies a put integration request's resource ID.

    • httpMethod — (String)

      Specifies a put integration request's HTTP method.

    • type — (String)

      Specifies a put integration input's type.

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

      Specifies a put integration HTTP method. When the integration type is HTTP or AWS, this field is required.

    • uri — (String)

      Specifies a put integration input's Uniform Resource Identifier (URI). When the integration type is HTTP or AWS, this field is required. For integration with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/<functionArn>/invocations' format.

    • credentials — (String)

      Specifies whether credentials are required for a put integration.

    • requestParameters — (map<String>)

      A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

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

      • WHEN_NO_MATCH passes the request body for unmapped content types through to the integration back end 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 415 response.

    • cacheNamespace — (String)

      Specifies a put integration input's cache namespace.

    • cacheKeyParameters — (Array<String>)

      Specifies a put integration input's cache key parameters.

    • contentHandling — (String)

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

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

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

      If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"

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:

      • type — (String)

        Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

        Specifies the integration's HTTP method type.

      • uri — (String)

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

      • passthroughBehavior — (String)

        Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
        • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
        • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
      • contentHandling — (String)

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

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

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

        If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

        Specifies the integration's cache namespace.

      • cacheKeyParameters — (Array<String>)

        Specifies the integration's cache key parameters.

      • integrationResponses — (map<map>)

        Specifies the integration's responses.

        Example: Get integration responses of a method

        Request

        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
        Response

        The successful response returns 200 OK status and a payload as follows:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

        • statusCode — (String)

          Specifies the status code that is used to map the integration response to an existing MethodResponse.

        • selectionPattern — (String)

          Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

        • responseParameters — (map<String>)

          A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

          Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

        • contentHandling — (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 method response without modification.

          Possible values include:
          • "CONVERT_TO_BINARY"
          • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Represents a put integration.

Service Reference:

Examples:

Calling the putIntegrationResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE', /* required */
  contentHandling: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
  responseParameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  responseTemplates: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  selectionPattern: 'STRING_VALUE'
};
apigateway.putIntegrationResponse(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: {})
    • restApiId — (String)

      Specifies a put integration response request's API identifier.

    • resourceId — (String)

      Specifies a put integration response request's resource identifier.

    • httpMethod — (String)

      Specifies a put integration response request's HTTP method.

    • statusCode — (String)

      Specifies the status code that is used to map the integration response to an existing MethodResponse.

    • selectionPattern — (String)

      Specifies the selection pattern of a put integration response.

    • responseParameters — (map<String>)

      A key-value map specifying response parameters that are passed to the method response from the back end. 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 must be a valid and unique response header name and JSON-expression a valid JSON expression without the $ prefix.

    • responseTemplates — (map<String>)

      Specifies a put integration response's templates.

    • contentHandling — (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 method response without modification.

      Possible values include:
      • "CONVERT_TO_BINARY"
      • "CONVERT_TO_TEXT"

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:

      • statusCode — (String)

        Specifies the status code that is used to map the integration response to an existing MethodResponse.

      • selectionPattern — (String)

        Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

      • responseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

        Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • contentHandling — (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 method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Add a method to an existing Resource resource.

Service Reference:

Examples:

Calling the putMethod operation

var params = {
  authorizationType: 'STRING_VALUE', /* required */
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  apiKeyRequired: true || false,
  authorizerId: 'STRING_VALUE',
  operationName: 'STRING_VALUE',
  requestModels: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  requestParameters: {
    '<String>': true || false,
    /* '<String>': ... */
  },
  requestValidatorId: 'STRING_VALUE'
};
apigateway.putMethod(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: {})
    • restApiId — (String)

      The RestApi identifier for the new Method resource.

    • resourceId — (String)

      The Resource identifier for the new Method resource.

    • httpMethod — (String)

      Specifies the method request's HTTP method type.

    • authorizationType — (String)

      The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

    • authorizerId — (String)

      Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM.

    • apiKeyRequired — (Boolean)

      Specifies whether the method required a valid ApiKey.

    • operationName — (String)

      A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

    • requestParameters — (map<Boolean>)

      A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key defines a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or body-mapping templates.

    • requestModels — (map<String>)

      Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.

    • requestValidatorId — (String)

      The identifier of a RequestValidator for validating the method request.

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:

      • httpMethod — (String)

        The method's HTTP verb.

      • authorizationType — (String)

        The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

      • authorizerId — (String)

        The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

      • apiKeyRequired — (Boolean)

        A boolean flag specifying whether a valid ApiKey is required to invoke this method.

      • requestValidatorId — (String)

        The identifier of a RequestValidator for request validation.

      • operationName — (String)

        A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

      • requestParameters — (map<Boolean>)

        A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

      • requestModels — (map<String>)

        A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

      • methodResponses — (map<map>)

        Gets a method response associated with a given HTTP status code.

        The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

        Example: Get a 200 OK response of a GET method

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

        • statusCode — (String)

          The method response's status code.

        • responseParameters — (map<Boolean>)

          A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

        • responseModels — (map<String>)

          Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

      • methodIntegration — (map)

        Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

        Example:

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

        • type — (String)

          Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

          Specifies the integration's HTTP method type.

        • uri — (String)

          Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

        • credentials — (String)

          Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

        • requestParameters — (map<String>)

          A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

        • passthroughBehavior — (String)

          Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

          • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
          • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
          • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
        • contentHandling — (String)

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

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

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

          If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

          Specifies the integration's cache namespace.

        • cacheKeyParameters — (Array<String>)

          Specifies the integration's cache key parameters.

        • integrationResponses — (map<map>)

          Specifies the integration's responses.

          Example: Get integration responses of a method

          Request

          GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
          Response

          The successful response returns 200 OK status and a payload as follows:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

          • statusCode — (String)

            Specifies the status code that is used to map the integration response to an existing MethodResponse.

          • selectionPattern — (String)

            Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

          • responseParameters — (map<String>)

            A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

          • contentHandling — (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 method response without modification.

            Possible values include:
            • "CONVERT_TO_BINARY"
            • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Adds a MethodResponse to an existing Method resource.

Service Reference:

Examples:

Calling the putMethodResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE', /* required */
  responseModels: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  responseParameters: {
    '<String>': true || false,
    /* '<String>': ... */
  }
};
apigateway.putMethodResponse(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: {})
    • restApiId — (String)

      The RestApi identifier for the Method resource.

    • resourceId — (String)

      The Resource identifier for the Method resource.

    • httpMethod — (String)

      The HTTP verb of the Method resource.

    • statusCode — (String)

      The method response's status code.

    • responseParameters — (map<Boolean>)

      A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header name and the associated value is a Boolean flag indicating whether the method response parameter is required or not. The method response header names must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The response parameter names defined here are available in the integration response to be mapped from an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

    • responseModels — (map<String>)

      Specifies the Model resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a Model name as the value.

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:

      • statusCode — (String)

        The method response's status code.

      • responseParameters — (map<Boolean>)

        A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

      • responseModels — (map<String>)

        Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

Returns:

  • (AWS.Request)

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

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

A feature of the Amazon API Gateway control service for updating an existing API with an input of external API definitions. The update can take the form of merging the supplied definition into the existing API or overwriting the existing API.

Service Reference:

Examples:

Calling the putRestApi operation

var params = {
  body: new Buffer('...') || 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  failOnWarnings: true || false,
  mode: merge | overwrite,
  parameters: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.putRestApi(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: {})
    • restApiId — (String)

      The identifier of the RestApi to be updated.

    • mode — (String)

      The mode query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".

      Possible values include:
      • "merge"
      • "overwrite"
    • failOnWarnings — (Boolean)

      A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value is false.

    • parameters — (map<String>)

      Custom headers supplied as part of the request.

    • body — (Buffer, Typed Array, Blob, String)

      The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.

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:

      • id — (String)

        The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

      • name — (String)

        The API's name.

      • description — (String)

        The API's description.

      • createdDate — (Date)

        The timestamp when the API was created.

      • version — (String)

        A version identifier for the API.

      • warnings — (Array<String>)

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

      • binaryMediaTypes — (Array<String>)

        The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Simulate the execution of an Authorizer in your RestApi with headers, parameters, and an incoming request body.

Service Reference:

Examples:

Calling the testInvokeAuthorizer operation

var params = {
  authorizerId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  additionalContext: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  body: 'STRING_VALUE',
  headers: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  pathWithQueryString: 'STRING_VALUE',
  stageVariables: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.testInvokeAuthorizer(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: {})
    • restApiId — (String)

      Specifies a test invoke authorizer request's RestApi identifier.

    • authorizerId — (String)

      Specifies a test invoke authorizer request's Authorizer ID.

    • headers — (map<String>)

      [Required] A key-value map of headers to simulate an incoming invocation request. This is where the incoming authorization token, or identity source, should be specified.

    • pathWithQueryString — (String)

      [Optional] The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

    • body — (String)

      [Optional] The simulated request body of an incoming invocation request.

    • stageVariables — (map<String>)

      A key-value map of stage variables to simulate an invocation on a deployed Stage.

    • additionalContext — (map<String>)

      [Optional] A key-value map of additional context variables.

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:

      • clientStatus — (Integer)

        The HTTP status code that the client would have received. Value is 0 if the authorizer succeeded.

      • log — (String)

        The Amazon API Gateway execution log for the test authorizer request.

      • latency — (Integer)

        The execution latency of the test authorizer request.

      • principalId — (String)

        The principal identity returned by the Authorizer

      • policy — (String)

        The JSON policy document returned by the Authorizer

      • authorization — (map<Array<String>>)
      • claims — (map<String>)

        The open identity claims, with any supported custom attributes, returned from the Cognito Your User Pool configured for the API.

Returns:

  • (AWS.Request)

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

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

Simulate the execution of a Method in your RestApi with headers, parameters, and an incoming request body.

Service Reference:

Examples:

Calling the testInvokeMethod operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  body: 'STRING_VALUE',
  clientCertificateId: 'STRING_VALUE',
  headers: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  pathWithQueryString: 'STRING_VALUE',
  stageVariables: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
apigateway.testInvokeMethod(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: {})
    • restApiId — (String)

      Specifies a test invoke method request's API identifier.

    • resourceId — (String)

      Specifies a test invoke method request's resource ID.

    • httpMethod — (String)

      Specifies a test invoke method request's HTTP method.

    • pathWithQueryString — (String)

      The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.

    • body — (String)

      The simulated request body of an incoming invocation request.

    • headers — (map<String>)

      A key-value map of headers to simulate an incoming invocation request.

    • clientCertificateId — (String)

      A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.

    • stageVariables — (map<String>)

      A key-value map of stage variables to simulate an invocation on a deployed 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:

      • status — (Integer)

        The HTTP status code.

      • body — (String)

        The body of the HTTP response.

      • headers — (map<String>)

        The headers of the HTTP response.

      • log — (String)

        The Amazon API Gateway execution log for the test invoke request.

      • latency — (Integer)

        The execution latency of the test invoke request.

Returns:

  • (AWS.Request)

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

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

Changes information about the current Account resource.

Service Reference:

Examples:

Calling the updateAccount operation

var params = {
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateAccount(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: {})
    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • cloudwatchRoleArn — (String)

        The ARN of an Amazon CloudWatch role for the current Account.

      • throttleSettings — (map)

        Specifies the API request limits configured for the current Account.

        • burstLimit — (Integer)

          The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

        • rateLimit — (Float)

          The API request steady-state rate limit.

      • features — (Array<String>)

        A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".

      • apiKeyVersion — (String)

        The version of the API keys used for the account.

Returns:

  • (AWS.Request)

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

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

Changes information about an ApiKey resource.

Service Reference:

Examples:

Calling the updateApiKey operation

var params = {
  apiKey: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateApiKey(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: {})
    • apiKey — (String)

      The identifier of the ApiKey resource to be updated.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier of the API Key.

      • value — (String)

        The value of the API Key.

      • name — (String)

        The name of the API Key.

      • customerId — (String)

        An AWS Marketplace customer identifier , when integrating with the AWS SaaS Marketplace.

      • description — (String)

        The description of the API Key.

      • enabled — (Boolean)

        Specifies whether the API Key can be used by callers.

      • createdDate — (Date)

        The timestamp when the API Key was created.

      • lastUpdatedDate — (Date)

        The timestamp when the API Key was last updated.

      • stageKeys — (Array<String>)

        A list of Stage resources that are associated with the ApiKey resource.

Returns:

  • (AWS.Request)

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

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

Updates an existing Authorizer resource.

Service Reference:

Examples:

Calling the updateAuthorizer operation

var params = {
  authorizerId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier for the Authorizer resource.

    • authorizerId — (String)

      The identifier of the Authorizer resource.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier for the authorizer resource.

      • name — (String)

        [Required] The name of the authorizer.

      • type — (String)

        [Required] The type of the authorizer. Currently, the valid type is TOKEN for a Lambda function or COGNITO_USER_POOLS for an Amazon Cognito user pool.

        Possible values include:
        • "TOKEN"
        • "COGNITO_USER_POOLS"
      • providerARNs — (Array<String>)

        A list of the provider ARNs of the authorizer. For an TOKEN authorizer, this is not defined. For authorizers of the COGNITO_USER_POOLS type, each element corresponds to a user pool ARN of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}.

      • authType — (String)

        Optional customer-defined field, used in Swagger imports/exports. Has no functional impact.

      • authorizerUri — (String)

        [Required] Specifies the authorizer's Uniform Resource Identifier (URI). For TOKEN 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}:function:{lambda_function_name}/invocations. In general, the URI has this form arn:aws:apigateway:{region}:lambda:path/{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.

      • authorizerCredentials — (String)

        Specifies the credentials required for the authorizer, if any. Two options are available. To specify an IAM role for Amazon API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.

      • identitySource — (String)

        [Required] The source of the identity in an incoming request. For a TOKEN authorizer, this value is a mapping expression with the same syntax as integration parameter mappings. The only valid source for tokens is 'header', so the expression should match 'method.request.header.[headerName]'. The value of the header '[headerName]' will be interpreted as the incoming token. For COGNITO_USER_POOLS authorizers, this property is used.

      • identityValidationExpression — (String)

        A validation expression for the incoming identity. For TOKEN authorizers, this value should be a regular expression. The incoming token from the client is matched against this expression, and will proceed if the token matches. If the token doesn't match, the client receives a 401 Unauthorized response.

      • authorizerResultTtlInSeconds — (Integer)

        The TTL in seconds of cached authorizer results. If greater than 0, API Gateway will cache authorizer responses. If this field is not set, the default value is 300. The maximum value is 3600, or 1 hour.

Returns:

  • (AWS.Request)

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

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

Changes information about the BasePathMapping resource.

Service Reference:

Examples:

Calling the updateBasePathMapping operation

var params = {
  basePath: 'STRING_VALUE', /* required */
  domainName: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateBasePathMapping(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 of the BasePathMapping resource to change.

    • basePath — (String)

      The base path of the BasePathMapping resource to change.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • basePath — (String)

        The base path name that callers of the API must provide as part of the URL after the domain name.

      • restApiId — (String)

        The name of the API.

      • stage — (String)

        The name of the API's stage.

Returns:

  • (AWS.Request)

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

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

Changes information about an ClientCertificate resource.

Service Reference:

Examples:

Calling the updateClientCertificate operation

var params = {
  clientCertificateId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateClientCertificate(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: {})
    • clientCertificateId — (String)

      The identifier of the ClientCertificate resource to be updated.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • clientCertificateId — (String)

        The identifier of the client certificate.

      • description — (String)

        The description of the client certificate.

      • pemEncodedCertificate — (String)

        The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .

      • createdDate — (Date)

        The timestamp when the client certificate was created.

      • expirationDate — (Date)

        The timestamp when the client certificate will expire.

Returns:

  • (AWS.Request)

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

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

Changes information about a Deployment resource.

Service Reference:

Examples:

Calling the updateDeployment operation

var params = {
  deploymentId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The replacement identifier of the RestApi resource for the Deployment resource to change information about.

    • deploymentId — (String)

      The replacement identifier for the Deployment resource to change information about.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier for the deployment resource.

      • description — (String)

        The description for the deployment resource.

      • createdDate — (Date)

        The date and time that the deployment resource was created.

      • apiSummary — (map<map<map>>)

        A summary of the RestApi at the date and time that the deployment resource was created.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • apiKeyRequired — (Boolean)

          Specifies whether the method requires a valid ApiKey.

Returns:

  • (AWS.Request)

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

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

Calls the UpdateDocumentationPart API operation.

Service Reference:

Examples:

Calling the updateDocumentationPart operation

var params = {
  documentationPartId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateDocumentationPart(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-updated documentation part.

    • documentationPartId — (String)

      [Required] The identifier of the to-be-updated documentation part.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The DocumentationPart identifier, generated by Amazon API Gateway when the DocumentationPart is created.

      • location — (map)

        The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.

        • typerequired — (String)

          The type of API entity to which the documentation content applies. It is a valid and required field for API entity types of API, AUTHORIZER, MODEL, RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. Content inheritance does not apply to any entity of the API, AUTHROZER, METHOD, MODEL, REQUEST_BODY, or RESOURCE type.

          Possible values include:
          • "API"
          • "AUTHORIZER"
          • "MODEL"
          • "RESOURCE"
          • "METHOD"
          • "PATH_PARAMETER"
          • "QUERY_PARAMETER"
          • "REQUEST_HEADER"
          • "REQUEST_BODY"
          • "RESPONSE"
          • "RESPONSE_HEADER"
          • "RESPONSE_BODY"
        • path — (String)

          The URL path of the target. It is a valid field for the API entity types of RESOURCE, METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is / for the root resource. When an applicable child entity inherits the content of another entity of the same type with more general specifications of the other location attributes, the child entity's path attribute must match that of the parent entity as a prefix.

        • method — (String)

          The HTTP verb of a method. It is a valid field for the API entity types of METHOD, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY, RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any method. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's method attribute must match that of the parent entity exactly.

        • statusCode — (String)

          The HTTP status code of a response. It is a valid field for the API entity types of RESPONSE, RESPONSE_HEADER, and RESPONSE_BODY. The default value is * for any status code. When an applicable child entity inherits the content of an entity of the same type with more general specifications of the other location attributes, the child entity's statusCode attribute must match that of the parent entity exactly.

        • name — (String)

          The name of the targeted API entity. It is a valid and required field for the API entity types of AUTHORIZER, MODEL, PATH_PARAMETER, QUERY_PARAMETER, REQUEST_HEADER, REQUEST_BODY and RESPONSE_HEADER. It is an invalid field for any other entity type.

      • properties — (String)

        A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ \"description\": \"The API does ...\" }". Only Swagger-compliant documentation-related fields from the properties map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation.

Returns:

  • (AWS.Request)

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

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

Calls the UpdateDocumentationVersion API operation.

Service Reference:

Examples:

Calling the updateDocumentationVersion operation

var params = {
  documentationVersion: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateDocumentationVersion(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: {})
    • restApiId — (String)

      [Required] The identifier of an API of the to-be-updated documentation version.

    • documentationVersion — (String)

      [Required] The version identifier of the to-be-updated documentation version.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • version — (String)

        The version identifier of the API documentation snapshot.

      • createdDate — (Date)

        The date when the API documentation snapshot is created.

      • description — (String)

        The description of the API documentation snapshot.

Returns:

  • (AWS.Request)

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

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

Changes information about the DomainName resource.

Service Reference:

Examples:

Calling the updateDomainName operation

var params = {
  domainName: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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 name of the DomainName resource to be changed.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • domainName — (String)

        The name of the DomainName resource.

      • certificateName — (String)

        The name of the certificate.

      • certificateArn — (String)

        The reference to an AWS-managed certificate. AWS Certificate Manager is the only supported source.

      • certificateUploadDate — (Date)

        The timestamp when the certificate was uploaded.

      • distributionDomainName — (String)

        The domain name of the Amazon CloudFront distribution. For more information, see the Amazon CloudFront documentation.

Returns:

  • (AWS.Request)

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

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

Represents an update integration.

Service Reference:

Examples:

Calling the updateIntegration operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      Represents an update integration request's API identifier.

    • resourceId — (String)

      Represents an update integration request's resource identifier.

    • httpMethod — (String)

      Represents an update integration request's HTTP method.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • type — (String)

        Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

        Specifies the integration's HTTP method type.

      • uri — (String)

        Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

      • credentials — (String)

        Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

      • requestParameters — (map<String>)

        A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

      • passthroughBehavior — (String)

        Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

        • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
        • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
        • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
      • contentHandling — (String)

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

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

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

        If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

        Specifies the integration's cache namespace.

      • cacheKeyParameters — (Array<String>)

        Specifies the integration's cache key parameters.

      • integrationResponses — (map<map>)

        Specifies the integration's responses.

        Example: Get integration responses of a method

        Request

        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
        Response

        The successful response returns 200 OK status and a payload as follows:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

        • statusCode — (String)

          Specifies the status code that is used to map the integration response to an existing MethodResponse.

        • selectionPattern — (String)

          Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

        • responseParameters — (map<String>)

          A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

          Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

        • contentHandling — (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 method response without modification.

          Possible values include:
          • "CONVERT_TO_BINARY"
          • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Represents an update integration response.

Service Reference:

Examples:

Calling the updateIntegrationResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      Specifies an update integration response request's API identifier.

    • resourceId — (String)

      Specifies an update integration response request's resource identifier.

    • httpMethod — (String)

      Specifies an update integration response request's HTTP method.

    • statusCode — (String)

      Specifies an update integration response request's status code.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • statusCode — (String)

        Specifies the status code that is used to map the integration response to an existing MethodResponse.

      • selectionPattern — (String)

        Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

      • responseParameters — (map<String>)

        A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

        Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

      • contentHandling — (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 method response without modification.

        Possible values include:
        • "CONVERT_TO_BINARY"
        • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Updates an existing Method resource.

Service Reference:

Examples:

Calling the updateMethod operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateMethod(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: {})
    • restApiId — (String)

      The RestApi identifier for the Method resource.

    • resourceId — (String)

      The Resource identifier for the Method resource.

    • httpMethod — (String)

      The HTTP verb of the Method resource.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • httpMethod — (String)

        The method's HTTP verb.

      • authorizationType — (String)

        The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

      • authorizerId — (String)

        The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

      • apiKeyRequired — (Boolean)

        A boolean flag specifying whether a valid ApiKey is required to invoke this method.

      • requestValidatorId — (String)

        The identifier of a RequestValidator for request validation.

      • operationName — (String)

        A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

      • requestParameters — (map<Boolean>)

        A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

      • requestModels — (map<String>)

        A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

      • methodResponses — (map<map>)

        Gets a method response associated with a given HTTP status code.

        The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

        Example: Get a 200 OK response of a GET method

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

        • statusCode — (String)

          The method response's status code.

        • responseParameters — (map<Boolean>)

          A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

        • responseModels — (map<String>)

          Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

      • methodIntegration — (map)

        Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

        Example:

        Request

        GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response

        The successful response returns a 200 OK status code and a payload similar to the following:

        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

        • type — (String)

          Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

          Specifies the integration's HTTP method type.

        • uri — (String)

          Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

        • credentials — (String)

          Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

        • requestParameters — (map<String>)

          A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

        • passthroughBehavior — (String)

          Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

          • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
          • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
          • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
        • contentHandling — (String)

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

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

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

          If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

          Specifies the integration's cache namespace.

        • cacheKeyParameters — (Array<String>)

          Specifies the integration's cache key parameters.

        • integrationResponses — (map<map>)

          Specifies the integration's responses.

          Example: Get integration responses of a method

          Request

          GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
          Response

          The successful response returns 200 OK status and a payload as follows:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

          • statusCode — (String)

            Specifies the status code that is used to map the integration response to an existing MethodResponse.

          • selectionPattern — (String)

            Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

          • responseParameters — (map<String>)

            A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

            Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

          • contentHandling — (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 method response without modification.

            Possible values include:
            • "CONVERT_TO_BINARY"
            • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Updates an existing MethodResponse resource.

Service Reference:

Examples:

Calling the updateMethodResponse operation

var params = {
  httpMethod: 'STRING_VALUE', /* required */
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  statusCode: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateMethodResponse(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: {})
    • restApiId — (String)

      The RestApi identifier for the MethodResponse resource.

    • resourceId — (String)

      The Resource identifier for the MethodResponse resource.

    • httpMethod — (String)

      The HTTP verb of the Method resource.

    • statusCode — (String)

      The status code for the MethodResponse resource.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • statusCode — (String)

        The method response's status code.

      • responseParameters — (map<Boolean>)

        A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

      • responseModels — (map<String>)

        Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

Returns:

  • (AWS.Request)

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

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

Changes information about a model.

Service Reference:

Examples:

Calling the updateModel operation

var params = {
  modelName: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The RestApi identifier under which the model exists.

    • modelName — (String)

      The name of the model to update.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier for the model resource.

      • name — (String)

        The name of the model.

      • description — (String)

        The description of the model.

      • schema — (String)

        The schema for the model. For application/json models, this should be JSON-schema draft v4 model. Do not include "*/" characters in the description of any properties because such "*/" characters may be interpreted as the closing marker for comments in some languages, such as Java or JavaScript, causing the installation of your API's SDK generated by API Gateway to fail.

      • contentType — (String)

        The content-type for the model.

Returns:

  • (AWS.Request)

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

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

Updates a RequestValidator of a given RestApi.

Service Reference:

Examples:

Calling the updateRequestValidator operation

var params = {
  requestValidatorId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateRequestValidator(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: {})
    • restApiId — (String)

      [Required] The identifier of the RestApi for which the given RequestValidator is updated.

    • requestValidatorId — (String)

      [Required] The identifier of RequestValidator to be updated.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier of this RequestValidator.

      • name — (String)

        The name of this RequestValidator

      • validateRequestBody — (Boolean)

        A Boolean flag to indicate whether to validate a request body according to the configured Model schema.

      • validateRequestParameters — (Boolean)

        A Boolean flag to indicate whether to validate request parameters (true) or not (false).

Returns:

  • (AWS.Request)

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

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

Changes information about a Resource resource.

Service Reference:

Examples:

Calling the updateResource operation

var params = {
  resourceId: 'STRING_VALUE', /* required */
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateResource(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: {})
    • restApiId — (String)

      The RestApi identifier for the Resource resource.

    • resourceId — (String)

      The identifier of the Resource resource.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The resource's identifier.

      • parentId — (String)

        The parent resource's identifier.

      • pathPart — (String)

        The last path segment for this resource.

      • path — (String)

        The full path for this resource.

      • resourceMethods — (map<map>)

        Gets an API resource's method of a given HTTP verb.

        The resource methods are a map of methods indexed by methods' HTTP verbs enabled on the resource. This method map is included in the 200 OK response of the GET /restapis/{restapi_id}/resources/{resource_id} or GET /restapis/{restapi_id}/resources/{resource_id}?embed=methods request.

        Example: Get the GET method of an API resource

        Request
        GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20170223T031827Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20170223/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
        Response
        { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "method:integration": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "method:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "method:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" }, "methodresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/{status_code}", "templated": true } }, "apiKeyRequired": false, "authorizationType": "NONE", "httpMethod": "GET", "_embedded": { "method:integration": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integration:responses": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "3kzxbg5sa2", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestParameters": { "integration.request.header.Content-Type": "'application/x-amz-json-1.1'" }, "requestTemplates": { "application/json": "{\n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-east-1:kinesis:action/ListStreams", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" } } }, "method:responses": { "_links": { "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", "name": "200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.Content-Type": false }, "statusCode": "200" } } }

        If the OPTIONS is enabled on the resource, you can follow the example here to get that method. Just replace the GET of the last path segment in the request URL with OPTIONS.

        • httpMethod — (String)

          The method's HTTP verb.

        • authorizationType — (String)

          The method's authorization type. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, CUSTOM for using a custom authorizer, or COGNITO_USER_POOLS for using a Cognito user pool.

        • authorizerId — (String)

          The identifier of an Authorizer to use on this method. The authorizationType must be CUSTOM.

        • apiKeyRequired — (Boolean)

          A boolean flag specifying whether a valid ApiKey is required to invoke this method.

        • requestValidatorId — (String)

          The identifier of a RequestValidator for request validation.

        • operationName — (String)

          A human-friendly operation identifier for the method. For example, you can assign the operationName of ListPets for the GET /pets method in PetStore example.

        • requestParameters — (map<Boolean>)

          A key-value map defining required or optional method request parameters that can be accepted by Amazon API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required (true) or optional (false). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.

        • requestModels — (map<String>)

          A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).

        • methodResponses — (map<map>)

          Gets a method response associated with a given HTTP status code.

          The collection of method responses are encapsulated in a key-value map, where the key is a response's HTTP status code and the value is a MethodResponse resource that specifies the response returned to the caller from the back end through the integration response.

          Example: Get a 200 OK response of a GET method

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }

          • statusCode — (String)

            The method response's status code.

          • responseParameters — (map<Boolean>)

            A key-value map specifying required or optional response parameters that Amazon API Gateway can send back to the caller. A key defines a method response header and the value specifies whether the associated method response header is required or not. The expression of the key must match the pattern method.response.header.{name}, where name is a valid and unique header name. Amazon API Gateway passes certain integration response data to the method response headers specified here according to the mapping you prescribe in the API's IntegrationResponse. The integration response data that can be mapped include an integration response header expressed in integration.response.header.{name}, a static value enclosed within a pair of single quotes (e.g., 'application/json'), or a JSON expression from the back-end response payload in the form of integration.response.body.{JSON-expression}, where JSON-expression is a valid JSON expression without the $ prefix.)

          • responseModels — (map<String>)

            Specifies the Model resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a Model name as the value.

        • methodIntegration — (map)

          Gets the method's integration responsible for passing the client-submitted request to the back end and performing necessary transformations to make the request compliant with the back end.

          Example:

          Request

          GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
          Response

          The successful response returns a 200 OK status code and a payload similar to the following:

          { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }

          • type — (String)

            Specifies the integration's type. The valid value is HTTP for integrating with an HTTP back end, AWS for any AWS service endpoints, MOCK for testing without actually invoking the back end, HTTP_PROXY for integrating with the HTTP proxy integration, or AWS_PROXY for integrating with the Lambda proxy integration type.

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

            Specifies the integration's HTTP method type.

          • uri — (String)

            Specifies the integration's Uniform Resource Identifier (URI). For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification. For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. Region, subdomain and service are used to determine the right endpoint. For AWS services that use the Action= query string parameter, service_api should be a valid action for the desired service. For RESTful AWS service APIs, path is used to indicate that the remaining substring in the URI should be treated as the path to the resource, including the initial /.

          • credentials — (String)

            Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for Amazon 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::&#42;:user/&#42;. To use resource-based permissions on supported AWS services, specify null.

          • requestParameters — (map<String>)

            A key-value map specifying request parameters that are passed from the method request to the back end. 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 back end. The method request parameter value must match the pattern of method.request.{location}.{name}, where location is querystring, path, or header and name must be a valid and unique method request parameter name.

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

          • passthroughBehavior — (String)

            Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation. A content type is unmapped if no mapping template is defined in the integration or the content type does not match any of the mapped content types, as specified in requestTemplates. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.

            • WHEN_NO_MATCH passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.
            • WHEN_NO_TEMPLATES passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.
            • NEVER rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.
          • contentHandling — (String)

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

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

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

            If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

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

            Specifies the integration's cache namespace.

          • cacheKeyParameters — (Array<String>)

            Specifies the integration's cache key parameters.

          • integrationResponses — (map<map>)

            Specifies the integration's responses.

            Example: Get integration responses of a method

            Request

            GET /restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160607T191449Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160607/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} 
            Response

            The successful response returns 200 OK status and a payload as follows:

            { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.Content-Type": "'application/xml'" }, "responseTemplates": { "application/json": "$util.urlDecode(\"%3CkinesisStreams%3E#foreach($stream in $input.path('$.StreamNames'))%3Cstream%3E%3Cname%3E$stream%3C/name%3E%3C/stream%3E#end%3C/kinesisStreams%3E\")\n" }, "statusCode": "200" }

            • statusCode — (String)

              Specifies the status code that is used to map the integration response to an existing MethodResponse.

            • selectionPattern — (String)

              Specifies the regular expression (regex) pattern used to choose an integration response based on the response from the back end. For example, if the success response returns nothing and the error response returns some string, you could use the .+ regex to match error response. However, make sure that the error response does not contain any newline (\n) character in such cases. If the back end is an AWS Lambda function, the AWS Lambda function error header is matched. For all other HTTP and AWS back ends, the HTTP status code is matched.

            • responseParameters — (map<String>)

              A key-value map specifying response parameters that are passed to the method response from the back end. 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>)

              Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.

            • contentHandling — (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 method response without modification.

              Possible values include:
              • "CONVERT_TO_BINARY"
              • "CONVERT_TO_TEXT"

Returns:

  • (AWS.Request)

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

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

Changes information about the specified API.

Service Reference:

Examples:

Calling the updateRestApi operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateRestApi(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: {})
    • restApiId — (String)

      The ID of the RestApi you want to update.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The API's identifier. This identifier is unique across all of your APIs in Amazon API Gateway.

      • name — (String)

        The API's name.

      • description — (String)

        The API's description.

      • createdDate — (Date)

        The timestamp when the API was created.

      • version — (String)

        A version identifier for the API.

      • warnings — (Array<String>)

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

      • binaryMediaTypes — (Array<String>)

        The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

Returns:

  • (AWS.Request)

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

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

Changes information about a Stage resource.

Service Reference:

Examples:

Calling the updateStage operation

var params = {
  restApiId: 'STRING_VALUE', /* required */
  stageName: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.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: {})
    • restApiId — (String)

      The identifier of the RestApi resource for the Stage resource to change information about.

    • stageName — (String)

      The name of the Stage resource to change information about.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • deploymentId — (String)

        The identifier of the Deployment that the stage points to.

      • clientCertificateId — (String)

        The identifier of a client certificate for an API stage.

      • stageName — (String)

        The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to Amazon API Gateway.

      • description — (String)

        The stage's description.

      • cacheClusterEnabled — (Boolean)

        Specifies whether a cache cluster is enabled for the stage.

      • cacheClusterSize — (String)

        The size of the cache cluster for the stage, if enabled.

        Possible values include:
        • "0.5"
        • "1.6"
        • "6.1"
        • "13.5"
        • "28.4"
        • "58.2"
        • "118"
        • "237"
      • cacheClusterStatus — (String)

        The status of the cache cluster for the stage, if enabled.

        Possible values include:
        • "CREATE_IN_PROGRESS"
        • "AVAILABLE"
        • "DELETE_IN_PROGRESS"
        • "NOT_AVAILABLE"
        • "FLUSH_IN_PROGRESS"
      • methodSettings — (map<map>)

        A map that defines the method settings for a Stage resource. Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /&#42;/&#42; for overriding all methods in the stage.

        • metricsEnabled — (Boolean)

          Specifies whether Amazon CloudWatch metrics are enabled for this method. The PATCH path for this setting is /{method_setting_key}/metrics/enabled, and the value is a Boolean.

        • loggingLevel — (String)

          Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/loglevel, and the available levels are OFF, ERROR, and INFO.

        • dataTraceEnabled — (Boolean)

          Specifies whether data trace logging is enabled for this method, which effects the log entries pushed to Amazon CloudWatch Logs. The PATCH path for this setting is /{method_setting_key}/logging/dataTrace, and the value is a Boolean.

        • throttlingBurstLimit — (Integer)

          Specifies the throttling burst limit. The PATCH path for this setting is /{method_setting_key}/throttling/burstLimit, and the value is an integer.

        • throttlingRateLimit — (Float)

          Specifies the throttling rate limit. The PATCH path for this setting is /{method_setting_key}/throttling/rateLimit, and the value is a double.

        • cachingEnabled — (Boolean)

          Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached. The PATCH path for this setting is /{method_setting_key}/caching/enabled, and the value is a Boolean.

        • cacheTtlInSeconds — (Integer)

          Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached. The PATCH path for this setting is /{method_setting_key}/caching/ttlInSeconds, and the value is an integer.

        • cacheDataEncrypted — (Boolean)

          Specifies whether the cached responses are encrypted. The PATCH path for this setting is /{method_setting_key}/caching/dataEncrypted, and the value is a Boolean.

        • requireAuthorizationForCacheControl — (Boolean)

          Specifies whether authorization is required for a cache invalidation request. The PATCH path for this setting is /{method_setting_key}/caching/requireAuthorizationForCacheControl, and the value is a Boolean.

        • unauthorizedCacheControlHeaderStrategy — (String)

          Specifies how to handle unauthorized requests for cache invalidation. The PATCH path for this setting is /{method_setting_key}/caching/unauthorizedCacheControlHeaderStrategy, and the available values are FAIL_WITH_403, SUCCEED_WITH_RESPONSE_HEADER, SUCCEED_WITHOUT_RESPONSE_HEADER.

          Possible values include:
          • "FAIL_WITH_403"
          • "SUCCEED_WITH_RESPONSE_HEADER"
          • "SUCCEED_WITHOUT_RESPONSE_HEADER"
      • variables — (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-._~:/?#&=,]+.

      • documentationVersion — (String)

        The version of the associated API documentation.

      • createdDate — (Date)

        The timestamp when the stage was created.

      • lastUpdatedDate — (Date)

        The timestamp when the stage last updated.

Returns:

  • (AWS.Request)

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

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

Grants a temporary extension to the reamining quota of a usage plan associated with a specified API key.

Service Reference:

Examples:

Calling the updateUsage operation

var params = {
  keyId: 'STRING_VALUE', /* required */
  usagePlanId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateUsage(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: {})
    • usagePlanId — (String)

      The Id of the usage plan associated with the usage data.

    • keyId — (String)

      The identifier of the API key associated with the usage plan in which a temporary extension is granted to the remaining quota.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • usagePlanId — (String)

        The plan Id associated with this usage data.

      • startDate — (String)

        The starting date of the usage data.

      • endDate — (String)

        The ending date of the usage data.

      • position — (String)
      • items — (map<Array<Array<Integer>>>)

        The usage data, as daily logs of used and remaining quotas, over the specified time interval indexed over the API keys in a usage plan. For example, {..., "values" : { "{api_key}" : [ [0, 100], [10, 90], [100, 10]]}, where {api_key} stands for an API key value and the daily log entry is of the format [used quota, remaining quota].

Returns:

  • (AWS.Request)

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

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

Updates a usage plan of a given plan Id.

Service Reference:

Examples:

Calling the updateUsagePlan operation

var params = {
  usagePlanId: 'STRING_VALUE', /* required */
  patchOperations: [
    {
      from: 'STRING_VALUE',
      op: add | remove | replace | move | copy | test,
      path: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
apigateway.updateUsagePlan(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: {})
    • usagePlanId — (String)

      The Id of the to-be-updated usage plan.

    • patchOperations — (Array<map>)

      A list of update operations to be applied to the specified resource and in the order specified in this list.

      • op — (String)

        An update operation to be performed with this PATCH request. The valid value can be "add", "remove", or "replace". Not all valid operations are supported for a given resource. Support of the operations depends on specific operational contexts. Attempts to apply an unsupported operation on a resource will return an error message.

        Possible values include:
        • "add"
        • "remove"
        • "replace"
        • "move"
        • "copy"
        • "test"
      • path — (String)

        The op operation's target, as identified by a JSON Pointer value that references a location within the targeted resource. For example, if the target resource has an updateable property of {"name":"value"}, the path for this property is /name. If the name property value is a JSON object (e.g., {"name": {"child/name": "child-value"}}), the path for the child/name property will be /name/child~1name. Any slash ("/") character appearing in path names must be escaped with "~1", as shown in the example above. Each op operation can have only one path associated with it.

      • value — (String)

        The new target value of the update operation. When using AWS CLI to update a property of a JSON value, enclose the JSON object with a pair of single quotes in a Linux shell, e.g., '...'. In a Windows shell, see Using JSON for Parameters.

      • from — (String)

        Not supported.

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:

      • id — (String)

        The identifier of a UsagePlan resource.

      • name — (String)

        The name of a usage plan.

      • description — (String)

        The description of a usage plan.

      • apiStages — (Array<map>)

        The associated API stages of a usage plan.

        • apiId — (String)

          API Id of the associated API stage in a usage plan.

        • stage — (String)

          API stage name of the associated API stage in a usage plan.

      • throttle — (map)

        The request throttle limits of a usage plan.

        • burstLimit — (Integer)

          The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

        • rateLimit — (Float)

          The API request steady-state rate limit.

      • quota — (map)

        The maximum number of permitted requests per a given unit time interval.

        • limit — (Integer)

          The maximum number of requests that can be made in a given time period.

        • offset — (Integer)

          The number of requests subtracted from the given limit in the initial time period.

        • period — (String)

          The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

          Possible values include:
          • "DAY"
          • "WEEK"
          • "MONTH"
      • productCode — (String)

        The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

Returns:

  • (AWS.Request)

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