Class: AWS.ApiGatewayV2
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.ApiGatewayV2
- Identifier:
- apigatewayv2
- API Version:
- 2018-11-29
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Amazon API Gateway V2
Sending a Request Using ApiGatewayV2
var apigatewayv2 = new AWS.ApiGatewayV2();
apigatewayv2.createApi(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the ApiGatewayV2 object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var apigatewayv2 = new AWS.ApiGatewayV2({apiVersion: '2018-11-29'});
You can also set the API version globally in AWS.config.apiVersions
using
the apigatewayv2 service identifier:
AWS.config.apiVersions = {
apigatewayv2: '2018-11-29',
// other service API versions
};
var apigatewayv2 = new AWS.ApiGatewayV2();
Version:
-
2018-11-29
Constructor Summary
-
new AWS.ApiGatewayV2(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
createApi(params = {}, callback) ⇒ AWS.Request
Creates an Api resource.
-
createApiMapping(params = {}, callback) ⇒ AWS.Request
Creates an API mapping.
-
createAuthorizer(params = {}, callback) ⇒ AWS.Request
Creates an Authorizer for an API.
-
createDeployment(params = {}, callback) ⇒ AWS.Request
Creates a Deployment for an API.
-
createDomainName(params = {}, callback) ⇒ AWS.Request
Creates a domain name.
-
createIntegration(params = {}, callback) ⇒ AWS.Request
Creates an Integration.
-
createIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Creates an IntegrationResponses.
-
createModel(params = {}, callback) ⇒ AWS.Request
Creates a Model for an API.
-
createRoute(params = {}, callback) ⇒ AWS.Request
Creates a Route for an API.
-
createRouteResponse(params = {}, callback) ⇒ AWS.Request
Creates a RouteResponse for a Route.
-
createStage(params = {}, callback) ⇒ AWS.Request
Creates a Stage for an API.
-
deleteApi(params = {}, callback) ⇒ AWS.Request
Deletes an Api resource.
-
deleteApiMapping(params = {}, callback) ⇒ AWS.Request
Deletes an API mapping.
-
deleteAuthorizer(params = {}, callback) ⇒ AWS.Request
Deletes an Authorizer.
-
deleteDeployment(params = {}, callback) ⇒ AWS.Request
Deletes a Deployment.
-
deleteDomainName(params = {}, callback) ⇒ AWS.Request
Deletes a domain name.
-
deleteIntegration(params = {}, callback) ⇒ AWS.Request
Deletes an Integration.
-
deleteIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Deletes an IntegrationResponses.
-
deleteModel(params = {}, callback) ⇒ AWS.Request
Deletes a Model.
-
deleteRoute(params = {}, callback) ⇒ AWS.Request
Deletes a Route.
-
deleteRouteResponse(params = {}, callback) ⇒ AWS.Request
Deletes a RouteResponse.
-
deleteStage(params = {}, callback) ⇒ AWS.Request
Deletes a Stage.
-
getApi(params = {}, callback) ⇒ AWS.Request
Gets an Api resource.
-
getApiMapping(params = {}, callback) ⇒ AWS.Request
The API mapping.
-
getApiMappings(params = {}, callback) ⇒ AWS.Request
The API mappings.
-
getApis(params = {}, callback) ⇒ AWS.Request
Gets a collection of Api resources.
-
getAuthorizer(params = {}, callback) ⇒ AWS.Request
Gets an Authorizer.
-
getAuthorizers(params = {}, callback) ⇒ AWS.Request
Gets the Authorizers for an API.
-
getDeployment(params = {}, callback) ⇒ AWS.Request
Gets a Deployment.
-
getDeployments(params = {}, callback) ⇒ AWS.Request
Gets the Deployments for an API.
-
getDomainName(params = {}, callback) ⇒ AWS.Request
Gets a domain name.
-
getDomainNames(params = {}, callback) ⇒ AWS.Request
Gets the domain names for an AWS account.
-
getIntegration(params = {}, callback) ⇒ AWS.Request
Gets an Integration.
-
getIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Gets an IntegrationResponses.
-
getIntegrationResponses(params = {}, callback) ⇒ AWS.Request
Gets the IntegrationResponses for an Integration.
-
getIntegrations(params = {}, callback) ⇒ AWS.Request
Gets the Integrations for an API.
-
getModel(params = {}, callback) ⇒ AWS.Request
Gets a Model.
-
getModels(params = {}, callback) ⇒ AWS.Request
Gets the Models for an API.
-
getModelTemplate(params = {}, callback) ⇒ AWS.Request
Gets a model template.
-
getRoute(params = {}, callback) ⇒ AWS.Request
Gets a Route.
-
getRouteResponse(params = {}, callback) ⇒ AWS.Request
Gets a RouteResponse.
-
getRouteResponses(params = {}, callback) ⇒ AWS.Request
Gets the RouteResponses for a Route.
-
getRoutes(params = {}, callback) ⇒ AWS.Request
Gets the Routes for an API.
-
getStage(params = {}, callback) ⇒ AWS.Request
Gets a Stage.
-
getStages(params = {}, callback) ⇒ AWS.Request
Gets the Stages for an API.
-
updateApi(params = {}, callback) ⇒ AWS.Request
Updates an Api resource.
-
updateApiMapping(params = {}, callback) ⇒ AWS.Request
The API mapping.
-
updateAuthorizer(params = {}, callback) ⇒ AWS.Request
Updates an Authorizer.
-
updateDeployment(params = {}, callback) ⇒ AWS.Request
Updates a Deployment.
-
updateDomainName(params = {}, callback) ⇒ AWS.Request
Updates a domain name.
-
updateIntegration(params = {}, callback) ⇒ AWS.Request
Updates an Integration.
-
updateIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Updates an IntegrationResponses.
-
updateModel(params = {}, callback) ⇒ AWS.Request
Updates a Model.
-
updateRoute(params = {}, callback) ⇒ AWS.Request
Updates a Route.
-
updateRouteResponse(params = {}, callback) ⇒ AWS.Request
Updates a RouteResponse.
-
updateStage(params = {}, callback) ⇒ AWS.Request
Updates a Stage.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.ApiGatewayV2(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a ApiGatewayV2 object
var apigatewayv2 = new AWS.ApiGatewayV2({apiVersion: '2018-11-29'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.ApiGatewayV2.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.ApiGatewayV2.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.ApiGatewayV2.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
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 totrue
. -
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
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean)
—
whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
.
Property Details
Method Details
createApi(params = {}, callback) ⇒ AWS.Request
Creates an Api resource.
Service Reference:
Examples:
Calling the createApi operation
var params = {
Name: 'STRING_VALUE', /* required */
ProtocolType: WEBSOCKET, /* required */
RouteSelectionExpression: 'STRING_VALUE', /* required */
ApiKeySelectionExpression: 'STRING_VALUE',
Description: 'STRING_VALUE',
DisableSchemaValidation: true || false,
Version: 'STRING_VALUE'
};
apigatewayv2.createApi(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— (String
)The name of the API.
ProtocolType
— (String
)The API protocol: Currently only WEBSOCKET is supported.
Possible values include:"WEBSOCKET"
RouteSelectionExpression
— (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiEndpoint
— (String
)The URI of the API, of the form
{api-id}.execute-api.{region}
.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.ApiId
— (String
)The API ID.
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
CreatedDate
— (Date
)The timestamp when the API was created.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— (String
)The name of the API.
ProtocolType
— (String
)The API protocol: Currently only WEBSOCKET is supported.
Possible values include:"WEBSOCKET"
RouteSelectionExpression
— (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Warnings
— (Array<String>
)The warning messages reported when failonwarnings is turned on during API import.
-
(AWS.Response)
—
Returns:
createApiMapping(params = {}, callback) ⇒ AWS.Request
Creates an API mapping.
Service Reference:
Examples:
Calling the createApiMapping operation
var params = {
ApiId: 'STRING_VALUE', /* required */
DomainName: 'STRING_VALUE', /* required */
Stage: 'STRING_VALUE', /* required */
ApiMappingKey: 'STRING_VALUE'
};
apigatewayv2.createApiMapping(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ApiMappingKey
— (String
)DomainName
— (String
)The domain name.
Stage
— (String
)The API stage.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiId
— (String
)The API identifier.
ApiMappingId
— (String
)The API mapping identifier.
ApiMappingKey
— (String
)The API mapping key.
Stage
— (String
)The API stage.
-
(AWS.Response)
—
Returns:
createAuthorizer(params = {}, callback) ⇒ AWS.Request
Creates an Authorizer for an API.
Service Reference:
Examples:
Calling the createAuthorizer operation
var params = {
ApiId: 'STRING_VALUE', /* required */
AuthorizerType: REQUEST, /* required */
AuthorizerUri: 'STRING_VALUE', /* required */
IdentitySource: [ /* required */
'STRING_VALUE',
/* more items */
],
Name: 'STRING_VALUE', /* required */
AuthorizerCredentialsArn: 'STRING_VALUE',
AuthorizerResultTtlInSeconds: 'NUMBER_VALUE',
IdentityValidationExpression: 'STRING_VALUE',
ProviderArns: [
'STRING_VALUE',
/* more items */
]
};
apigatewayv2.createAuthorizer(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it equals 0, authorization caching is disabled. If it is 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header and a Name query string parameters are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
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. Thedata
object has the following properties:AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerId
— (String
)The authorizer identifier.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it equals 0, authorization caching is disabled. If it is 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header and a Name query string parameters are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
-
(AWS.Response)
—
Returns:
createDeployment(params = {}, callback) ⇒ AWS.Request
Creates a Deployment for an API.
Service Reference:
Examples:
Calling the createDeployment operation
var params = {
ApiId: 'STRING_VALUE', /* required */
Description: 'STRING_VALUE',
StageName: 'STRING_VALUE'
};
apigatewayv2.createDeployment(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
Description
— (String
)The description for the deployment resource.
StageName
— (String
)The name of the Stage resource for the Deployment resource to create.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CreatedDate
— (Date
)The date and time when the Deployment resource was created.
DeploymentId
— (String
)The identifier for the deployment.
DeploymentStatus
— (String
)The status of the deployment: PENDING, FAILED, or SUCCEEDED.
Possible values include:"PENDING"
"FAILED"
"DEPLOYED"
DeploymentStatusMessage
— (String
)May contain additional feedback on the status of an API deployment.
Description
— (String
)The description for the deployment.
-
(AWS.Response)
—
Returns:
createDomainName(params = {}, callback) ⇒ AWS.Request
Creates a domain name.
Service Reference:
Examples:
Calling the createDomainName operation
var params = {
DomainName: 'STRING_VALUE', /* required */
DomainNameConfigurations: [
{
ApiGatewayDomainName: 'STRING_VALUE',
CertificateArn: 'STRING_VALUE',
CertificateName: 'STRING_VALUE',
CertificateUploadDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
EndpointType: REGIONAL | EDGE,
HostedZoneId: 'STRING_VALUE'
},
/* more items */
]
};
apigatewayv2.createDomainName(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DomainName
— (String
)The domain name.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
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. Thedata
object has the following properties:ApiMappingSelectionExpression
— (String
)The API mapping selection expression.
DomainName
— (String
)The name of the DomainName resource.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
-
(AWS.Response)
—
Returns:
createIntegration(params = {}, callback) ⇒ AWS.Request
Creates an Integration.
Service Reference:
Examples:
Calling the createIntegration operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationType: AWS | HTTP | MOCK | HTTP_PROXY | AWS_PROXY, /* required */
ConnectionId: 'STRING_VALUE',
ConnectionType: INTERNET | VPC_LINK,
ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
CredentialsArn: 'STRING_VALUE',
Description: 'STRING_VALUE',
IntegrationMethod: 'STRING_VALUE',
IntegrationUri: 'STRING_VALUE',
PassthroughBehavior: WHEN_NO_MATCH | NEVER | WHEN_NO_TEMPLATES,
RequestParameters: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
RequestTemplates: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
TemplateSelectionExpression: 'STRING_VALUE',
TimeoutInMillis: 'NUMBER_VALUE'
};
apigatewayv2.createIntegration(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)The description of the integration.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
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. Thedata
object has the following properties:ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)Represents the description of an integration.
IntegrationId
— (String
)Represents the identifier of an integration.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression
— (String
)The integration response selection expression for the integration. See Integration Response Selection Expressions.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
-
(AWS.Response)
—
Returns:
createIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Creates an IntegrationResponses.
Service Reference:
Examples:
Calling the createIntegrationResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
IntegrationResponseKey: 'STRING_VALUE', /* required */
ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
ResponseParameters: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
ResponseTemplates: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
TemplateSelectionExpression: 'STRING_VALUE'
};
apigatewayv2.createIntegrationResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationId
— (String
)The integration ID.
IntegrationResponseKey
— (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where{name}
is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where{name}
is a valid and unique response header name and{JSON-expression}
is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expression for the integration response.
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. Thedata
object has the following properties:ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationResponseId
— (String
)The integration response ID.
IntegrationResponseKey
— (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expressions for the integration response.
-
(AWS.Response)
—
Returns:
createModel(params = {}, callback) ⇒ AWS.Request
Creates a Model for an API.
Service Reference:
Examples:
Calling the createModel operation
var params = {
ApiId: 'STRING_VALUE', /* required */
Name: 'STRING_VALUE', /* required */
Schema: 'STRING_VALUE', /* required */
ContentType: 'STRING_VALUE',
Description: 'STRING_VALUE'
};
apigatewayv2.createModel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
Name
— (String
)The name of the model. Must be alphanumeric.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
ModelId
— (String
)The model identifier.
Name
— (String
)The name of the model. Must be alphanumeric.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
-
(AWS.Response)
—
Returns:
createRoute(params = {}, callback) ⇒ AWS.Request
Creates a Route for an API.
Service Reference:
Examples:
Calling the createRoute operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteKey: 'STRING_VALUE', /* required */
ApiKeyRequired: true || false,
AuthorizationScopes: [
'STRING_VALUE',
/* more items */
],
AuthorizationType: NONE | AWS_IAM | CUSTOM,
AuthorizerId: 'STRING_VALUE',
ModelSelectionExpression: 'STRING_VALUE',
OperationName: 'STRING_VALUE',
RequestModels: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
RequestParameters: {
'<__string>': {
Required: true || false
},
/* '<__string>': ... */
},
RouteResponseSelectionExpression: 'STRING_VALUE',
Target: 'STRING_VALUE'
};
apigatewayv2.createRoute(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for the route.
AuthorizationScopes
— (Array<String>
)The authorization scopes supported by this route.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteKey
— (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for this route.
AuthorizationScopes
— (Array<String>
)A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteKey
— (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
-
(AWS.Response)
—
Returns:
createRouteResponse(params = {}, callback) ⇒ AWS.Request
Creates a RouteResponse for a Route.
Service Reference:
Examples:
Calling the createRouteResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
RouteResponseKey: 'STRING_VALUE', /* required */
ModelSelectionExpression: 'STRING_VALUE',
ResponseModels: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
ResponseParameters: {
'<__string>': {
Required: true || false
},
/* '<__string>': ... */
}
};
apigatewayv2.createRouteResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ModelSelectionExpression
— (String
)The model selection expression for the route response.
ResponseModels
— (map<String>
)The response models for the route response.
ResponseParameters
— (map<map>
)The route response parameters.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteResponseKey
— (String
)The route response key.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ModelSelectionExpression
— (String
)Represents the model selection expression of a route response.
ResponseModels
— (map<String>
)Represents the response models of a route response.
ResponseParameters
— (map<map>
)Represents the response parameters of a route response.
Required
— (Boolean
)Whether or not the parameter is required.
RouteResponseId
— (String
)Represents the identifier of a route response.
RouteResponseKey
— (String
)Represents the route response key of a route response.
-
(AWS.Response)
—
Returns:
createStage(params = {}, callback) ⇒ AWS.Request
Creates a Stage for an API.
Service Reference:
Examples:
Calling the createStage operation
var params = {
ApiId: 'STRING_VALUE', /* required */
StageName: 'STRING_VALUE', /* required */
AccessLogSettings: {
DestinationArn: 'STRING_VALUE',
Format: 'STRING_VALUE'
},
ClientCertificateId: 'STRING_VALUE',
DefaultRouteSettings: {
DataTraceEnabled: true || false,
DetailedMetricsEnabled: true || false,
LoggingLevel: ERROR | INFO | false,
ThrottlingBurstLimit: 'NUMBER_VALUE',
ThrottlingRateLimit: 'NUMBER_VALUE'
},
DeploymentId: 'STRING_VALUE',
Description: 'STRING_VALUE',
RouteSettings: {
'<__string>': {
DataTraceEnabled: true || false,
DetailedMetricsEnabled: true || false,
LoggingLevel: ERROR | INFO | false,
ThrottlingBurstLimit: 'NUMBER_VALUE',
ThrottlingRateLimit: 'NUMBER_VALUE'
},
/* '<__string>': ... */
},
StageVariables: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
}
};
apigatewayv2.createStage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiId
— (String
)The API identifier.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
DefaultRouteSettings
— (map
)The default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The deployment identifier of the API stage.
Description
— (String
)The description for the API stage.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— (String
)The name of the stage.
StageVariables
— (map<String>
)A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
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. Thedata
object has the following properties:AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
CreatedDate
— (Date
)The timestamp when the stage was created.
DefaultRouteSettings
— (map
)Default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The identifier of the Deployment that the Stage is associated with.
Description
— (String
)The description of the stage.
LastUpdatedDate
— (Date
)The timestamp when the stage was last updated.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— (String
)The name of the stage.
StageVariables
— (map<String>
)A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
-
(AWS.Response)
—
Returns:
deleteApi(params = {}, callback) ⇒ AWS.Request
Deletes an Api resource.
Service Reference:
Examples:
Calling the deleteApi operation
var params = {
ApiId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteApi(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteApiMapping(params = {}, callback) ⇒ AWS.Request
Deletes an API mapping.
Service Reference:
Examples:
Calling the deleteApiMapping operation
var params = {
ApiMappingId: 'STRING_VALUE', /* required */
DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteApiMapping(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiMappingId
— (String
)The API mapping identifier.
DomainName
— (String
)The domain name.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteAuthorizer(params = {}, callback) ⇒ AWS.Request
Deletes an Authorizer.
Service Reference:
Examples:
Calling the deleteAuthorizer operation
var params = {
ApiId: 'STRING_VALUE', /* required */
AuthorizerId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteAuthorizer(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
AuthorizerId
— (String
)The authorizer identifier.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteDeployment(params = {}, callback) ⇒ AWS.Request
Deletes a Deployment.
Service Reference:
Examples:
Calling the deleteDeployment operation
var params = {
ApiId: 'STRING_VALUE', /* required */
DeploymentId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteDeployment(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
DeploymentId
— (String
)The deployment ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteDomainName(params = {}, callback) ⇒ AWS.Request
Deletes a domain name.
Service Reference:
Examples:
Calling the deleteDomainName operation
var params = {
DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteDomainName(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DomainName
— (String
)The domain name.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteIntegration(params = {}, callback) ⇒ AWS.Request
Deletes an Integration.
Service Reference:
Examples:
Calling the deleteIntegration operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteIntegration(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
IntegrationId
— (String
)The integration ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Deletes an IntegrationResponses.
Service Reference:
Examples:
Calling the deleteIntegrationResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
IntegrationResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteIntegrationResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
IntegrationId
— (String
)The integration ID.
IntegrationResponseId
— (String
)The integration response ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteModel(params = {}, callback) ⇒ AWS.Request
Deletes a Model.
Service Reference:
Examples:
Calling the deleteModel operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteModel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ModelId
— (String
)The model ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteRoute(params = {}, callback) ⇒ AWS.Request
Deletes a Route.
Service Reference:
Examples:
Calling the deleteRoute operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteRoute(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
RouteId
— (String
)The route ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteRouteResponse(params = {}, callback) ⇒ AWS.Request
Deletes a RouteResponse.
Service Reference:
Examples:
Calling the deleteRouteResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
RouteResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteRouteResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
RouteId
— (String
)The route ID.
RouteResponseId
— (String
)The route response ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteStage(params = {}, callback) ⇒ AWS.Request
Deletes a Stage.
Service Reference:
Examples:
Calling the deleteStage operation
var params = {
ApiId: 'STRING_VALUE', /* required */
StageName: 'STRING_VALUE' /* required */
};
apigatewayv2.deleteStage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
StageName
— (String
)The stage name.
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.
-
(AWS.Response)
—
Returns:
getApi(params = {}, callback) ⇒ AWS.Request
Gets an Api resource.
Service Reference:
Examples:
Calling the getApi operation
var params = {
ApiId: 'STRING_VALUE' /* required */
};
apigatewayv2.getApi(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiEndpoint
— (String
)The URI of the API, of the form
{api-id}.execute-api.{region}
.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.ApiId
— (String
)The API ID.
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
CreatedDate
— (Date
)The timestamp when the API was created.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— (String
)The name of the API.
ProtocolType
— (String
)The API protocol: Currently only WEBSOCKET is supported.
Possible values include:"WEBSOCKET"
RouteSelectionExpression
— (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Warnings
— (Array<String>
)The warning messages reported when failonwarnings is turned on during API import.
-
(AWS.Response)
—
Returns:
getApiMapping(params = {}, callback) ⇒ AWS.Request
The API mapping.
Service Reference:
Examples:
Calling the getApiMapping operation
var params = {
ApiMappingId: 'STRING_VALUE', /* required */
DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.getApiMapping(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiMappingId
— (String
)The API mapping identifier.
DomainName
— (String
)The domain name.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiId
— (String
)The API identifier.
ApiMappingId
— (String
)The API mapping identifier.
ApiMappingKey
— (String
)The API mapping key.
Stage
— (String
)The API stage.
-
(AWS.Response)
—
Returns:
getApiMappings(params = {}, callback) ⇒ AWS.Request
The API mappings.
Service Reference:
Examples:
Calling the getApiMappings operation
var params = {
DomainName: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getApiMappings(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DomainName
— (String
)The domain name.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ApiId
— required — (String
)The API identifier.
ApiMappingId
— (String
)The API mapping identifier.
ApiMappingKey
— (String
)The API mapping key.
Stage
— required — (String
)The API stage.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getApis(params = {}, callback) ⇒ AWS.Request
Gets a collection of Api resources.
Service Reference:
Examples:
Calling the getApis operation
var params = {
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getApis(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ApiEndpoint
— (String
)The URI of the API, of the form
{api-id}.execute-api.{region}
.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.ApiId
— (String
)The API ID.
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
CreatedDate
— (Date
)The timestamp when the API was created.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— required — (String
)The name of the API.
ProtocolType
— required — (String
)The API protocol: Currently only WEBSOCKET is supported.
Possible values include:"WEBSOCKET"
RouteSelectionExpression
— required — (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Warnings
— (Array<String>
)The warning messages reported when failonwarnings is turned on during API import.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getAuthorizer(params = {}, callback) ⇒ AWS.Request
Gets an Authorizer.
Service Reference:
Examples:
Calling the getAuthorizer operation
var params = {
ApiId: 'STRING_VALUE', /* required */
AuthorizerId: 'STRING_VALUE' /* required */
};
apigatewayv2.getAuthorizer(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
AuthorizerId
— (String
)The authorizer identifier.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerId
— (String
)The authorizer identifier.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it equals 0, authorization caching is disabled. If it is 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header and a Name query string parameters are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
-
(AWS.Response)
—
Returns:
getAuthorizers(params = {}, callback) ⇒ AWS.Request
Gets the Authorizers for an API.
Service Reference:
Examples:
Calling the getAuthorizers operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getAuthorizers(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerId
— (String
)The authorizer identifier.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it equals 0, authorization caching is disabled. If it is 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header and a Name query string parameters are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— required — (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getDeployment(params = {}, callback) ⇒ AWS.Request
Gets a Deployment.
Service Reference:
Examples:
Calling the getDeployment operation
var params = {
ApiId: 'STRING_VALUE', /* required */
DeploymentId: 'STRING_VALUE' /* required */
};
apigatewayv2.getDeployment(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
DeploymentId
— (String
)The deployment ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CreatedDate
— (Date
)The date and time when the Deployment resource was created.
DeploymentId
— (String
)The identifier for the deployment.
DeploymentStatus
— (String
)The status of the deployment: PENDING, FAILED, or SUCCEEDED.
Possible values include:"PENDING"
"FAILED"
"DEPLOYED"
DeploymentStatusMessage
— (String
)May contain additional feedback on the status of an API deployment.
Description
— (String
)The description for the deployment.
-
(AWS.Response)
—
Returns:
getDeployments(params = {}, callback) ⇒ AWS.Request
Gets the Deployments for an API.
Service Reference:
Examples:
Calling the getDeployments operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getDeployments(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
CreatedDate
— (Date
)The date and time when the Deployment resource was created.
DeploymentId
— (String
)The identifier for the deployment.
DeploymentStatus
— (String
)The status of the deployment: PENDING, FAILED, or SUCCEEDED.
Possible values include:"PENDING"
"FAILED"
"DEPLOYED"
DeploymentStatusMessage
— (String
)May contain additional feedback on the status of an API deployment.
Description
— (String
)The description for the deployment.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getDomainName(params = {}, callback) ⇒ AWS.Request
Gets a domain name.
Service Reference:
Examples:
Calling the getDomainName operation
var params = {
DomainName: 'STRING_VALUE' /* required */
};
apigatewayv2.getDomainName(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DomainName
— (String
)The domain name.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiMappingSelectionExpression
— (String
)The API mapping selection expression.
DomainName
— (String
)The name of the DomainName resource.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
-
(AWS.Response)
—
Returns:
getDomainNames(params = {}, callback) ⇒ AWS.Request
Gets the domain names for an AWS account.
Service Reference:
Examples:
Calling the getDomainNames operation
var params = {
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getDomainNames(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ApiMappingSelectionExpression
— (String
)The API mapping selection expression.
DomainName
— required — (String
)The name of the DomainName resource.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getIntegration(params = {}, callback) ⇒ AWS.Request
Gets an Integration.
Service Reference:
Examples:
Calling the getIntegration operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE' /* required */
};
apigatewayv2.getIntegration(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
IntegrationId
— (String
)The integration ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)Represents the description of an integration.
IntegrationId
— (String
)Represents the identifier of an integration.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression
— (String
)The integration response selection expression for the integration. See Integration Response Selection Expressions.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
-
(AWS.Response)
—
Returns:
getIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Gets an IntegrationResponses.
Service Reference:
Examples:
Calling the getIntegrationResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
IntegrationResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.getIntegrationResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
IntegrationId
— (String
)The integration ID.
IntegrationResponseId
— (String
) The integration response ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationResponseId
— (String
)The integration response ID.
IntegrationResponseKey
— (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expressions for the integration response.
-
(AWS.Response)
—
Returns:
getIntegrationResponses(params = {}, callback) ⇒ AWS.Request
Gets the IntegrationResponses for an Integration.
Service Reference:
Examples:
Calling the getIntegrationResponses operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getIntegrationResponses(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
IntegrationId
— (String
)The integration ID.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationResponseId
— (String
)The integration response ID.
IntegrationResponseKey
— required — (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expressions for the integration response.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getIntegrations(params = {}, callback) ⇒ AWS.Request
Gets the Integrations for an API.
Service Reference:
Examples:
Calling the getIntegrations operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getIntegrations(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)Represents the description of an integration.
IntegrationId
— (String
)Represents the identifier of an integration.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression
— (String
)The integration response selection expression for the integration. See Integration Response Selection Expressions.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getModel(params = {}, callback) ⇒ AWS.Request
Gets a Model.
Service Reference:
Examples:
Calling the getModel operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.getModel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ModelId
— (String
)The model ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
ModelId
— (String
)The model identifier.
Name
— (String
)The name of the model. Must be alphanumeric.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
-
(AWS.Response)
—
Returns:
getModels(params = {}, callback) ⇒ AWS.Request
Gets the Models for an API.
Service Reference:
Examples:
Calling the getModels operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getModels(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
ModelId
— (String
)The model identifier.
Name
— required — (String
)The name of the model. Must be alphanumeric.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getModelTemplate(params = {}, callback) ⇒ AWS.Request
Gets a model template.
Service Reference:
Examples:
Calling the getModelTemplate operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ModelId: 'STRING_VALUE' /* required */
};
apigatewayv2.getModelTemplate(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ModelId
— (String
)The model ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Value
— (String
)The template value.
-
(AWS.Response)
—
Returns:
getRoute(params = {}, callback) ⇒ AWS.Request
Gets a Route.
Service Reference:
Examples:
Calling the getRoute operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE' /* required */
};
apigatewayv2.getRoute(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
RouteId
— (String
)The route ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for this route.
AuthorizationScopes
— (Array<String>
)A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteKey
— (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
-
(AWS.Response)
—
Returns:
getRouteResponse(params = {}, callback) ⇒ AWS.Request
Gets a RouteResponse.
Service Reference:
Examples:
Calling the getRouteResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
RouteResponseId: 'STRING_VALUE' /* required */
};
apigatewayv2.getRouteResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
RouteId
— (String
)The route ID.
RouteResponseId
— (String
)The route response ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ModelSelectionExpression
— (String
)Represents the model selection expression of a route response.
ResponseModels
— (map<String>
)Represents the response models of a route response.
ResponseParameters
— (map<map>
)Represents the response parameters of a route response.
Required
— (Boolean
)Whether or not the parameter is required.
RouteResponseId
— (String
)Represents the identifier of a route response.
RouteResponseKey
— (String
)Represents the route response key of a route response.
-
(AWS.Response)
—
Returns:
getRouteResponses(params = {}, callback) ⇒ AWS.Request
Gets the RouteResponses for a Route.
Service Reference:
Examples:
Calling the getRouteResponses operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getRouteResponses(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
RouteId
— (String
)The route ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ModelSelectionExpression
— (String
)Represents the model selection expression of a route response.
ResponseModels
— (map<String>
)Represents the response models of a route response.
ResponseParameters
— (map<map>
)Represents the response parameters of a route response.
Required
— (Boolean
)Whether or not the parameter is required.
RouteResponseId
— (String
)Represents the identifier of a route response.
RouteResponseKey
— required — (String
)Represents the route response key of a route response.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getRoutes(params = {}, callback) ⇒ AWS.Request
Gets the Routes for an API.
Service Reference:
Examples:
Calling the getRoutes operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getRoutes(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for this route.
AuthorizationScopes
— (Array<String>
)A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteKey
— required — (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
getStage(params = {}, callback) ⇒ AWS.Request
Gets a Stage.
Service Reference:
Examples:
Calling the getStage operation
var params = {
ApiId: 'STRING_VALUE', /* required */
StageName: 'STRING_VALUE' /* required */
};
apigatewayv2.getStage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
StageName
— (String
)The stage name.
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. Thedata
object has the following properties:AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
CreatedDate
— (Date
)The timestamp when the stage was created.
DefaultRouteSettings
— (map
)Default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The identifier of the Deployment that the Stage is associated with.
Description
— (String
)The description of the stage.
LastUpdatedDate
— (Date
)The timestamp when the stage was last updated.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— (String
)The name of the stage.
StageVariables
— (map<String>
)A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
-
(AWS.Response)
—
Returns:
getStages(params = {}, callback) ⇒ AWS.Request
Gets the Stages for an API.
Service Reference:
Examples:
Calling the getStages operation
var params = {
ApiId: 'STRING_VALUE', /* required */
MaxResults: 'STRING_VALUE',
NextToken: 'STRING_VALUE'
};
apigatewayv2.getStages(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
MaxResults
— (String
)The maximum number of elements to be returned for this resource.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Items
— (Array<map>
)The elements from this collection.
AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
CreatedDate
— (Date
)The timestamp when the stage was created.
DefaultRouteSettings
— (map
)Default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The identifier of the Deployment that the Stage is associated with.
Description
— (String
)The description of the stage.
LastUpdatedDate
— (Date
)The timestamp when the stage was last updated.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— required — (String
)The name of the stage.
StageVariables
— (map<String>
)A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
NextToken
— (String
)The next page of elements from this collection. Not valid for the last element of the collection.
-
(AWS.Response)
—
Returns:
updateApi(params = {}, callback) ⇒ AWS.Request
Updates an Api resource.
Service Reference:
Examples:
Calling the updateApi operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ApiKeySelectionExpression: 'STRING_VALUE',
Description: 'STRING_VALUE',
DisableSchemaValidation: true || false,
Name: 'STRING_VALUE',
RouteSelectionExpression: 'STRING_VALUE',
Version: 'STRING_VALUE'
};
apigatewayv2.updateApi(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— (String
)The name of the API.
RouteSelectionExpression
— (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiEndpoint
— (String
)The URI of the API, of the form
{api-id}.execute-api.{region}
.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.ApiId
— (String
)The API ID.
ApiKeySelectionExpression
— (String
)An API key selection expression. See API Key Selection Expressions.
CreatedDate
— (Date
)The timestamp when the API was created.
Description
— (String
)The description of the API.
DisableSchemaValidation
— (Boolean
)Avoid validating models when creating a deployment.
Name
— (String
)The name of the API.
ProtocolType
— (String
)The API protocol: Currently only WEBSOCKET is supported.
Possible values include:"WEBSOCKET"
RouteSelectionExpression
— (String
)The route selection expression for the API.
Version
— (String
)A version identifier for the API.
Warnings
— (Array<String>
)The warning messages reported when failonwarnings is turned on during API import.
-
(AWS.Response)
—
Returns:
updateApiMapping(params = {}, callback) ⇒ AWS.Request
The API mapping.
Service Reference:
Examples:
Calling the updateApiMapping operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ApiMappingId: 'STRING_VALUE', /* required */
DomainName: 'STRING_VALUE', /* required */
ApiMappingKey: 'STRING_VALUE',
Stage: 'STRING_VALUE'
};
apigatewayv2.updateApiMapping(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ApiMappingId
— (String
)The API mapping identifier.
ApiMappingKey
— (String
)The API mapping key.
DomainName
— (String
)The domain name.
Stage
— (String
)The API stage.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiId
— (String
)The API identifier.
ApiMappingId
— (String
)The API mapping identifier.
ApiMappingKey
— (String
)The API mapping key.
Stage
— (String
)The API stage.
-
(AWS.Response)
—
Returns:
updateAuthorizer(params = {}, callback) ⇒ AWS.Request
Updates an Authorizer.
Service Reference:
Examples:
Calling the updateAuthorizer operation
var params = {
ApiId: 'STRING_VALUE', /* required */
AuthorizerId: 'STRING_VALUE', /* required */
AuthorizerCredentialsArn: 'STRING_VALUE',
AuthorizerResultTtlInSeconds: 'NUMBER_VALUE',
AuthorizerType: REQUEST,
AuthorizerUri: 'STRING_VALUE',
IdentitySource: [
'STRING_VALUE',
/* more items */
],
IdentityValidationExpression: 'STRING_VALUE',
Name: 'STRING_VALUE',
ProviderArns: [
'STRING_VALUE',
/* more items */
]
};
apigatewayv2.updateAuthorizer(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerId
— (String
)The authorizer identifier.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it is zero, authorization caching is disabled. If it is greater than zero, 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is $method.request.header.Auth, $method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
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. Thedata
object has the following properties:AuthorizerCredentialsArn
— (String
)Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
AuthorizerId
— (String
)The authorizer identifier.
AuthorizerResultTtlInSeconds
— (Integer
)The time to live (TTL), in seconds, of cached authorizer results. If it equals 0, authorization caching is disabled. If it is 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.
AuthorizerType
— (String
)The authorizer type. Currently the only valid value is REQUEST, for a Lambda function using incoming request parameters.
Possible values include:"REQUEST"
AuthorizerUri
— (String
)The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:
{account_id}: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.IdentitySource
— (Array<String>
)The identity source for which authorization is requested.
For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header and a Name query string parameters are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
IdentityValidationExpression
— (String
)The validation expression does not apply to the REQUEST authorizer.
Name
— (String
)The name of the authorizer.
ProviderArns
— (Array<String>
)For REQUEST authorizer, this is not defined.
-
(AWS.Response)
—
Returns:
updateDeployment(params = {}, callback) ⇒ AWS.Request
Updates a Deployment.
Service Reference:
Examples:
Calling the updateDeployment operation
var params = {
ApiId: 'STRING_VALUE', /* required */
DeploymentId: 'STRING_VALUE', /* required */
Description: 'STRING_VALUE'
};
apigatewayv2.updateDeployment(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
DeploymentId
— (String
)The deployment ID.
Description
— (String
)The description for the deployment resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CreatedDate
— (Date
)The date and time when the Deployment resource was created.
DeploymentId
— (String
)The identifier for the deployment.
DeploymentStatus
— (String
)The status of the deployment: PENDING, FAILED, or SUCCEEDED.
Possible values include:"PENDING"
"FAILED"
"DEPLOYED"
DeploymentStatusMessage
— (String
)May contain additional feedback on the status of an API deployment.
Description
— (String
)The description for the deployment.
-
(AWS.Response)
—
Returns:
updateDomainName(params = {}, callback) ⇒ AWS.Request
Updates a domain name.
Service Reference:
Examples:
Calling the updateDomainName operation
var params = {
DomainName: 'STRING_VALUE', /* required */
DomainNameConfigurations: [
{
ApiGatewayDomainName: 'STRING_VALUE',
CertificateArn: 'STRING_VALUE',
CertificateName: 'STRING_VALUE',
CertificateUploadDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
EndpointType: REGIONAL | EDGE,
HostedZoneId: 'STRING_VALUE'
},
/* more items */
]
};
apigatewayv2.updateDomainName(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DomainName
— (String
)The domain name.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
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. Thedata
object has the following properties:ApiMappingSelectionExpression
— (String
)The API mapping selection expression.
DomainName
— (String
)The name of the DomainName resource.
DomainNameConfigurations
— (Array<map>
)The domain name configurations.
ApiGatewayDomainName
— (String
)A domain name for the WebSocket API.
CertificateArn
— (String
)An AWS-managed certificate that will be used by the edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
CertificateName
— (String
)The user-friendly name of the certificate that will be used by the edge-optimized endpoint for this domain name.
CertificateUploadDate
— (Date
)The timestamp when the certificate that was used by edge-optimized endpoint for this domain name was uploaded.
EndpointType
— (String
)The endpoint type.
Possible values include:"REGIONAL"
"EDGE"
HostedZoneId
— (String
)The Amazon Route 53 Hosted Zone ID of the endpoint.
-
(AWS.Response)
—
Returns:
updateIntegration(params = {}, callback) ⇒ AWS.Request
Updates an Integration.
Service Reference:
Examples:
Calling the updateIntegration operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
ConnectionId: 'STRING_VALUE',
ConnectionType: INTERNET | VPC_LINK,
ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
CredentialsArn: 'STRING_VALUE',
Description: 'STRING_VALUE',
IntegrationMethod: 'STRING_VALUE',
IntegrationType: AWS | HTTP | MOCK | HTTP_PROXY | AWS_PROXY,
IntegrationUri: 'STRING_VALUE',
PassthroughBehavior: WHEN_NO_MATCH | NEVER | WHEN_NO_TEMPLATES,
RequestParameters: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
RequestTemplates: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
TemplateSelectionExpression: 'STRING_VALUE',
TimeoutInMillis: 'NUMBER_VALUE'
};
apigatewayv2.updateIntegration(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)The description of the integration
IntegrationId
— (String
)The integration ID.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
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. Thedata
object has the following properties:ConnectionId
— (String
)The connection ID.
ConnectionType
— (String
)The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
Possible values include:"INTERNET"
"VPC_LINK"
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
CredentialsArn
— (String
)Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description
— (String
)Represents the description of an integration.
IntegrationId
— (String
)Represents the identifier of an integration.
IntegrationMethod
— (String
)Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression
— (String
)The integration response selection expression for the integration. See Integration Response Selection Expressions.
IntegrationType
— (String
)The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend.
Possible values include:"AWS"
"HTTP"
"MOCK"
"HTTP_PROXY"
"AWS_PROXY"
IntegrationUri
— (String
)For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior
— (String
)Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
Possible values include:"WHEN_NO_MATCH"
"NEVER"
"WHEN_NO_TEMPLATES"
RequestParameters
— (map<String>
)A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.
{location}.{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.
TemplateSelectionExpression
— (String
)The template selection expression for the integration.
TimeoutInMillis
— (Integer
)Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds.
-
(AWS.Response)
—
Returns:
updateIntegrationResponse(params = {}, callback) ⇒ AWS.Request
Updates an IntegrationResponses.
Service Reference:
Examples:
Calling the updateIntegrationResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
IntegrationId: 'STRING_VALUE', /* required */
IntegrationResponseId: 'STRING_VALUE', /* required */
ContentHandlingStrategy: CONVERT_TO_BINARY | CONVERT_TO_TEXT,
IntegrationResponseKey: 'STRING_VALUE',
ResponseParameters: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
ResponseTemplates: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
TemplateSelectionExpression: 'STRING_VALUE'
};
apigatewayv2.updateIntegrationResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationId
— (String
)The integration ID.
IntegrationResponseId
— (String
) The integration response ID.IntegrationResponseKey
— (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where{name}
is a valid and unique response header name and{JSON-expression}
is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expression for the integration response.
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. Thedata
object has the following properties:ContentHandlingStrategy
— (String
)Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
Possible values include:"CONVERT_TO_BINARY"
"CONVERT_TO_TEXT"
IntegrationResponseId
— (String
)The integration response ID.
IntegrationResponseKey
— (String
)The integration response key.
ResponseParameters
— (map<String>
)A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.
{name}
, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name}
or integration.response.body.{JSON-expression}
, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.ResponseTemplates
— (map<String>
)The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
TemplateSelectionExpression
— (String
)The template selection expressions for the integration response.
-
(AWS.Response)
—
Returns:
updateModel(params = {}, callback) ⇒ AWS.Request
Updates a Model.
Service Reference:
Examples:
Calling the updateModel operation
var params = {
ApiId: 'STRING_VALUE', /* required */
ModelId: 'STRING_VALUE', /* required */
ContentType: 'STRING_VALUE',
Description: 'STRING_VALUE',
Name: 'STRING_VALUE',
Schema: 'STRING_VALUE'
};
apigatewayv2.updateModel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
ModelId
— (String
)The model ID.
Name
— (String
)The name of the model.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ContentType
— (String
)The content-type for the model, for example, "application/json".
Description
— (String
)The description of the model.
ModelId
— (String
)The model identifier.
Name
— (String
)The name of the model. Must be alphanumeric.
Schema
— (String
)The schema for the model. For application/json models, this should be JSON schema draft 4 model.
-
(AWS.Response)
—
Returns:
updateRoute(params = {}, callback) ⇒ AWS.Request
Updates a Route.
Service Reference:
Examples:
Calling the updateRoute operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
ApiKeyRequired: true || false,
AuthorizationScopes: [
'STRING_VALUE',
/* more items */
],
AuthorizationType: NONE | AWS_IAM | CUSTOM,
AuthorizerId: 'STRING_VALUE',
ModelSelectionExpression: 'STRING_VALUE',
OperationName: 'STRING_VALUE',
RequestModels: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
RequestParameters: {
'<__string>': {
Required: true || false
},
/* '<__string>': ... */
},
RouteKey: 'STRING_VALUE',
RouteResponseSelectionExpression: 'STRING_VALUE',
Target: 'STRING_VALUE'
};
apigatewayv2.updateRoute(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for the route.
AuthorizationScopes
— (Array<String>
)The authorization scopes supported by this route.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteKey
— (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApiKeyRequired
— (Boolean
)Specifies whether an API key is required for this route.
AuthorizationScopes
— (Array<String>
)A list of authorization scopes configured on a route. The scopes are used with a COGNITO_USER_POOLS authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
AuthorizationType
— (String
)The authorization type for the route. Valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer
Possible values include:"NONE"
"AWS_IAM"
"CUSTOM"
AuthorizerId
— (String
)The identifier of the Authorizer resource to be associated with this route, if the authorizationType is CUSTOM . The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression
— (String
)The model selection expression for the route.
OperationName
— (String
)The operation name for the route.
RequestModels
— (map<String>
)The request models for the route.
RequestParameters
— (map<map>
)The request parameters for the route.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteKey
— (String
)The route key for the route.
RouteResponseSelectionExpression
— (String
)The route response selection expression for the route.
Target
— (String
)The target for the route.
-
(AWS.Response)
—
Returns:
updateRouteResponse(params = {}, callback) ⇒ AWS.Request
Updates a RouteResponse.
Service Reference:
Examples:
Calling the updateRouteResponse operation
var params = {
ApiId: 'STRING_VALUE', /* required */
RouteId: 'STRING_VALUE', /* required */
RouteResponseId: 'STRING_VALUE', /* required */
ModelSelectionExpression: 'STRING_VALUE',
ResponseModels: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
},
ResponseParameters: {
'<__string>': {
Required: true || false
},
/* '<__string>': ... */
},
RouteResponseKey: 'STRING_VALUE'
};
apigatewayv2.updateRouteResponse(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ApiId
— (String
)The API identifier.
ModelSelectionExpression
— (String
)The model selection expression for the route response.
ResponseModels
— (map<String>
)The response models for the route response.
ResponseParameters
— (map<map>
)The route response parameters.
Required
— (Boolean
)Whether or not the parameter is required.
RouteId
— (String
)The route ID.
RouteResponseId
— (String
)The route response ID.
RouteResponseKey
— (String
)The route response key.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ModelSelectionExpression
— (String
)Represents the model selection expression of a route response.
ResponseModels
— (map<String>
)Represents the response models of a route response.
ResponseParameters
— (map<map>
)Represents the response parameters of a route response.
Required
— (Boolean
)Whether or not the parameter is required.
RouteResponseId
— (String
)Represents the identifier of a route response.
RouteResponseKey
— (String
)Represents the route response key of a route response.
-
(AWS.Response)
—
Returns:
updateStage(params = {}, callback) ⇒ AWS.Request
Updates a Stage.
Service Reference:
Examples:
Calling the updateStage operation
var params = {
ApiId: 'STRING_VALUE', /* required */
StageName: 'STRING_VALUE', /* required */
AccessLogSettings: {
DestinationArn: 'STRING_VALUE',
Format: 'STRING_VALUE'
},
ClientCertificateId: 'STRING_VALUE',
DefaultRouteSettings: {
DataTraceEnabled: true || false,
DetailedMetricsEnabled: true || false,
LoggingLevel: ERROR | INFO | false,
ThrottlingBurstLimit: 'NUMBER_VALUE',
ThrottlingRateLimit: 'NUMBER_VALUE'
},
DeploymentId: 'STRING_VALUE',
Description: 'STRING_VALUE',
RouteSettings: {
'<__string>': {
DataTraceEnabled: true || false,
DetailedMetricsEnabled: true || false,
LoggingLevel: ERROR | INFO | false,
ThrottlingBurstLimit: 'NUMBER_VALUE',
ThrottlingRateLimit: 'NUMBER_VALUE'
},
/* '<__string>': ... */
},
StageVariables: {
'<__string>': 'STRING_VALUE',
/* '<__string>': ... */
}
};
apigatewayv2.updateStage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiId
— (String
)The API identifier.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
DefaultRouteSettings
— (map
)The default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The deployment identifier for the API stage.
Description
— (String
)The description for the API stage.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— (String
)The stage name.
StageVariables
— (map<String>
)A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
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. Thedata
object has the following properties:AccessLogSettings
— (map
)Settings for logging access in this stage.
DestinationArn
— (String
)The ARN of the CloudWatch Logs log group to receive access logs.
Format
— (String
)A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ClientCertificateId
— (String
)The identifier of a client certificate for a Stage.
CreatedDate
— (Date
)The timestamp when the stage was created.
DefaultRouteSettings
— (map
)Default route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
DeploymentId
— (String
)The identifier of the Deployment that the Stage is associated with.
Description
— (String
)The description of the stage.
LastUpdatedDate
— (Date
)The timestamp when the stage was last updated.
RouteSettings
— (map<map>
)Route settings for the stage.
DataTraceEnabled
— (Boolean
)Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs.
DetailedMetricsEnabled
— (Boolean
)Specifies whether detailed metrics are enabled.
LoggingLevel
— (String
)Specifies the logging level for this route: DEBUG, INFO, or WARN. This property affects the log entries pushed to Amazon CloudWatch Logs.
Possible values include:"ERROR"
"INFO"
"false"
ThrottlingBurstLimit
— (Integer
)Specifies the throttling burst limit.
ThrottlingRateLimit
— (Float
)Specifies the throttling rate limit.
StageName
— (String
)The name of the stage.
StageVariables
— (map<String>
)A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+.
-
(AWS.Response)
—
Returns: