CfnLegalHoldPropsMixin

class aws_cdk.cfn_property_mixins.aws_backup.CfnLegalHoldPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a legal hold on recovery points (backups).

A legal hold prevents backups from being deleted while under hold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-legalhold.html

CloudformationResource:

AWS::Backup::LegalHold

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_backup as backup
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_legal_hold_props_mixin = backup.CfnLegalHoldPropsMixin(backup.CfnLegalHoldMixinProps(
    description="description",
    recovery_point_selection=backup.CfnLegalHoldPropsMixin.RecoveryPointSelectionProperty(
        date_range=backup.CfnLegalHoldPropsMixin.DateRangeProperty(
            from_date="fromDate",
            to_date="toDate"
        ),
        resource_identifiers=["resourceIdentifiers"],
        vault_names=["vaultNames"]
    ),
    tags=[backup.CfnLegalHoldPropsMixin.TagsItemsProperty(
        key="key",
        value="value"
    )],
    title="title"
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::Backup::LegalHold.

Parameters:
  • props (Union[CfnLegalHoldMixinProps, 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 = ['description', 'recoveryPointSelection', 'tags', 'title']

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.

DateRangeProperty

class CfnLegalHoldPropsMixin.DateRangeProperty(*, from_date=None, to_date=None)

Bases: object

A date range for filtering recovery points.

Parameters:
  • from_date (Optional[str]) – The beginning date, inclusive. ISO 8601 date-time.

  • to_date (Optional[str]) – The end date, inclusive. ISO 8601 date-time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-daterange.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_backup as backup

date_range_property = backup.CfnLegalHoldPropsMixin.DateRangeProperty(
    from_date="fromDate",
    to_date="toDate"
)

Attributes

from_date

The beginning date, inclusive.

ISO 8601 date-time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-daterange.html#cfn-backup-legalhold-daterange-fromdate

to_date

The end date, inclusive.

ISO 8601 date-time.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-daterange.html#cfn-backup-legalhold-daterange-todate

RecoveryPointSelectionProperty

class CfnLegalHoldPropsMixin.RecoveryPointSelectionProperty(*, date_range=None, resource_identifiers=None, vault_names=None)

Bases: object

The criteria to assign a set of resources, such as resource types or backup vaults.

Parameters:
  • date_range (Union[IResolvable, DateRangeProperty, Dict[str, Any], None]) – A date range for filtering recovery points.

  • resource_identifiers (Optional[Sequence[str]]) – The resources included in the resource selection.

  • vault_names (Optional[Sequence[str]]) – The names of the vaults in which the selected recovery points are contained.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-recoverypointselection.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_backup as backup

recovery_point_selection_property = backup.CfnLegalHoldPropsMixin.RecoveryPointSelectionProperty(
    date_range=backup.CfnLegalHoldPropsMixin.DateRangeProperty(
        from_date="fromDate",
        to_date="toDate"
    ),
    resource_identifiers=["resourceIdentifiers"],
    vault_names=["vaultNames"]
)

Attributes

date_range

A date range for filtering recovery points.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-recoverypointselection.html#cfn-backup-legalhold-recoverypointselection-daterange

resource_identifiers

The resources included in the resource selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-recoverypointselection.html#cfn-backup-legalhold-recoverypointselection-resourceidentifiers

vault_names

The names of the vaults in which the selected recovery points are contained.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-recoverypointselection.html#cfn-backup-legalhold-recoverypointselection-vaultnames

TagsItemsProperty

class CfnLegalHoldPropsMixin.TagsItemsProperty(*, key=None, value=None)

Bases: object

Parameters:
  • key (Optional[str]) – The key name of the tag.

  • value (Optional[str]) – The value for the tag.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-tagsitems.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_backup as backup

tags_items_property = backup.CfnLegalHoldPropsMixin.TagsItemsProperty(
    key="key",
    value="value"
)

Attributes

key

The key name of the tag.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-tagsitems.html#cfn-backup-legalhold-tagsitems-key

value

The value for the tag.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-legalhold-tagsitems.html#cfn-backup-legalhold-tagsitems-value