CfnStateMachineAliasProps

class aws_cdk.aws_stepfunctions.CfnStateMachineAliasProps(*, deployment_preference=None, description=None, name=None, routing_configuration=None)

Bases: object

Properties for defining a CfnStateMachineAlias.

Parameters:
  • deployment_preference (Union[IResolvable, DeploymentPreferenceProperty, Dict[str, Any], None]) – The settings that enable gradual state machine deployments. These settings include Alarms , Interval , Percentage , StateMachineVersionArn , and Type . CloudFormation automatically shifts traffic from the version an alias currently points to, to a new state machine version that you specify. .. epigraph:: RoutingConfiguration and DeploymentPreference are mutually exclusive properties. You must define only one of these properties. Based on the type of deployment you want to perform, you can specify one of the following settings: - LINEAR - Shifts traffic to the new version in equal increments with an equal number of minutes between each increment. For example, if you specify the increment percent as 20 with an interval of 600 minutes, this deployment increases traffic by 20 percent every 600 minutes until the new version receives 100 percent of the traffic. This deployment immediately rolls back the new version if any Amazon CloudWatch alarms are triggered. - ALL_AT_ONCE - Shifts 100 percent of traffic to the new version immediately. CloudFormation monitors the new version and rolls it back automatically to the previous version if any CloudWatch alarms are triggered. - CANARY - Shifts traffic in two increments. In the first increment, a small percentage of traffic, for example, 10 percent is shifted to the new version. In the second increment, before a specified time interval in seconds gets over, the remaining traffic is shifted to the new version. The shift to the new version for the remaining traffic takes place only if no CloudWatch alarms are triggered during the specified time interval.

  • description (Optional[str]) – An optional description of the state machine alias.

  • name (Optional[str]) – The name of the state machine alias. If you don’t provide a name, it uses an automatically generated name based on the logical ID.

  • routing_configuration (Union[IResolvable, Sequence[Union[IResolvable, RoutingConfigurationVersionProperty, Dict[str, Any]]], None]) – The routing configuration of an alias. Routing configuration splits StartExecution requests between one or two versions of the same state machine. Use RoutingConfiguration if you want to explicitly set the alias weights . Weight is the percentage of traffic you want to route to a state machine version. .. epigraph:: RoutingConfiguration and DeploymentPreference are mutually exclusive properties. You must define only one of these properties.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.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_stepfunctions as stepfunctions

cfn_state_machine_alias_props = stepfunctions.CfnStateMachineAliasProps(
    deployment_preference=stepfunctions.CfnStateMachineAlias.DeploymentPreferenceProperty(
        state_machine_version_arn="stateMachineVersionArn",
        type="type",

        # the properties below are optional
        alarms=["alarms"],
        interval=123,
        percentage=123
    ),
    description="description",
    name="name",
    routing_configuration=[stepfunctions.CfnStateMachineAlias.RoutingConfigurationVersionProperty(
        state_machine_version_arn="stateMachineVersionArn",
        weight=123
    )]
)

Attributes

deployment_preference

The settings that enable gradual state machine deployments.

These settings include Alarms , Interval , Percentage , StateMachineVersionArn , and Type .

CloudFormation automatically shifts traffic from the version an alias currently points to, to a new state machine version that you specify. .. epigraph:

``RoutingConfiguration`` and ``DeploymentPreference`` are mutually exclusive properties. You must define only one of these properties.

Based on the type of deployment you want to perform, you can specify one of the following settings:

  • LINEAR - Shifts traffic to the new version in equal increments with an equal number of minutes between each increment.

For example, if you specify the increment percent as 20 with an interval of 600 minutes, this deployment increases traffic by 20 percent every 600 minutes until the new version receives 100 percent of the traffic. This deployment immediately rolls back the new version if any Amazon CloudWatch alarms are triggered.

  • ALL_AT_ONCE - Shifts 100 percent of traffic to the new version immediately. CloudFormation monitors the new version and rolls it back automatically to the previous version if any CloudWatch alarms are triggered.

  • CANARY - Shifts traffic in two increments.

In the first increment, a small percentage of traffic, for example, 10 percent is shifted to the new version. In the second increment, before a specified time interval in seconds gets over, the remaining traffic is shifted to the new version. The shift to the new version for the remaining traffic takes place only if no CloudWatch alarms are triggered during the specified time interval.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-deploymentpreference

description

An optional description of the state machine alias.

See:

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

name

The name of the state machine alias.

If you don’t provide a name, it uses an automatically generated name based on the logical ID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-name

routing_configuration

The routing configuration of an alias.

Routing configuration splits StartExecution requests between one or two versions of the same state machine.

Use RoutingConfiguration if you want to explicitly set the alias weights . Weight is the percentage of traffic you want to route to a state machine version. .. epigraph:

``RoutingConfiguration`` and ``DeploymentPreference`` are mutually exclusive properties. You must define only one of these properties.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachinealias.html#cfn-stepfunctions-statemachinealias-routingconfiguration