CfnStateMachineAliasPropsMixin

class aws_cdk.mixins_preview.aws_stepfunctions.mixins.CfnStateMachineAliasPropsMixin(props, *, strategy=None)

Bases: Mixin

Represents a state machine alias . An alias routes traffic to one or two versions of the same state machine.

You can create up to 100 aliases for each state machine.

See:

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

CloudformationResource:

AWS::StepFunctions::StateMachineAlias

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.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_stepfunctions import mixins as stepfunctions_mixins

cfn_state_machine_alias_props_mixin = stepfunctions_mixins.CfnStateMachineAliasPropsMixin(stepfunctions_mixins.CfnStateMachineAliasMixinProps(
    deployment_preference=stepfunctions_mixins.CfnStateMachineAliasPropsMixin.DeploymentPreferenceProperty(
        alarms=["alarms"],
        interval=123,
        percentage=123,
        state_machine_version_arn="stateMachineVersionArn",
        type="type"
    ),
    description="description",
    name="name",
    routing_configuration=[stepfunctions_mixins.CfnStateMachineAliasPropsMixin.RoutingConfigurationVersionProperty(
        state_machine_version_arn="stateMachineVersionArn",
        weight=123
    )]
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::StepFunctions::StateMachineAlias.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['deploymentPreference', 'description', 'name', 'routingConfiguration']

Static Methods

classmethod is_mixin(x)

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

Stability:

experimental

DeploymentPreferenceProperty

class CfnStateMachineAliasPropsMixin.DeploymentPreferenceProperty(*, alarms=None, interval=None, percentage=None, state_machine_version_arn=None, type=None)

Bases: object

Enables gradual state machine deployments.

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

Parameters:
  • alarms (Optional[Sequence[str]]) – A list of Amazon CloudWatch alarm names to be monitored during the deployment. The deployment fails and rolls back if any of these alarms go into the ALARM state. .. epigraph:: Amazon CloudWatch considers nonexistent alarms to have an OK state. If you provide an invalid alarm name or provide the ARN of an alarm instead of its name, your deployment may not roll back correctly.

  • interval (Union[int, float, None]) – The time in minutes between each traffic shifting increment.

  • percentage (Union[int, float, None]) – The percentage of traffic to shift to the new version in each increment.

  • state_machine_version_arn (Optional[str]) – The Amazon Resource Name (ARN) of the `AWS::StepFunctions::StateMachineVersion <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html>`_ resource that will be the final version to which the alias points to when the traffic shifting is complete. While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use RoutingConfiguration instead.

  • type (Optional[str]) – The type of deployment you want to perform. You can specify one of the following types:. - 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 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-properties-stepfunctions-statemachinealias-deploymentpreference.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.mixins_preview.aws_stepfunctions import mixins as stepfunctions_mixins

deployment_preference_property = stepfunctions_mixins.CfnStateMachineAliasPropsMixin.DeploymentPreferenceProperty(
    alarms=["alarms"],
    interval=123,
    percentage=123,
    state_machine_version_arn="stateMachineVersionArn",
    type="type"
)

Attributes

alarms

A list of Amazon CloudWatch alarm names to be monitored during the deployment.

The deployment fails and rolls back if any of these alarms go into the ALARM state. .. epigraph:

Amazon CloudWatch considers nonexistent alarms to have an ``OK`` state. If you provide an invalid alarm name or provide the ARN of an alarm instead of its name, your deployment may not roll back correctly.
See:

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

interval

The time in minutes between each traffic shifting increment.

See:

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

percentage

The percentage of traffic to shift to the new version in each increment.

See:

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

state_machine_version_arn

//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachineversion.html>`_ resource that will be the final version to which the alias points to when the traffic shifting is complete.

While performing gradual deployments, you can only provide a single state machine version ARN. To explicitly set version weights in a CloudFormation template, use RoutingConfiguration instead.

See:

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

Type:

The Amazon Resource Name (ARN) of the `AWS::StepFunctions::StateMachineVersion <https

type

.

  • 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 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-properties-stepfunctions-statemachinealias-deploymentpreference.html#cfn-stepfunctions-statemachinealias-deploymentpreference-type

Type:

The type of deployment you want to perform. You can specify one of the following types

RoutingConfigurationVersionProperty

class CfnStateMachineAliasPropsMixin.RoutingConfigurationVersionProperty(*, state_machine_version_arn=None, weight=None)

Bases: object

The state machine version to which you want to route the execution traffic.

Parameters:
  • state_machine_version_arn (Optional[str]) – The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration. If you specify the ARN of a second version, it must belong to the same state machine as the first version.

  • weight (Union[int, float, None]) – The percentage of traffic you want to route to the state machine version. The sum of the weights in the routing configuration must be equal to 100.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.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.mixins_preview.aws_stepfunctions import mixins as stepfunctions_mixins

routing_configuration_version_property = stepfunctions_mixins.CfnStateMachineAliasPropsMixin.RoutingConfigurationVersionProperty(
    state_machine_version_arn="stateMachineVersionArn",
    weight=123
)

Attributes

state_machine_version_arn

The Amazon Resource Name (ARN) that identifies one or two state machine versions defined in the routing configuration.

If you specify the ARN of a second version, it must belong to the same state machine as the first version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.html#cfn-stepfunctions-statemachinealias-routingconfigurationversion-statemachineversionarn

weight

The percentage of traffic you want to route to the state machine version.

The sum of the weights in the routing configuration must be equal to 100.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachinealias-routingconfigurationversion.html#cfn-stepfunctions-statemachinealias-routingconfigurationversion-weight