AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

Stage

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as StageProps.

deploymentRequired
Deployment

The deployment that this stage points to [disable-awslint:ref-via-interface].

11 properties inherited from StageOptions
accessLogDestinationOptionalinherited from StageOptions
IAccessLogDestination

The CloudWatch Logs log group or Firehose delivery stream where to write access logs.

Default: - No destination

accessLogFormatOptionalinherited from StageOptions
AccessLogFormat

A single line format of access logs of data, as specified by selected $content variables. The format must include either `AccessLogFormat.contextRequestId()` or `AccessLogFormat.contextExtendedRequestId()`.

Default: - Common Log Format

cacheClusterEnabledOptionalinherited from StageOptions
boolean

Indicates whether cache clustering is enabled for the stage.

Default: - Disabled for the stage.

cacheClusterSizeOptionalinherited from StageOptions
string

The stage's cache cluster size.

Default: 0.5

clientCertificateIdOptionalinherited from StageOptions
string

The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.

Default: - None.

descriptionOptionalinherited from StageOptions
string

A description of the purpose of the stage.

Default: - No description.

documentationVersionOptionalinherited from StageOptions
string

The version identifier of the API documentation snapshot.

Default: - No documentation version.

methodOptionsOptionalinherited from StageOptions
{ [key: string]: MethodDeploymentOptions }

Method deployment options for specific resources/methods. These will override common options defined in `StageOptions#methodOptions`.

Default: - Common options will be used.

stageNameOptionalinherited from StageOptions
string

The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).

Default: - "prod"

tracingEnabledOptionalinherited from StageOptions
boolean

Specifies whether Amazon X-Ray tracing is enabled for this method.

Default: false

variablesOptionalinherited from StageOptions
{ [key: string]: string }

A map that defines the stage variables. Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+.

Default: - No stage variables.

8 properties inherited from MethodDeploymentOptions
cacheDataEncryptedOptionalinherited from MethodDeploymentOptions
boolean

Indicates whether the cached responses are encrypted.

Default: false

cacheTtlOptionalinherited from MethodDeploymentOptions
Duration

Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.

Default: Duration.minutes(5)

cachingEnabledOptionalinherited from MethodDeploymentOptions
boolean

Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.

Default: - Caching is Disabled.

dataTraceEnabledOptionalinherited from MethodDeploymentOptions
boolean

Specifies whether data trace logging is enabled for this method. When enabled, API gateway will log the full API requests and responses. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this feature for production APIs.

Default: false

loggingLevelOptionalinherited from MethodDeploymentOptions
MethodLoggingLevel

Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.

Default: - Off

metricsEnabledOptionalinherited from MethodDeploymentOptions
boolean

Specifies whether Amazon CloudWatch metrics are enabled for this method.

Default: false

throttlingBurstLimitOptionalinherited from MethodDeploymentOptions
number

Specifies the throttling burst limit. The total rate of all requests in your AWS account is limited to 5,000 requests.

Default: - No additional restriction.

throttlingRateLimitOptionalinherited from MethodDeploymentOptions
number

Specifies the throttling rate limit. The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).

Default: - No additional restriction.

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