CfnDeployment

class aws_cdk.aws_apigateway.CfnDeployment(scope, id, *, rest_api_id, deployment_canary_settings=None, description=None, stage_description=None, stage_name=None)

Bases: CfnResource

The AWS::ApiGateway::Deployment resource deploys an API Gateway RestApi resource to a stage so that clients can call the API over the internet.

The stage acts as an environment.

See:

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

CloudformationResource:

AWS::ApiGateway::Deployment

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_deployment = apigateway.CfnDeployment(self, "MyCfnDeployment",
    rest_api_id="restApiId",

    # the properties below are optional
    deployment_canary_settings=apigateway.CfnDeployment.DeploymentCanarySettingsProperty(
        percent_traffic=123,
        stage_variable_overrides={
            "stage_variable_overrides_key": "stageVariableOverrides"
        },
        use_stage_cache=False
    ),
    description="description",
    stage_description=apigateway.CfnDeployment.StageDescriptionProperty(
        access_log_setting=apigateway.CfnDeployment.AccessLogSettingProperty(
            destination_arn="destinationArn",
            format="format"
        ),
        cache_cluster_enabled=False,
        cache_cluster_size="cacheClusterSize",
        cache_data_encrypted=False,
        cache_ttl_in_seconds=123,
        caching_enabled=False,
        canary_setting=apigateway.CfnDeployment.CanarySettingProperty(
            percent_traffic=123,
            stage_variable_overrides={
                "stage_variable_overrides_key": "stageVariableOverrides"
            },
            use_stage_cache=False
        ),
        client_certificate_id="clientCertificateId",
        data_trace_enabled=False,
        description="description",
        documentation_version="documentationVersion",
        logging_level="loggingLevel",
        method_settings=[apigateway.CfnDeployment.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
        )],
        metrics_enabled=False,
        tags=[CfnTag(
            key="key",
            value="value"
        )],
        throttling_burst_limit=123,
        throttling_rate_limit=123,
        tracing_enabled=False,
        variables={
            "variables_key": "variables"
        }
    ),
    stage_name="stageName"
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • rest_api_id (str) – The string identifier of the associated RestApi.

  • deployment_canary_settings (Union[IResolvable, DeploymentCanarySettingsProperty, Dict[str, Any], None]) – The input configuration for a canary deployment.

  • description (Optional[str]) – The description for the Deployment resource to create.

  • stage_description (Union[IResolvable, StageDescriptionProperty, Dict[str, Any], None]) – The description of the Stage resource for the Deployment resource to create. To specify a stage description, you must also provide a stage name.

  • stage_name (Optional[str]) – The name of the Stage resource for the Deployment resource to create.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

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.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

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.

add_override(path, value)

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.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • 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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=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.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

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.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::ApiGateway::Deployment'
attr_deployment_id

The ID for the deployment.

For example: abc123 .

CloudformationAttribute:

DeploymentId

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

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.

deployment_canary_settings

The input configuration for a canary deployment.

description

The description for the Deployment resource to create.

logical_id

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).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The tree node.

ref

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 }).

rest_api_id

The string identifier of the associated RestApi.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

stage_description

The description of the Stage resource for the Deployment resource to create.

stage_name

The name of the Stage resource for the Deployment resource to create.

Static Methods

classmethod is_cfn_element(x)

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.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AccessLogSettingProperty

class CfnDeployment.AccessLogSettingProperty(*, destination_arn=None, format=None)

Bases: object

The AccessLogSetting property type specifies settings for logging access in this stage.

AccessLogSetting is a property of the StageDescription property type.

Parameters:
  • 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- .

  • 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-accesslogsetting.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

access_log_setting_property = apigateway.CfnDeployment.AccessLogSettingProperty(
    destination_arn="destinationArn",
    format="format"
)

Attributes

destination_arn

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- .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-accesslogsetting.html#cfn-apigateway-deployment-accesslogsetting-destinationarn

format

A single line format of the access logs of data, as specified by selected $context variables.

The format must include at least $context.requestId .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-accesslogsetting.html#cfn-apigateway-deployment-accesslogsetting-format

CanarySettingProperty

class CfnDeployment.CanarySettingProperty(*, percent_traffic=None, stage_variable_overrides=None, use_stage_cache=None)

Bases: object

The CanarySetting property type specifies settings for the canary deployment in this stage.

CanarySetting is a property of the StageDescription property type.

Parameters:
  • 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-canarysetting.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

canary_setting_property = apigateway.CfnDeployment.CanarySettingProperty(
    percent_traffic=123,
    stage_variable_overrides={
        "stage_variable_overrides_key": "stageVariableOverrides"
    },
    use_stage_cache=False
)

Attributes

percent_traffic

The percent (0-100) of traffic diverted to a canary deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-canarysetting.html#cfn-apigateway-deployment-canarysetting-percenttraffic

stage_variable_overrides

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-canarysetting.html#cfn-apigateway-deployment-canarysetting-stagevariableoverrides

use_stage_cache

