Interface IStageOptions
Options required to create a new stage.
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IStageOptions
Syntax (vb)
Public Interface IStageOptions
Remarks
Options that are common between HTTP and Websocket APIs.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Apigatewayv2;
using Amazon.CDK.Interfaces.Apigatewayv2;
IAccessLogSettings accessLogSettings;
IDomainNameRef domainNameRef;
var stageOptions = new StageOptions {
AccessLogSettings = accessLogSettings,
AutoDeploy = false,
Description = "description",
DetailedMetricsEnabled = false,
DomainMapping = new DomainMappingOptions {
DomainName = domainNameRef,
// the properties below are optional
MappingKey = "mappingKey"
},
StageVariables = new Dictionary<string, string> {
{ "stageVariablesKey", "stageVariables" }
},
Throttle = new ThrottleSettings {
BurstLimit = 123,
RateLimit = 123
}
};
Synopsis
Properties
| AccessLogSettings | Settings for access logging. |
| AutoDeploy | Whether updates to an API automatically trigger a new deployment. |
| Description | The description for the API stage. |
| DetailedMetricsEnabled | Specifies whether detailed metrics are enabled. |
| DomainMapping | The options for custom domain and api mapping. |
| StageVariables | Stage variables for the stage. These are key-value pairs that you can define and use in your API routes. |
| Throttle | Throttle settings for the routes of this stage. |
Properties
AccessLogSettings
Settings for access logging.
IAccessLogSettings? AccessLogSettings { get; }
Property Value
Remarks
Default: - No access logging
AutoDeploy
Whether updates to an API automatically trigger a new deployment.
bool? AutoDeploy { get; }
Property Value
bool?
Remarks
Default: false
Description
The description for the API stage.
string? Description { get; }
Property Value
Remarks
Default: - no description
DetailedMetricsEnabled
Specifies whether detailed metrics are enabled.
bool? DetailedMetricsEnabled { get; }
Property Value
bool?
Remarks
Default: false
DomainMapping
The options for custom domain and api mapping.
IDomainMappingOptions? DomainMapping { get; }
Property Value
Remarks
Default: - no custom domain and api mapping configuration
StageVariables
Stage variables for the stage. These are key-value pairs that you can define and use in your API routes.
IDictionary<string, string>? StageVariables { get; }
Property Value
Remarks
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
Default: - No stage variables
Throttle
Throttle settings for the routes of this stage.
IThrottleSettings? Throttle { get; }
Property Value
Remarks
Default: - no throttling configuration