AmazonApiGatewayV2
  1. Root
AmazonApiGatewayV2
  • Root
    • /v2/apis
      POST
    • /v2/apis
      GET
    • /v2/apis
      PUT
    • /v2/domainnames/{domainName}/apimappings
      POST
    • /v2/domainnames/{domainName}/apimappings
      GET
    • /v2/apis/{apiId}/authorizers
      POST
    • /v2/apis/{apiId}/authorizers
      GET
    • /v2/apis/{apiId}/deployments
      POST
    • /v2/apis/{apiId}/deployments
      GET
    • /v2/domainnames
      POST
    • /v2/domainnames
      GET
    • /v2/apis/{apiId}/integrations
      POST
    • /v2/apis/{apiId}/integrations
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      POST
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses
      GET
    • /v2/apis/{apiId}/models
      POST
    • /v2/apis/{apiId}/models
      GET
    • /v2/apis/{apiId}/routes
      POST
    • /v2/apis/{apiId}/routes
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      POST
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses
      GET
    • /v2/apis/{apiId}/stages
      POST
    • /v2/apis/{apiId}/stages
      GET
    • /v2/vpclinks
      POST
    • /v2/vpclinks
      GET
    • /v2/apis/{apiId}/stages/{stageName}/accesslogsettings
      DELETE
    • /v2/apis/{apiId}
      DELETE
    • /v2/apis/{apiId}
      GET
    • /v2/apis/{apiId}
      PUT
    • /v2/apis/{apiId}
      PATCH
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      DELETE
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      GET
    • /v2/domainnames/{domainName}/apimappings/{apiMappingId}
      PATCH
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      DELETE
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      GET
    • /v2/apis/{apiId}/authorizers/{authorizerId}
      PATCH
    • /v2/apis/{apiId}/cors
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      DELETE
    • /v2/apis/{apiId}/deployments/{deploymentId}
      GET
    • /v2/apis/{apiId}/deployments/{deploymentId}
      PATCH
    • /v2/domainnames/{domainName}
      DELETE
    • /v2/domainnames/{domainName}
      GET
    • /v2/domainnames/{domainName}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}
      PATCH
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      DELETE
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      GET
    • /v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}
      PATCH
    • /v2/apis/{apiId}/models/{modelId}
      DELETE
    • /v2/apis/{apiId}/models/{modelId}
      GET
    • /v2/apis/{apiId}/models/{modelId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}
      PATCH
    • /v2/apis/{apiId}/routes/{routeId}/requestparameters/{requestParameterKey}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      DELETE
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      GET
    • /v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}
      PATCH
    • /v2/apis/{apiId}/stages/{stageName}/routesettings/{routeKey}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      DELETE
    • /v2/apis/{apiId}/stages/{stageName}
      GET
    • /v2/apis/{apiId}/stages/{stageName}
      PATCH
    • /v2/vpclinks/{vpcLinkId}
      DELETE
    • /v2/vpclinks/{vpcLinkId}
      GET
    • /v2/vpclinks/{vpcLinkId}
      PATCH
    • /v2/apis/{apiId}/exports/{specification}
      GET
    • /v2/apis/{apiId}/stages/{stageName}/cache/authorizers
      DELETE
    • /v2/apis/{apiId}/models/{modelId}/template
      GET
    • /v2/tags/{resource-arn}
      GET
    • /v2/tags/{resource-arn}
      POST
    • /v2/tags/{resource-arn}
      DELETE
  1. Root

/v2/apis/{apiId}/stages

