Bases: CfnResource
A CloudFormation AWS::ApiGateway::Stage
.
The AWS::ApiGateway::Stage
resource creates a stage for a deployment.
AWS::ApiGateway::Stage
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigateway as apigateway cfn_stage = apigateway.CfnStage(self, "MyCfnStage", rest_api_id="restApiId", # the properties below are optional access_log_setting=apigateway.CfnStage.AccessLogSettingProperty( destination_arn="destinationArn", format="format" ), cache_cluster_enabled=False, cache_cluster_size="cacheClusterSize", canary_setting=apigateway.CfnStage.CanarySettingProperty( deployment_id="deploymentId", percent_traffic=123, stage_variable_overrides={ "stage_variable_overrides_key": "stageVariableOverrides" }, use_stage_cache=False ), client_certificate_id="clientCertificateId", deployment_id="deploymentId", description="description", documentation_version="documentationVersion", method_settings=[apigateway.CfnStage.MethodSettingProperty( cache_data_encrypted=False, cache_ttl_in_seconds=123, caching_enabled=False, data_trace_enabled=False, http_method="httpMethod", logging_level="loggingLevel", metrics_enabled=False, resource_path="resourcePath", throttling_burst_limit=123, throttling_rate_limit=123 )], stage_name="stageName", tags=[CfnTag( key="key", value="value" )], tracing_enabled=False, variables={ "variables_key": "variables" } )
Create a new AWS::ApiGateway::Stage
.
scope (Construct
) â
scope in which this resource is defined.
id (str
) â
scoped id of the resource.
rest_api_id (str
) â The string identifier of the associated RestApi.
access_log_setting (Union
[IResolvable
, AccessLogSettingProperty
, Dict
[str
, Any
], None
]) â Access log settings, including the access log format and access log destination ARN.
cache_cluster_enabled (Union
[bool
, IResolvable
, None
]) â Specifies whether a cache cluster is enabled for the stage.
cache_cluster_size (Optional
[str
]) â The stageâs cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .
canary_setting (Union
[IResolvable
, CanarySettingProperty
, Dict
[str
, Any
], None
]) â Settings for the canary deployment in this stage.
client_certificate_id (Optional
[str
]) â The identifier of a client certificate for an API stage.
deployment_id (Optional
[str
]) â The identifier of the Deployment that the stage points to.
description (Optional
[str
]) â The stageâs description.
documentation_version (Optional
[str
]) â The version of the associated API documentation.
method_settings (Union
[IResolvable
, Sequence
[Union
[IResolvable
, MethodSettingProperty
, Dict
[str
, Any
]]], None
]) â 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.
stage_name (Optional
[str
]) â 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 (Optional
[Sequence
[Union
[CfnTag
, Dict
[str
, Any
]]]]) â The collection of tags. Each tag element is associated with a given resource.
tracing_enabled (Union
[bool
, IResolvable
, None
]) â Specifies whether active tracing with X-ray is enabled for the Stage.
variables (Union
[IResolvable
, Mapping
[str
, str
], None
]) â 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-._~:/?#&=,]+
.
Methods
Syntactic sugar for addOverride(path, undefined)
.
path (str
) â The path of the value to delete.
None
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
target (CfnResource
)
None
Add a value to the CloudFormation Resource Metadata.
key (str
)
value (Any
)
None
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use addPropertyOverride
or prefix path
with âProperties.â (i.e. Properties.TopicName
).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal .
in the property name, prefix with a \
. In most programming languages you will need to write this as "\\."
because the \
itself will need to be escaped.
For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The value
argument to addOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
path (str
) â
The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
value (Any
) â
The value. Could be primitive or complex.
None
Adds an override that deletes the value of a property from the resource definition.
property_path (str
) â The path to the property.
None
Adds an override to a resource property.
Syntactic sugar for addOverride("Properties.<...>", value)
.
property_path (str
) â The path of the property.
value (Any
) â The value.
None
Sets the deletion policy of the resource based on the removal policy specified.
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 (RemovalPolicy.RETAIN
).
policy (Optional
[RemovalPolicy
])
apply_to_update_replace_policy (Optional
[bool
]) â Apply the same deletion policy to the resourceâs âUpdateReplacePolicyâ. Default: true
default (Optional
[RemovalPolicy
]) â The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resourceâs documentation.
None
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g. resource.arn
), but this can be used for future compatibility in case there is no generated attribute.
attribute_name (str
) â The name of the attribute.
Retrieve a value value from the CloudFormation Resource Metadata.
key (str
)
Any
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
Examines the CloudFormation resource and discloses attributes.
inspector (TreeInspector
) â
tree inspector to collect and process attributes.
None
Overrides the auto-generated logical ID with a specific ID.
new_logical_id (str
) â The new logical ID to use for this stack element.
None
Returns a string representation of this construct.
str
a string representation of this resource
Attributes
Access log settings, including the access log format and access log destination ARN.
Specifies whether a cache cluster is enabled for the stage.
The stageâs cache capacity in GB.
For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .
Settings for the canary deployment in this stage.
Options for this resource, such as condition, update policy etc.
AWS resource type.
The identifier of a client certificate for an API stage.
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
The identifier of the Deployment that the stage points to.
The stageâs description.
The version of the associated API documentation.
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
the logical ID as a stringified token. This value will only get resolved during synthesis.
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.
The construct tree node associated with this construct.
Return a string that will be resolved to a CloudFormation { Ref }
for this element.
If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref })
.
The string identifier of the associated RestApi.
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
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.
The collection of tags.
Each tag element is associated with a given resource.
Specifies whether active tracing with X-ray is enabled for the Stage.
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-._~:/?#&=,]+
.
Static Methods
Returns true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of instanceof
to allow stack elements from different versions of this library to be included in the same stack.
x (Any
)
bool
The construct as a stack element or undefined if it is not a stack element.
Check whether the given construct is a CfnResource.
construct (IConstruct
)
bool
Return whether the given object is a Construct.
x (Any
)
bool
Bases: object
The AccessLogSetting
property type specifies settings for logging access in this stage.
AccessLogSetting
is a property of the AWS::ApiGateway::Stage resource.
destination_arn (Optional
[str
]) â The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs. If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-
. This parameter is required to enable access logging.
format (Optional
[str
]) â A single line format of the access logs of data, as specified by selected $context variables . The format must include at least $context.requestId
. This parameter is required to enable access logging.
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigateway as apigateway access_log_setting_property = apigateway.CfnStage.AccessLogSettingProperty( destination_arn="destinationArn", format="format" )
Attributes
The Amazon Resource Name (ARN) of the CloudWatch Logs log group or Kinesis Data Firehose delivery stream to receive access logs.
If you specify a Kinesis Data Firehose delivery stream, the stream name must begin with amazon-apigateway-
. This parameter is required to enable access logging.
A single line format of the access logs of data, as specified by selected $context variables . The format must include at least $context.requestId
. This parameter is required to enable access logging.
Bases: object
Configuration settings of a canary deployment.
deployment_id (Optional
[str
]) â The ID of the canary deployment.
percent_traffic (Union
[int
, float
, None
]) â The percent (0-100) of traffic diverted to a canary deployment.
stage_variable_overrides (Union
[IResolvable
, Mapping
[str
, str
], None
]) â Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary. These stage variables are represented as a string-to-string map between stage variable names and their values.
use_stage_cache (Union
[bool
, IResolvable
, None
]) â A Boolean flag to indicate whether the canary deployment uses the stage cache or not.
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigateway as apigateway canary_setting_property = apigateway.CfnStage.CanarySettingProperty( deployment_id="deploymentId", percent_traffic=123, stage_variable_overrides={ "stage_variable_overrides_key": "stageVariableOverrides" }, use_stage_cache=False )
Attributes
The ID of the canary deployment.
The percent (0-100) of traffic diverted to a canary deployment.
Stage variables overridden for a canary release deployment, including new stage variables introduced in the canary.
These stage variables are represented as a string-to-string map between stage variable names and their values.
A Boolean flag to indicate whether the canary deployment uses the stage cache or not.
Bases: object
The MethodSetting
property type configures settings for all methods in a stage.
The MethodSettings
property of the AWS::ApiGateway::Stage
resource contains a list of MethodSetting
property types.
cache_data_encrypted (Union
[bool
, IResolvable
, None
]) â Specifies whether the cached responses are encrypted.
cache_ttl_in_seconds (Union
[int
, float
, None
]) â Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response will be cached.
caching_enabled (Union
[bool
, IResolvable
, None
]) â Specifies whether responses should be cached and returned for requests. A cache cluster must be enabled on the stage for responses to be cached.
data_trace_enabled (Union
[bool
, IResolvable
, None
]) â Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs.
http_method (Optional
[str
]) â The HTTP method. To apply settings to multiple resources and methods, specify an asterisk ( *
) for the HttpMethod
and /*
for the ResourcePath
. This parameter is required when you specify a MethodSetting
.
logging_level (Optional
[str
]) â Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs. Valid values are OFF
, ERROR
, and INFO
. Choose ERROR
to write only error-level entries to CloudWatch Logs, or choose INFO
to include all ERROR
events as well as extra informational events.
metrics_enabled (Union
[bool
, IResolvable
, None
]) â Specifies whether Amazon CloudWatch metrics are enabled for this method.
resource_path (Optional
[str
]) â The resource path for this method. Forward slashes ( /
) are encoded as ~1
and the initial slash must include a forward slash. For example, the path value /resource/subresource
must be encoded as /~1resource~1subresource
. To specify the root path, use only a slash ( /
). To apply settings to multiple resources and methods, specify an asterisk ( *
) for the HttpMethod
and /*
for the ResourcePath
. This parameter is required when you specify a MethodSetting
.
throttling_burst_limit (Union
[int
, float
, None
]) â Specifies the throttling burst limit.
throttling_rate_limit (Union
[int
, float
, None
]) â Specifies the throttling rate limit.
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigateway as apigateway method_setting_property = apigateway.CfnStage.MethodSettingProperty( cache_data_encrypted=False, cache_ttl_in_seconds=123, caching_enabled=False, data_trace_enabled=False, http_method="httpMethod", logging_level="loggingLevel", metrics_enabled=False, resource_path="resourcePath", throttling_burst_limit=123, throttling_rate_limit=123 )
Attributes
Specifies whether the cached responses are encrypted.
Specifies the time to live (TTL), in seconds, for cached responses.
The higher the TTL, the longer the response will be cached.
Specifies whether responses should be cached and returned for requests.
A cache cluster must be enabled on the stage for responses to be cached.
Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs.
The HTTP method.
To apply settings to multiple resources and methods, specify an asterisk ( *
) for the HttpMethod
and /*
for the ResourcePath
. This parameter is required when you specify a MethodSetting
.
Specifies the logging level for this method, which affects the log entries pushed to Amazon CloudWatch Logs.
Valid values are OFF
, ERROR
, and INFO
. Choose ERROR
to write only error-level entries to CloudWatch Logs, or choose INFO
to include all ERROR
events as well as extra informational events.
Specifies whether Amazon CloudWatch metrics are enabled for this method.
The resource path for this method.
Forward slashes ( /
) are encoded as ~1
and the initial slash must include a forward slash. For example, the path value /resource/subresource
must be encoded as /~1resource~1subresource
. To specify the root path, use only a slash ( /
). To apply settings to multiple resources and methods, specify an asterisk ( *
) for the HttpMethod
and /*
for the ResourcePath
. This parameter is required when you specify a MethodSetting
.
Specifies the throttling burst limit.
Specifies the throttling rate limit.
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