CfnBackupSelectionPropsMixin
- class aws_cdk.mixins_preview.aws_backup.mixins.CfnBackupSelectionPropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies a set of resources to assign to a backup plan.
For a sample CloudFormation template, see the AWS Backup Developer Guide .
- See:
- 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:
props (
Union[CfnBackupSelectionMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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:
objectSpecifies 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.Conditionsdiffers fromListOfTagsas follows: - When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic). -ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.ListOfTagsonly supportsStringEquals.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.ListOfTagsdiffers fromConditionsas follows: - When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR logic). -ListOfTagsonly supportsStringEquals.ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.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:
- 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.Conditionsdiffers fromListOfTagsas follows:When you specify more than one condition, you only assign the resources that match ALL conditions (using AND logic).
ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.ListOfTagsonly supportsStringEquals.
- 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.
- 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.ListOfTagsdiffers fromConditionsas follows:When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR logic).
ListOfTagsonly supportsStringEquals.ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.
- 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.
- resources
An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.
- selection_name
The display name of a resource selection document.
ConditionResourceTypeProperty
- class CfnBackupSelectionPropsMixin.ConditionResourceTypeProperty(*, condition_key=None, condition_type=None, condition_value=None)
Bases:
objectSpecifies 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 asSTRINGEQUALS, 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:
- 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.
- condition_type
An operation, such as
STRINGEQUALS, that is applied to a key-value pair used to filter resources in a selection.
- condition_value
The value in a key-value pair.
For example, in
"Department": "accounting","accounting"is the value.