Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class GetStagesCommandProtected

Gets the Stages for an API.

Example

Use a bare-bones client and the command you need to make an API call.

import { ApiGatewayV2Client, GetStagesCommand } from "@aws-sdk/client-apigatewayv2"; // ES Modules import
// const { ApiGatewayV2Client, GetStagesCommand } = require("@aws-sdk/client-apigatewayv2"); // CommonJS import
const client = new ApiGatewayV2Client(config);
const input = { // GetStagesRequest
ApiId: "STRING_VALUE", // required
MaxResults: "STRING_VALUE",
NextToken: "STRING_VALUE",
};
const command = new GetStagesCommand(input);
const response = await client.send(command);
// { // GetStagesResponse
// Items: [ // __listOfStage
// { // Stage
// 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", // required
// StageVariables: { // StageVariablesMap
// "<keys>": "STRING_VALUE",
// },
// Tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// NextToken: "STRING_VALUE",
// };

Param

GetStagesCommandInput

Returns

GetStagesCommandOutput

See

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

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.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods