We are excited to announce our new API Documentation.
Protected
Creates a Stage for an API.
Use a bare-bones client and the command you need to make an API call.
import { ApiGatewayV2Client, CreateStageCommand } from "@aws-sdk/client-apigatewayv2"; // ES Modules import// const { ApiGatewayV2Client, CreateStageCommand } = require("@aws-sdk/client-apigatewayv2"); // CommonJS importconst client = new ApiGatewayV2Client(config);const input = { // CreateStageRequest AccessLogSettings: { // AccessLogSettings DestinationArn: "STRING_VALUE", Format: "STRING_VALUE", }, ApiId: "STRING_VALUE", // required AutoDeploy: true || false, ClientCertificateId: "STRING_VALUE", DefaultRouteSettings: { // RouteSettings DataTraceEnabled: true || false, DetailedMetricsEnabled: true || false, LoggingLevel: "ERROR" || "INFO" || "OFF", ThrottlingBurstLimit: Number("int"), ThrottlingRateLimit: Number("double"), }, DeploymentId: "STRING_VALUE", Description: "STRING_VALUE", RouteSettings: { // RouteSettingsMap "<keys>": { DataTraceEnabled: true || false, DetailedMetricsEnabled: true || false, LoggingLevel: "ERROR" || "INFO" || "OFF", ThrottlingBurstLimit: Number("int"), ThrottlingRateLimit: Number("double"), }, }, StageName: "STRING_VALUE", // required StageVariables: { // StageVariablesMap "<keys>": "STRING_VALUE", }, Tags: { // Tags "<keys>": "STRING_VALUE", },};const command = new CreateStageCommand(input);const response = await client.send(command);// { // CreateStageResponse// AccessLogSettings: { // AccessLogSettings// DestinationArn: "STRING_VALUE",// Format: "STRING_VALUE",// },// ApiGatewayManaged: true || false,// AutoDeploy: true || false,// ClientCertificateId: "STRING_VALUE",// CreatedDate: new Date("TIMESTAMP"),// DefaultRouteSettings: { // RouteSettings// DataTraceEnabled: true || false,// DetailedMetricsEnabled: true || false,// LoggingLevel: "ERROR" || "INFO" || "OFF",// ThrottlingBurstLimit: Number("int"),// ThrottlingRateLimit: Number("double"),// },// DeploymentId: "STRING_VALUE",// Description: "STRING_VALUE",// LastDeploymentStatusMessage: "STRING_VALUE",// LastUpdatedDate: new Date("TIMESTAMP"),// RouteSettings: { // RouteSettingsMap// "<keys>": {// DataTraceEnabled: true || false,// DetailedMetricsEnabled: true || false,// LoggingLevel: "ERROR" || "INFO" || "OFF",// ThrottlingBurstLimit: Number("int"),// ThrottlingRateLimit: Number("double"),// },// },// StageName: "STRING_VALUE",// StageVariables: { // StageVariablesMap// "<keys>": "STRING_VALUE",// },// Tags: { // Tags// "<keys>": "STRING_VALUE",// },// };
CreateStageCommandInput
CreateStageCommandOutput
input
response
config
BadRequestException (client fault)
The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
ConflictException (client fault)
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.
NotFoundException (client fault)
The resource specified in the request was not found. See the message field for more information.
TooManyRequestsException (client fault)
A limit has been exceeded. See the accompanying error message for details.
ApiGatewayV2ServiceException
Base exception class for all service exceptions from ApiGatewayV2 service.
Readonly
Static
Creates a Stage for an API.
Example
Use a bare-bones client and the command you need to make an API call.
Param
CreateStageCommandInput
Returns
CreateStageCommandOutput
See
input
shape.response
shape.config
shape.Throws
BadRequestException (client fault)
The request is not valid, for example, the input is incomplete or incorrect. See the accompanying error message for details.
Throws
ConflictException (client fault)
The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details.
Throws
NotFoundException (client fault)
The resource specified in the request was not found. See the message field for more information.
Throws
TooManyRequestsException (client fault)
A limit has been exceeded. See the accompanying error message for details.
Throws
ApiGatewayV2ServiceException
Base exception class for all service exceptions from ApiGatewayV2 service.