CfnBackupSelectionPropsMixin

class aws_cdk.mixins_preview.aws_backup.mixins.CfnBackupSelectionPropsMixin(props, *, strategy=None)

Bases: Mixin

Specifies a set of resources to assign to a backup plan.

For a sample CloudFormation template, see the AWS Backup Developer Guide .

See:

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

CloudformationResource:

AWS::Backup::BackupSelection

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_backup import mixins as backup_mixins

# conditions: Any

cfn_backup_selection_props_mixin = backup_mixins.CfnBackupSelectionPropsMixin(backup_mixins.CfnBackupSelectionMixinProps(
    backup_plan_id="backupPlanId",
    backup_selection=backup_mixins.CfnBackupSelectionPropsMixin.BackupSelectionResourceTypeProperty(
        conditions=conditions,
        iam_role_arn="iamRoleArn",
        list_of_tags=[backup_mixins.CfnBackupSelectionPropsMixin.ConditionResourceTypeProperty(
            condition_key="conditionKey",
            condition_type="conditionType",
            condition_value="conditionValue"
        )],
        not_resources=["notResources"],
        resources=["resources"],
        selection_name="selectionName"
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

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

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 = ['backupPlanId', 'backupSelection']

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

BackupSelectionResourceTypeProperty

class CfnBackupSelectionPropsMixin.BackupSelectionResourceTypeProperty(*, conditions=None, iam_role_arn=None, list_of_tags=None, not_resources=None, resources=None, selection_name=None)

Bases: object

Specifies an object containing properties used to assign a set of resources to a backup plan.

Parameters:
  • conditions (Any) – A list of conditions that you define to assign resources to your backup plans using tags. For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive. Conditions differs from ListOfTags as follows: - When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic). - Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike . ListOfTags only supports StringEquals .

  • iam_role_arn (Optional[str]) – The ARN of the IAM role that AWS Backup uses to authenticate when backing up the target resource; for example, arn:aws:iam::123456789012:role/S3Access .

  • list_of_tags (Union[IResolvable, Sequence[Union[IResolvable, ConditionResourceTypeProperty, Dict[str, Any]]], None]) – A list of conditions that you define to assign resources to your backup plans using tags. For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive. ListOfTags differs from Conditions as follows: - When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR logic). - ListOfTags only supports StringEquals . Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike .

  • not_resources (Optional[Sequence[str]]) – A list of Amazon Resource Names (ARNs) to exclude from a backup plan. The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards. If you need to exclude many resources from a backup plan, consider a different resource selection strategy, such as assigning only one or a few resource types or refining your resource selection using tags.

  • resources (Optional[Sequence[str]]) – An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.

  • selection_name (Optional[str]) – The display name of a resource selection document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.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_backup import mixins as backup_mixins

# conditions: Any

backup_selection_resource_type_property = backup_mixins.CfnBackupSelectionPropsMixin.BackupSelectionResourceTypeProperty(
    conditions=conditions,
    iam_role_arn="iamRoleArn",
    list_of_tags=[backup_mixins.CfnBackupSelectionPropsMixin.ConditionResourceTypeProperty(
        condition_key="conditionKey",
        condition_type="conditionType",
        condition_value="conditionValue"
    )],
    not_resources=["notResources"],
    resources=["resources"],
    selection_name="selectionName"
)

Attributes

conditions

A list of conditions that you define to assign resources to your backup plans using tags.

For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive.

Conditions differs from ListOfTags as follows:

  • When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic).

  • Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike . ListOfTags only supports StringEquals .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-conditions

iam_role_arn

The ARN of the IAM role that AWS Backup uses to authenticate when backing up the target resource;

for example, arn:aws:iam::123456789012:role/S3Access .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-iamrolearn

list_of_tags

A list of conditions that you define to assign resources to your backup plans using tags.

For example, "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" }, . Condition operators are case sensitive.

ListOfTags differs from Conditions as follows:

  • When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR logic).

  • ListOfTags only supports StringEquals . Conditions supports StringEquals , StringLike , StringNotEquals , and StringNotLike .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-listoftags

not_resources

A list of Amazon Resource Names (ARNs) to exclude from a backup plan.

The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.

If you need to exclude many resources from a backup plan, consider a different resource selection strategy, such as assigning only one or a few resource types or refining your resource selection using tags.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-notresources

resources

An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-resources

selection_name

The display name of a resource selection document.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-selectionname

ConditionResourceTypeProperty

class CfnBackupSelectionPropsMixin.ConditionResourceTypeProperty(*, condition_key=None, condition_type=None, condition_value=None)

Bases: object

Specifies an object that contains an array of triplets made up of a condition type (such as STRINGEQUALS ), a key, and a value.

Conditions are used to filter resources in a selection that is assigned to a backup plan.

Parameters:
  • condition_key (Optional[str]) – The key in a key-value pair. For example, in "Department": "accounting" , "Department" is the key.

  • condition_type (Optional[str]) – An operation, such as STRINGEQUALS , that is applied to a key-value pair used to filter resources in a selection.

  • condition_value (Optional[str]) – The value in a key-value pair. For example, in "Department": "accounting" , "accounting" is the value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.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_backup import mixins as backup_mixins

condition_resource_type_property = backup_mixins.CfnBackupSelectionPropsMixin.ConditionResourceTypeProperty(
    condition_key="conditionKey",
    condition_type="conditionType",
    condition_value="conditionValue"
)

Attributes

condition_key

The key in a key-value pair.

For example, in "Department": "accounting" , "Department" is the key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditionkey

condition_type

An operation, such as STRINGEQUALS , that is applied to a key-value pair used to filter resources in a selection.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditiontype

condition_value

The value in a key-value pair.

For example, in "Department": "accounting" , "accounting" is the value.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditionvalue