AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ApiGateway::Stage

CfnStage

The `AWS::ApiGateway::Stage` resource creates a stage for a deployment.

Import

import { CfnStage } from 'aws-cdk-lib/aws-apigateway';

Or use the module namespace:

import * as apigateway from 'aws-cdk-lib/aws-apigateway';
// apigateway.CfnStage

Properties

Configuration passed to the constructor as CfnStageProps.

restApiIdRequired
string | IRestApiRef

The string identifier of the associated RestApi.

accessLogSettingOptional
IResolvable | AccessLogSettingProperty

Access log settings, including the access log format and access log destination ARN.

cacheClusterEnabledOptional
boolean | IResolvable

Specifies whether a cache cluster is enabled for the stage. To activate a method-level cache, set `CachingEnabled` to `true` for a method.

cacheClusterSizeOptional
string

The stage's cache capacity in GB. For more information about choosing a cache size, see [Enabling API caching to enhance responsiveness](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html) .

canarySettingOptional
IResolvable | CanarySettingProperty

Settings for the canary deployment in this stage.

clientCertificateIdOptional
string | IClientCertificateRef

The identifier of a client certificate for an API stage.

deploymentIdOptional
string | IDeploymentRef

The identifier of the Deployment that the stage points to.

descriptionOptional
string

The stage's description.

documentationVersionOptional
string

The version of the associated API documentation.

methodSettingsOptional
IResolvable | IResolvable | MethodSettingProperty[]

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

stageNameOptional
string

The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

tagsOptional
CfnTag[]

The collection of tags. Each tag element is associated with a given resource.

tracingEnabledOptional
boolean | IResolvable

Specifies whether active tracing with X-ray is enabled for the Stage.

variablesOptional
{ [key: string]: string } | IResolvable

A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value. Variable names are limited to alphanumeric characters. Values must match the following regular expression: `[A-Za-z0-9-._~:/?#&=,]+` .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon API Gateway Cheat Sheet

Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.

Download Free Infographic