POST
/v2/apis/{apiId}/stages
Creates a Stage for an API.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v2/apis//stages' \
--header 'Content-Type: application/json' \
--data-raw '{
    "accessLogSettings": {
        "DestinationArn": "string",
        "Format": "string"
    },
    "autoDeploy": true,
    "clientCertificateId": "string",
    "defaultRouteSettings": {
        "DataTraceEnabled": true,
        "DetailedMetricsEnabled": true,
        "LoggingLevel": "ERROR",
        "ThrottlingBurstLimit": 0,
        "ThrottlingRateLimit": 0
    },
    "deploymentId": "string",
    "description": "string",
    "routeSettings": {
        "property1": {
            "DataTraceEnabled": true,
            "DetailedMetricsEnabled": true,
            "LoggingLevel": "ERROR",
            "ThrottlingBurstLimit": 0,
            "ThrottlingRateLimit": 0
        }
    },
    "stageName": "string",
    "stageVariables": {
        "property1": "string",
        "property2": "string"
    },
    "tags": {
        "property1": "string",
        "property2": "string"
    }
}'
Response Response Example
201 - Example 1
{
  "AccessLogSettings": {
    "DestinationArn": "string",
    "Format": "string"
  },
  "ApiGatewayManaged": true,
  "AutoDeploy": true,
  "ClientCertificateId": "string",
  "CreatedDate": "string",
  "DefaultRouteSettings": {
    "DataTraceEnabled": true,
    "DetailedMetricsEnabled": true,
    "LoggingLevel": "ERROR",
    "ThrottlingBurstLimit": 0,
    "ThrottlingRateLimit": 0
  },
  "DeploymentId": "string",
  "Description": "string",
  "LastDeploymentStatusMessage": "string",
  "LastUpdatedDate": "string",
  "RouteSettings": {
    "property1": {},
    "property2": {}
  },
  "StageName": "string",
  "StageVariables": {
    "property1": "string",
    "property2": "string"
  },
  "Tags": {
    "property1": "string",
    "property2": "string"
  }
}

Request

Path Params
apiId
string 
required
The API identifier.
Body Params application/json
accessLogSettings
object 
optional
Settings for logging access in a stage.
DestinationArn
string 
optional
The ARN of the CloudWatch Logs log group to receive access logs.
Format
string 
optional
A single line format of the access logs of data, as specified by selected contextvariables.Theformatmustincludeatleastcontext.requestId.
autoDeploy
boolean 
optional
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
clientCertificateId
string 
optional
The identifier.
defaultRouteSettings
object 
optional
Represents a collection of route settings.
DataTraceEnabled
boolean 
optional
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled
boolean 
optional
Specifies whether detailed metrics are enabled.
LoggingLevel
enum<string> 
optional
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
Allowed values:
ERRORINFOOFF
ThrottlingBurstLimit
integer 
optional
Specifies the throttling burst limit.
ThrottlingRateLimit
number <double>
optional
Specifies the throttling rate limit.
deploymentId
string 
optional
The identifier.
description
string 
optional
A string with a length between [0-1024].
routeSettings
object 
optional
The route settings map.
Additional properties
object (RouteSettings) 
optional
Represents a collection of route settings.
stageName
string 
required
A string with a length between [1-128].
stageVariables
object 
optional
The stage variable map.
Additional properties
string 
optional
A string with a length between [0-2048].
tags
object 
optional
Represents a collection of tags associated with the resource.
Additional properties
string 
optional
A string with a length between [0-1600].
Examples

Responses

🟢201Success
application/json
Body
AccessLogSettings
object 
optional
Settings for logging access in this stage.
DestinationArn
string 
optional
The ARN of the CloudWatch Logs log group to receive access logs.
Format
string 
optional
A single line format of the access logs of data, as specified by selected contextvariables.Theformatmustincludeatleastcontext.requestId.
ApiGatewayManaged
boolean 
optional
Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the defaultstageismanagedbyAPIGateway.Youcan′tmodifythedefault stage.
AutoDeploy
boolean 
optional
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
ClientCertificateId
string 
optional
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
CreatedDate
string <date-time>
optional
The timestamp when the stage was created.
DefaultRouteSettings
object 
optional
Default route settings for the stage.
DataTraceEnabled
boolean 
optional
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled
boolean 
optional
Specifies whether detailed metrics are enabled.
LoggingLevel
enum<string> 
optional
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
Allowed values:
ERRORINFOOFF
ThrottlingBurstLimit
integer 
optional
Specifies the throttling burst limit.
ThrottlingRateLimit
number <double>
optional
Specifies the throttling rate limit.
DeploymentId
string 
optional
The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.
Description
string 
optional
The description of the stage.
LastDeploymentStatusMessage
string 
optional
Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.
LastUpdatedDate
string <date-time>
optional
The timestamp when the stage was last updated.
RouteSettings
object 
optional
Route settings for the stage, by routeKey.
StageName
string 
optional
The name of the stage.
StageVariables
object 
optional
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-._~:/?#&=,]+.
Tags
object 
optional
The collection of tags. Each tag element is associated with a given resource.
🟠480NotFoundException
🟠481TooManyRequestsException
🟠482BadRequestException
🟠483ConflictException
Modified at 2023-08-15 05:49:07
Previous
/v2/apis/{apiId}/routes/{routeId}/routeresponses
Next
/v2/apis/{apiId}/stages
Built with