interface StageOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Apigatewayv2.StageOptions |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#StageOptions |
![]() | software.amazon.awscdk.services.apigatewayv2.StageOptions |
![]() | aws_cdk.aws_apigatewayv2.StageOptions |
![]() | aws-cdk-lib » aws_apigatewayv2 » StageOptions |
Options required to create a new stage.
Options that are common between HTTP and Websocket APIs.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigatewayv2 as apigatewayv2 } from 'aws-cdk-lib';
declare const accessLogSettings: apigatewayv2.IAccessLogSettings;
declare const domainName: apigatewayv2.DomainName;
const stageOptions: apigatewayv2.StageOptions = {
accessLogSettings: accessLogSettings,
autoDeploy: false,
description: 'description',
detailedMetricsEnabled: false,
domainMapping: {
domainName: domainName,
// the properties below are optional
mappingKey: 'mappingKey',
},
stageVariables: {
stageVariablesKey: 'stageVariables',
},
throttle: {
burstLimit: 123,
rateLimit: 123,
},
};
Properties
Name | Type | Description |
---|---|---|
access | IAccess | Settings for access logging. |
auto | boolean | Whether updates to an API automatically trigger a new deployment. |
description? | string | The description for the API stage. |
detailed | boolean | Specifies whether detailed metrics are enabled. |
domain | Domain | The options for custom domain and api mapping. |
stage | { [string]: string } | Stage variables for the stage. These are key-value pairs that you can define and use in your API routes. |
throttle? | Throttle | Throttle settings for the routes of this stage. |
accessLogSettings?
Type:
IAccess
(optional, default: No access logging)
Settings for access logging.
autoDeploy?
Type:
boolean
(optional, default: false)
Whether updates to an API automatically trigger a new deployment.
description?
Type:
string
(optional, default: no description)
The description for the API stage.
detailedMetricsEnabled?
Type:
boolean
(optional, default: false)
Specifies whether detailed metrics are enabled.
domainMapping?
Type:
Domain
(optional, default: no custom domain and api mapping configuration)
The options for custom domain and api mapping.
stageVariables?
Type:
{ [string]: string }
(optional, default: No stage variables)
Stage variables for the stage. These are key-value pairs that you can define and use in your API routes.
The allowed characters for variable names and the required pattern for variable values are specified here: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables
throttle?
Type:
Throttle
(optional, default: no throttling configuration)
Throttle settings for the routes of this stage.