A Boolean flag to indicate whether the canary deployment uses the stage cache or not.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-canarysetting.html#cfn-apigateway-deployment-canarysetting-usestagecache

DeploymentCanarySettingsProperty

class CfnDeployment.DeploymentCanarySettingsProperty(*, percent_traffic=None, stage_variable_overrides=None, use_stage_cache=None)

Bases: object

The DeploymentCanarySettings property type specifies settings for the canary deployment.

Parameters:
  • percent_traffic (Union[int, float, None]) – The percentage (0.0-100.0) of traffic routed to the canary deployment.

  • stage_variable_overrides (Union[IResolvable, Mapping[str, str], None]) – A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. 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 release deployment uses the stage cache or not.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-deploymentcanarysettings.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

deployment_canary_settings_property = apigateway.CfnDeployment.DeploymentCanarySettingsProperty(
    percent_traffic=123,
    stage_variable_overrides={
        "stage_variable_overrides_key": "stageVariableOverrides"
    },
    use_stage_cache=False
)

Attributes

percent_traffic

The percentage (0.0-100.0) of traffic routed to the canary deployment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-deploymentcanarysettings.html#cfn-apigateway-deployment-deploymentcanarysettings-percenttraffic

stage_variable_overrides

A stage variable overrides used for the canary release deployment.

They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-deploymentcanarysettings.html#cfn-apigateway-deployment-deploymentcanarysettings-stagevariableoverrides

use_stage_cache

A Boolean flag to indicate whether the canary release deployment uses the stage cache or not.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-deploymentcanarysettings.html#cfn-apigateway-deployment-deploymentcanarysettings-usestagecache

MethodSettingProperty

class CfnDeployment.MethodSettingProperty(*, cache_data_encrypted=None, cache_ttl_in_seconds=None, caching_enabled=None, data_trace_enabled=None, http_method=None, logging_level=None, metrics_enabled=None, resource_path=None, throttling_burst_limit=None, throttling_rate_limit=None)

Bases: object

The MethodSetting property type configures settings for all methods in a stage.

The MethodSettings property of the Amazon API Gateway Deployment StageDescription property type contains a list of MethodSetting property types.

Parameters:
  • 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. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don’t enable this option for production APIs.

  • http_method (Optional[str]) – The HTTP method.

  • 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 ( / ).

  • throttling_burst_limit (Union[int, float, None]) – Specifies the throttling burst limit.

  • throttling_rate_limit (Union[int, float, None]) – Specifies the throttling rate limit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.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

method_setting_property = apigateway.CfnDeployment.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

cache_data_encrypted

Specifies whether the cached responses are encrypted.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachedataencrypted

cache_ttl_in_seconds

Specifies the time to live (TTL), in seconds, for cached responses.

The higher the TTL, the longer the response will be cached.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachettlinseconds

caching_enabled

Specifies whether responses should be cached and returned for requests.

A cache cluster must be enabled on the stage for responses to be cached.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-cachingenabled

data_trace_enabled

Specifies whether data trace logging is enabled for this method, which affects the log entries pushed to Amazon CloudWatch Logs.

This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don’t enable this option for production APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-datatraceenabled

http_method

The HTTP method.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-httpmethod

logging_level

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-logginglevel

metrics_enabled

Specifies whether Amazon CloudWatch metrics are enabled for this method.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-metricsenabled

