CfnStageProps

class aws_cdk.aws_apigateway.CfnStageProps(*, rest_api_id, access_log_setting=None, cache_cluster_enabled=None, cache_cluster_size=None, canary_setting=None, client_certificate_id=None, deployment_id=None, description=None, documentation_version=None, method_settings=None, stage_name=None, tags=None, tracing_enabled=None, variables=None)

Bases: object

Properties for defining a CfnStage.

Parameters:
  • 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. To activate a method-level cache, set CachingEnabled to true for a method.

  • 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-._~:/?#&=,]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway

cfn_stage_props = apigateway.CfnStageProps(
    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"
    }
)

Attributes

access_log_setting

Access log settings, including the access log format and access log destination ARN.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-accesslogsetting

cache_cluster_enabled

Specifies whether a cache cluster is enabled for the stage.

To activate a method-level cache, set CachingEnabled to true for a method.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-cacheclusterenabled

cache_cluster_size

The stage’s cache capacity in GB.

For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-cacheclustersize

canary_setting

Settings for the canary deployment in this stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-canarysetting

client_certificate_id

The identifier of a client certificate for an API stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-clientcertificateid

deployment_id

The identifier of the Deployment that the stage points to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-deploymentid

description

The stage’s description.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-description

documentation_version

The version of the associated API documentation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-documentationversion

method_settings

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-methodsettings

rest_api_id

The string identifier of the associated RestApi.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-restapiid

stage_name

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-stagename

tags

The collection of tags.

Each tag element is associated with a given resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-tags

tracing_enabled

Specifies whether active tracing with X-ray is enabled for the Stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-tracingenabled

variables

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-._~:/?#&=,]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables