- class aws_cdk.aws_apigateway.Stage(scope, id, *, deployment, access_log_destination=None, access_log_format=None, cache_cluster_enabled=None, cache_cluster_size=None, client_certificate_id=None, description=None, documentation_version=None, method_options=None, stage_name=None, tracing_enabled=None, variables=None, cache_data_encrypted=None, cache_ttl=None, caching_enabled=None, data_trace_enabled=None, logging_level=None, metrics_enabled=None, throttling_burst_limit=None, throttling_rate_limit=None)
# production stage prd_log_group = logs.LogGroup(self, "PrdLogs") api = apigateway.RestApi(self, "books", deploy_options=apigateway.StageOptions( access_log_destination=apigateway.LogGroupLogDestination(prd_log_group), access_log_format=apigateway.AccessLogFormat.json_with_standard_fields() ) ) deployment = apigateway.Deployment(self, "Deployment", api=api) # development stage dev_log_group = logs.LogGroup(self, "DevLogs") apigateway.Stage(self, "dev", deployment=deployment, access_log_destination=apigateway.LogGroupLogDestination(dev_log_group), access_log_format=apigateway.AccessLogFormat.json_with_standard_fields( caller=False, http_method=True, ip=True, protocol=True, request_time=True, resource_path=True, response_length=True, status=True, user=True ) )
Deployment) – The deployment that this stage points to [disable-awslint:ref-via-interface].
IAccessLogDestination]) – The CloudWatch Logs log group. Default: - No destination
AccessLogFormat]) – A single line format of access logs of data, as specified by selected $content variables. The format must include at least
AccessLogFormat.contextRequestId(). Default: - Common Log Format
bool]) – Indicates whether cache clustering is enabled for the stage. Default: - Disabled for the stage.
str]) – The stage’s cache cluster size. Default: 0.5
str]) – The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. Default: - None.
str]) – A description of the purpose of the stage. Default: - No description.
str]) – The version identifier of the API documentation snapshot. Default: - No documentation version.
Any]]]]) – Method deployment options for specific resources/methods. These will override common options defined in
StageOptions#methodOptions. Default: - Common options will be used.
str]) – The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI). Default: - “prod”
bool]) – Specifies whether Amazon X-Ray tracing is enabled for this method. Default: false
str]]) – 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.
bool]) – Indicates whether the cached responses are encrypted. Default: false
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)
bool]) – 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.
bool]) – 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
MethodLoggingLevel]) – Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. Default: - Off
bool]) – Specifies whether Amazon CloudWatch metrics are enabled for this method. Default: false
None]) – 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.
None]) – 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.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (
- Return type
Returns a string representation of this construct.
- Return type
Returns the invoke URL for a certain path.
str]) – The resource path.
- Return type
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
The construct tree node associated with this construct.
RestApi to which this stage is associated.
The stack in which this resource is defined.
Note that this is separate from the execute-api ARN for methods and resources within this stage.
Returns the resource ARN for this stage
Name of this stage.
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Return type