CfnStagePropsMixin

class aws_cdk.cfn_property_mixins.aws_apigatewayv2.CfnStagePropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::ApiGatewayV2::Stage resource specifies a stage for an API.

Each stage is a named reference to a deployment of the API and is made available for client applications to call. To learn more, see Working with stages for HTTP APIs and Deploy a WebSocket API in API Gateway .

See:

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

CloudformationResource:

AWS::ApiGatewayV2::Stage

Mixin:

true

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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy
# route_settings: Any
# stage_variables: Any
# tags: Any

cfn_stage_props_mixin = apigatewayv2.CfnStagePropsMixin(apigatewayv2.CfnStageMixinProps(
    access_log_settings=apigatewayv2.CfnStagePropsMixin.AccessLogSettingsProperty(
        destination_arn="destinationArn",
        format="format"
    ),
    access_policy_id="accessPolicyId",
    api_id="apiId",
    auto_deploy=False,
    client_certificate_id="clientCertificateId",
    default_route_settings=apigatewayv2.CfnStagePropsMixin.RouteSettingsProperty(
        data_trace_enabled=False,
        detailed_metrics_enabled=False,
        logging_level="loggingLevel",
        throttling_burst_limit=123,
        throttling_rate_limit=123
    ),
    deployment_id="deploymentId",
    description="description",
    route_settings=route_settings,
    stage_name="stageName",
    stage_variables=stage_variables,
    tags=tags
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::ApiGatewayV2::Stage.

Parameters:
  • props (Union[CfnStageMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['accessLogSettings', 'accessPolicyId', 'apiId', 'autoDeploy', 'clientCertificateId', 'defaultRouteSettings', 'deploymentId', 'description', 'routeSettings', 'stageName', 'stageVariables', 'tags']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

AccessLogSettingsProperty

class CfnStagePropsMixin.AccessLogSettingsProperty(*, destination_arn=None, format=None)

Bases: object

Settings for logging access in a stage.

Parameters:
  • destination_arn (Optional[str]) – The ARN of the CloudWatch Logs log group to receive access logs. 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2

access_log_settings_property = apigatewayv2.CfnStagePropsMixin.AccessLogSettingsProperty(
    destination_arn="destinationArn",
    format="format"
)

Attributes

destination_arn

The ARN of the CloudWatch Logs log group to receive access logs.

This parameter is required to enable access logging.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-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. This parameter is required to enable access logging.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-accesslogsettings.html#cfn-apigatewayv2-stage-accesslogsettings-format

RouteSettingsProperty

class CfnStagePropsMixin.RouteSettingsProperty(*, data_trace_enabled=None, detailed_metrics_enabled=None, logging_level=None, throttling_burst_limit=None, throttling_rate_limit=None)

Bases: object

Represents a collection of route settings.

Parameters:
  • data_trace_enabled (Union[bool, IResolvable, None]) – Specifies whether ( true ) or not ( false ) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

  • detailed_metrics_enabled (Union[bool, IResolvable, None]) – Specifies whether detailed metrics are enabled.

  • logging_level (Optional[str]) – Specifies the logging level for this route: INFO , ERROR , or OFF . This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

  • 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-apigatewayv2-stage-routesettings.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.cfn_property_mixins import aws_apigatewayv2 as apigatewayv2

route_settings_property = apigatewayv2.CfnStagePropsMixin.RouteSettingsProperty(
    data_trace_enabled=False,
    detailed_metrics_enabled=False,
    logging_level="loggingLevel",
    throttling_burst_limit=123,
    throttling_rate_limit=123
)

Attributes

data_trace_enabled

Specifies whether ( true ) or not ( false ) data trace logging is enabled for this route.

This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-datatraceenabled

detailed_metrics_enabled

Specifies whether detailed metrics are enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-detailedmetricsenabled

logging_level

INFO , ERROR , or OFF .

This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-logginglevel

Type:

Specifies the logging level for this route

throttling_burst_limit

Specifies the throttling burst limit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-throttlingburstlimit

throttling_rate_limit

Specifies the throttling rate limit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-stage-routesettings.html#cfn-apigatewayv2-stage-routesettings-throttlingratelimit