CfnZonalAutoshiftConfigurationPropsMixin

class aws_cdk.mixins_preview.aws_arczonalshift.mixins.CfnZonalAutoshiftConfigurationPropsMixin(props, *, strategy=None)

Bases: Mixin

The zonal autoshift configuration for a resource includes the practice run configuration and the status for running autoshifts, zonal autoshift status.

When a resource has a practice run configuation, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.

You can update the zonal autoshift autoshift status to enable or disable zonal autoshift. When zonal autoshift is ENABLED , you authorize AWS to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-arczonalshift-zonalautoshiftconfiguration.html

CloudformationResource:

AWS::ARCZonalShift::ZonalAutoshiftConfiguration

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_arczonalshift import mixins as arczonalshift_mixins

cfn_zonal_autoshift_configuration_props_mixin = arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin(arczonalshift_mixins.CfnZonalAutoshiftConfigurationMixinProps(
    practice_run_configuration=arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.PracticeRunConfigurationProperty(
        blocked_dates=["blockedDates"],
        blocked_windows=["blockedWindows"],
        blocking_alarms=[arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(
            alarm_identifier="alarmIdentifier",
            type="type"
        )],
        outcome_alarms=[arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(
            alarm_identifier="alarmIdentifier",
            type="type"
        )]
    ),
    resource_identifier="resourceIdentifier",
    zonal_autoshift_status="zonalAutoshiftStatus"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::ARCZonalShift::ZonalAutoshiftConfiguration.

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 = ['practiceRunConfiguration', 'resourceIdentifier', 'zonalAutoshiftStatus']

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

ControlConditionProperty

class CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(*, alarm_identifier=None, type=None)

Bases: object

A control condition is an alarm that you specify for a practice run.

When you configure practice runs with zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the practice run. The alarms that you specify are an outcome alarm , to monitor application health during practice runs and, optionally, a blocking alarm , to block practice runs from starting or to interrupt a practice run in progress.

Control condition alarms do not apply for autoshifts.

For more information, see Considerations when you configure zonal autoshift in the ARC Developer Guide.

Parameters:
  • alarm_identifier (Optional[str]) – The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

  • type (Optional[str]) – The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-controlcondition.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_arczonalshift import mixins as arczonalshift_mixins

control_condition_property = arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(
    alarm_identifier="alarmIdentifier",
    type="type"
)

Attributes

alarm_identifier

The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-controlcondition.html#cfn-arczonalshift-zonalautoshiftconfiguration-controlcondition-alarmidentifier

type

The type of alarm specified for a practice run.

You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is CLOUDWATCH .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-controlcondition.html#cfn-arczonalshift-zonalautoshiftconfiguration-controlcondition-type

PracticeRunConfigurationProperty

class CfnZonalAutoshiftConfigurationPropsMixin.PracticeRunConfigurationProperty(*, blocked_dates=None, blocked_windows=None, blocking_alarms=None, outcome_alarms=None)

Bases: object

A practice run configuration for a resource includes the Amazon CloudWatch alarms that you’ve specified for a practice run, as well as any blocked dates or blocked windows for the practice run.

When a resource has a practice run configuation, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.

You can update or delete a practice run configuration. When you delete a practice run configuration, zonal autoshift is disabled for the resource. A practice run configuration is required when zonal autoshift is enabled.

Parameters:
  • blocked_dates (Optional[Sequence[str]]) – An array of one or more dates that you can specify when AWS does not start practice runs for a resource. Dates are in UTC. Specify blocked dates in the format YYYY-MM-DD , separated by spaces.

  • blocked_windows (Optional[Sequence[str]]) – An array of one or more days and times that you can specify when ARC does not start practice runs for a resource. Days and times are in UTC. Specify blocked windows in the format DAY:HH:MM-DAY:HH:MM , separated by spaces. For example, MON:18:30-MON:19:30 TUE:18:30-TUE:19:30 . .. epigraph:: Blocked windows have to start and end on the same day. Windows that span multiple days aren’t supported.

  • blocking_alarms (Union[IResolvable, Sequence[Union[IResolvable, ControlConditionProperty, Dict[str, Any]]], None]) – An optional alarm that you can specify that blocks practice runs when the alarm is in an ALARM state. When a blocking alarm goes into an ALARM state, it prevents practice runs from being started, and ends practice runs that are in progress.

  • outcome_alarms (Union[IResolvable, Sequence[Union[IResolvable, ControlConditionProperty, Dict[str, Any]]], None]) – The alarm that you specify to monitor the health of your application during practice runs. When the outcome alarm goes into an ALARM state, the practice run is ended and the outcome is set to FAILED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration.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_arczonalshift import mixins as arczonalshift_mixins

practice_run_configuration_property = arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.PracticeRunConfigurationProperty(
    blocked_dates=["blockedDates"],
    blocked_windows=["blockedWindows"],
    blocking_alarms=[arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(
        alarm_identifier="alarmIdentifier",
        type="type"
    )],
    outcome_alarms=[arczonalshift_mixins.CfnZonalAutoshiftConfigurationPropsMixin.ControlConditionProperty(
        alarm_identifier="alarmIdentifier",
        type="type"
    )]
)

Attributes

blocked_dates

An array of one or more dates that you can specify when AWS does not start practice runs for a resource.

Dates are in UTC.

Specify blocked dates in the format YYYY-MM-DD , separated by spaces.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration-blockeddates

blocked_windows

An array of one or more days and times that you can specify when ARC does not start practice runs for a resource.

Days and times are in UTC.

Specify blocked windows in the format DAY:HH:MM-DAY:HH:MM , separated by spaces. For example, MON:18:30-MON:19:30 TUE:18:30-TUE:19:30 . .. epigraph:

Blocked windows have to start and end on the same day. Windows that span multiple days aren't supported.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration-blockedwindows

blocking_alarms

An optional alarm that you can specify that blocks practice runs when the alarm is in an ALARM state.

When a blocking alarm goes into an ALARM state, it prevents practice runs from being started, and ends practice runs that are in progress.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration-blockingalarms

outcome_alarms

The alarm that you specify to monitor the health of your application during practice runs.

When the outcome alarm goes into an ALARM state, the practice run is ended and the outcome is set to FAILED .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-practicerunconfiguration-outcomealarms