aws-cdk-lib.aws_apigateway.CfnStageProps

interface CfnStageProps

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.CfnStageProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#CfnStageProps
Javasoftware.amazon.awscdk.services.apigateway.CfnStageProps
Pythonaws_cdk.aws_apigateway.CfnStageProps
TypeScript aws-cdk-lib » aws_apigateway » CfnStageProps

Properties for defining a CfnStage.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';
const cfnStageProps: apigateway.CfnStageProps = {
  restApiId: 'restApiId',

  // the properties below are optional
  accessLogSetting: {
    destinationArn: 'destinationArn',
    format: 'format',
  },
  cacheClusterEnabled: false,
  cacheClusterSize: 'cacheClusterSize',
  canarySetting: {
    deploymentId: 'deploymentId',
    percentTraffic: 123,
    stageVariableOverrides: {
      stageVariableOverridesKey: 'stageVariableOverrides',
    },
    useStageCache: false,
  },
  clientCertificateId: 'clientCertificateId',
  deploymentId: 'deploymentId',
  description: 'description',
  documentationVersion: 'documentationVersion',
  methodSettings: [{
    cacheDataEncrypted: false,
    cacheTtlInSeconds: 123,
    cachingEnabled: false,
    dataTraceEnabled: false,
    httpMethod: 'httpMethod',
    loggingLevel: 'loggingLevel',
    metricsEnabled: false,
    resourcePath: 'resourcePath',
    throttlingBurstLimit: 123,
    throttlingRateLimit: 123,
  }],
  stageName: 'stageName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  tracingEnabled: false,
  variables: {
    variablesKey: 'variables',
  },
};

Properties

NameTypeDescription
restApiIdstringThe string identifier of the associated RestApi.
accessLogSetting?IResolvable | AccessLogSettingPropertyAccess log settings, including the access log format and access log destination ARN.
cacheClusterEnabled?boolean | IResolvableSpecifies whether a cache cluster is enabled for the stage.
cacheClusterSize?stringThe stage's cache capacity in GB.
canarySetting?IResolvable | CanarySettingPropertySettings for the canary deployment in this stage.
clientCertificateId?stringThe identifier of a client certificate for an API stage.
deploymentId?stringThe identifier of the Deployment that the stage points to.
description?stringThe stage's description.
documentationVersion?stringThe version of the associated API documentation.
methodSettings?IResolvable | IResolvable | MethodSettingProperty[]A map that defines the method settings for a Stage resource.
stageName?stringThe name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.
tags?CfnTag[]The collection of tags.
tracingEnabled?boolean | IResolvableSpecifies whether active tracing with X-ray is enabled for the Stage.
variables?IResolvable | { [string]: string }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.

restApiId

Type: string

The string identifier of the associated RestApi.


accessLogSetting?

Type: IResolvable | AccessLogSettingProperty (optional)

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


cacheClusterEnabled?

Type: boolean | IResolvable (optional)

Specifies whether a cache cluster is enabled for the stage.


cacheClusterSize?

Type: string (optional)

The stage's cache capacity in GB.

For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .


canarySetting?

Type: IResolvable | CanarySettingProperty (optional)

Settings for the canary deployment in this stage.


clientCertificateId?

Type: string (optional)

The identifier of a client certificate for an API stage.


deploymentId?

Type: string (optional)

The identifier of the Deployment that the stage points to.


description?

Type: string (optional)

The stage's description.


documentationVersion?

Type: string (optional)

The version of the associated API documentation.


methodSettings?

Type: IResolvable | IResolvable | MethodSettingProperty[] (optional)

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.


stageName?

Type: string (optional)

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.


tags?

Type: CfnTag[] (optional)

The collection of tags.

Each tag element is associated with a given resource.


tracingEnabled?

Type: boolean | IResolvable (optional)

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


variables?

Type: IResolvable | { [string]: string } (optional)

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-._~:/?#&=,]+ .