resource_path

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 ( / ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-resourcepath

throttling_burst_limit

Specifies the throttling burst limit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingburstlimit

throttling_rate_limit

Specifies the throttling rate limit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-methodsetting.html#cfn-apigateway-deployment-methodsetting-throttlingratelimit

StageDescriptionProperty

class CfnDeployment.StageDescriptionProperty(*, access_log_setting=None, cache_cluster_enabled=None, cache_cluster_size=None, cache_data_encrypted=None, cache_ttl_in_seconds=None, caching_enabled=None, canary_setting=None, client_certificate_id=None, data_trace_enabled=None, description=None, documentation_version=None, logging_level=None, method_settings=None, metrics_enabled=None, tags=None, throttling_burst_limit=None, throttling_rate_limit=None, tracing_enabled=None, variables=None)

Bases: object

StageDescription is a property of the AWS::ApiGateway::Deployment resource that configures a deployment stage.

Parameters:
  • access_log_setting (Union[IResolvable, AccessLogSettingProperty, Dict[str, Any], None]) – Specifies settings for logging access in this stage.

  • 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 size of the stage’s cache cluster. For more information, see cacheClusterSize in the API Gateway API Reference .

  • cache_data_encrypted (Union[bool, IResolvable, None]) – Indicates whether the cached responses are encrypted.

  • cache_ttl_in_seconds (Union[int, float, None]) – The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.

  • caching_enabled (Union[bool, IResolvable, None]) – Indicates whether responses are cached and returned for requests. You must enable a cache cluster on the stage to cache responses. For more information, see Enable API Gateway Caching in a Stage to Enhance API Performance in the API Gateway Developer Guide .

  • canary_setting (Union[IResolvable, CanarySettingProperty, Dict[str, Any], None]) – Specifies settings for the canary deployment in this stage.

  • client_certificate_id (Optional[str]) – The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.

  • data_trace_enabled (Union[bool, IResolvable, None]) – Indicates whether data trace logging is enabled for methods in the stage. API Gateway pushes these logs to Amazon CloudWatch Logs.

  • description (Optional[str]) – A description of the purpose of the stage.

  • documentation_version (Optional[str]) – The version identifier of the API documentation snapshot.

  • logging_level (Optional[str]) – The logging level for this method. For valid values, see the loggingLevel property of the MethodSetting resource in the Amazon API Gateway API Reference .

  • method_settings (Union[IResolvable, Sequence[Union[IResolvable, MethodSettingProperty, Dict[str, Any]]], None]) – Configures settings for all of the stage’s methods.

  • metrics_enabled (Union[bool, IResolvable, None]) – Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of arbitrary tags (key-value pairs) to associate with the stage.

  • throttling_burst_limit (Union[int, float, None]) – The target request burst rate limit. This allows more requests through for a period of time than the target rate limit. For more information, see Manage API Request Throttling in the API Gateway Developer Guide .

  • throttling_rate_limit (Union[int, float, None]) –

    The target request steady-state rate limit. For more information, see Manage API Request Throttling in the API Gateway Developer Guide .

  • tracing_enabled (Union[bool, IResolvable, None]) – Specifies whether active tracing with X-ray is enabled for this stage. For more information, see Trace API Gateway API Execution with AWS X-Ray in the API Gateway Developer Guide .

  • variables (Union[IResolvable, Mapping[str, str], None]) – 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-._~:/?#&=,]+ .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.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

stage_description_property = apigateway.CfnDeployment.StageDescriptionProperty(
    access_log_setting=apigateway.CfnDeployment.AccessLogSettingProperty(
        destination_arn="destinationArn",
        format="format"
    ),
    cache_cluster_enabled=False,
    cache_cluster_size="cacheClusterSize",
    cache_data_encrypted=False,
    cache_ttl_in_seconds=123,
    caching_enabled=False,
    canary_setting=apigateway.CfnDeployment.CanarySettingProperty(
        percent_traffic=123,
        stage_variable_overrides={
            "stage_variable_overrides_key": "stageVariableOverrides"
        },
        use_stage_cache=False
    ),
    client_certificate_id="clientCertificateId",
    data_trace_enabled=False,
    description="description",
    documentation_version="documentationVersion",
    logging_level="loggingLevel",
    method_settings=[apigateway.CfnDeployment.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
    )],
    metrics_enabled=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    throttling_burst_limit=123,
    throttling_rate_limit=123,
    tracing_enabled=False,
    variables={
        "variables_key": "variables"
    }
)

Attributes

access_log_setting

Specifies settings for logging access in this stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-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-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-cacheclusterenabled

cache_cluster_size

The size of the stage’s cache cluster.

For more information, see cacheClusterSize in the API Gateway API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-cacheclustersize

cache_data_encrypted

Indicates whether the cached responses are encrypted.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-cachedataencrypted

cache_ttl_in_seconds

The time-to-live (TTL) period, in seconds, that specifies how long API Gateway caches responses.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-cachettlinseconds

caching_enabled

Indicates whether responses are cached and returned for requests.

You must enable a cache cluster on the stage to cache responses. For more information, see Enable API Gateway Caching in a Stage to Enhance API Performance in the API Gateway Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-cachingenabled

canary_setting

Specifies settings for the canary deployment in this stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-canarysetting

client_certificate_id

The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-clientcertificateid

data_trace_enabled

Indicates whether data trace logging is enabled for methods in the stage.

API Gateway pushes these logs to Amazon CloudWatch Logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-datatraceenabled

description

A description of the purpose of the stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-description

documentation_version

The version identifier of the API documentation snapshot.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-documentationversion

logging_level

The logging level for this method.

For valid values, see the loggingLevel property of the MethodSetting resource in the Amazon API Gateway API Reference .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-logginglevel

method_settings

Configures settings for all of the stage’s methods.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-methodsettings

metrics_enabled

Indicates whether Amazon CloudWatch metrics are enabled for methods in the stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-metricsenabled

tags

An array of arbitrary tags (key-value pairs) to associate with the stage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-tags

throttling_burst_limit

The target request burst rate limit.

This allows more requests through for a period of time than the target rate limit. For more information, see Manage API Request Throttling in the API Gateway Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-throttlingburstlimit

throttling_rate_limit

The target request steady-state rate limit.

For more information, see Manage API Request Throttling in the API Gateway Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-throttlingratelimit

tracing_enabled

Specifies whether active tracing with X-ray is enabled for this stage.

For more information, see Trace API Gateway API Execution with AWS X-Ray in the API Gateway Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-tracingenabled

variables

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-deployment-stagedescription.html#cfn-apigateway-deployment-stagedescription-variables