Bases: StageOptions
cache_data_encrypted (Optional
[bool
]) â Indicates whether the cached responses are encrypted. Default: false
cache_ttl (Optional
[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)
caching_enabled (Optional
[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.
data_trace_enabled (Optional
[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
logging_level (Optional
[MethodLoggingLevel
]) â Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. Default: - Off
metrics_enabled (Optional
[bool
]) â Specifies whether Amazon CloudWatch metrics are enabled for this method. Default: false
throttling_burst_limit (Union
[int
, float
, 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.
throttling_rate_limit (Union
[int
, float
, 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.
access_log_destination (Optional
[IAccessLogDestination
]) â The CloudWatch Logs log group. Default: - No destination
access_log_format (Optional
[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
cache_cluster_enabled (Optional
[bool
]) â Indicates whether cache clustering is enabled for the stage. Default: - Disabled for the stage.
cache_cluster_size (Optional
[str
]) â The stageâs cache cluster size. Default: 0.5
client_certificate_id (Optional
[str
]) â The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. Default: - None.
description (Optional
[str
]) â A description of the purpose of the stage. Default: - No description.
documentation_version (Optional
[str
]) â The version identifier of the API documentation snapshot. Default: - No documentation version.
method_options (Optional
[Mapping
[str
, Union
[MethodDeploymentOptions
, Dict
[str
, Any
]]]]) â Method deployment options for specific resources/methods. These will override common options defined in StageOptions#methodOptions
. Default: - Common options will be used.
stage_name (Optional
[str
]) â The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI). Default: - âprodâ
tracing_enabled (Optional
[bool
]) â Specifies whether Amazon X-Ray tracing is enabled for this method. Default: false
variables (Optional
[Mapping
[str
, 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.
deployment (Deployment
) â The deployment that this stage points to [disable-awslint:ref-via-interface].
infused
Example:
# 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 ) )
Attributes
The CloudWatch Logs log group.
No destination
A single line format of access logs of data, as specified by selected $content variables.
The format must include at least AccessLogFormat.contextRequestId()
.
Indicates whether cache clustering is enabled for the stage.
Disabled for the stage.
The stageâs cache cluster size.
0.5
Indicates whether the cached responses are encrypted.
false
Specifies the time to live (TTL), in seconds, for cached responses.
The higher the TTL, the longer the response will be cached.
Duration.minutes(5)
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
Specifies whether responses should be cached and returned for requests.
A cache cluster must be enabled on the stage for responses to be cached.
Caching is Disabled.
The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.
None.
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.
false
ref-via-interface].
The deployment that this stage points to [disable-awslint
A description of the purpose of the stage.
No description.
The version identifier of the API documentation snapshot.
No documentation version.
Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.
Off
Method deployment options for specific resources/methods.
These will override common options defined in StageOptions#methodOptions
.
Common options will be used.
Specifies whether Amazon CloudWatch metrics are enabled for this method.
false
The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).
âprodâ
Specifies the throttling burst limit.
The total rate of all requests in your AWS account is limited to 5,000 requests.
No additional restriction.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
Specifies the throttling rate limit.
The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).
No additional restriction.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html
Specifies whether Amazon X-Ray tracing is enabled for this method.
false
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-._~:/?#&=,]+.
No stage variables.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4