Class: AWSCDK::Backup::CfnBackupSelection::BackupSelectionResourceTypeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Backup::CfnBackupSelection::BackupSelectionResourceTypeProperty
- Defined in:
- backup/cfn_backup_selection.rb
Overview
Specifies an object containing properties used to assign a set of resources to a backup plan.
Instance Attribute Summary collapse
-
#conditions ⇒ Object?
readonly
A list of conditions that you define to assign resources to your backup plans using tags.
-
#iam_role_arn ⇒ String
readonly
The ARN of the IAM role that AWS Backup uses to authenticate when backing up the target resource;.
-
#list_of_tags ⇒ AWSCDK::IResolvable, ...
readonly
A list of conditions that you define to assign resources to your backup plans using tags.
-
#not_resources ⇒ Array<String>?
readonly
A list of Amazon Resource Names (ARNs) to exclude from a backup plan.
-
#resources ⇒ Array<String>?
readonly
An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.
-
#selection_name ⇒ String
readonly
The display name of a resource selection document.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(iam_role_arn:, selection_name:, conditions: nil, list_of_tags: nil, not_resources: nil, resources: nil) ⇒ BackupSelectionResourceTypeProperty
constructor
A new instance of BackupSelectionResourceTypeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(iam_role_arn:, selection_name:, conditions: nil, list_of_tags: nil, not_resources: nil, resources: nil) ⇒ BackupSelectionResourceTypeProperty
Returns a new instance of BackupSelectionResourceTypeProperty.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'backup/cfn_backup_selection.rb', line 537 def initialize(iam_role_arn:, selection_name:, conditions: nil, list_of_tags: nil, not_resources: nil, resources: nil) @iam_role_arn = iam_role_arn Jsii::Type.check_type(@iam_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "iamRoleArn") @selection_name = selection_name Jsii::Type.check_type(@selection_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "selectionName") @conditions = conditions Jsii::Type.check_type(@conditions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "conditions") unless @conditions.nil? @list_of_tags = Jsii::Type.check_type(@list_of_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmFja3VwLkNmbkJhY2t1cFNlbGVjdGlvbi5Db25kaXRpb25SZXNvdXJjZVR5cGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "listOfTags") unless @list_of_tags.nil? @not_resources = not_resources Jsii::Type.check_type(@not_resources, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "notResources") unless @not_resources.nil? @resources = resources Jsii::Type.check_type(@resources, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resources") unless @resources.nil? end |
Instance Attribute Details
#conditions ⇒ Object? (readonly)
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).
ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.ListOfTagsonly supportsStringEquals.
575 576 577 |
# File 'backup/cfn_backup_selection.rb', line 575 def conditions @conditions end |
#iam_role_arn ⇒ String (readonly)
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 .
558 559 560 |
# File 'backup/cfn_backup_selection.rb', line 558 def iam_role_arn @iam_role_arn end |
#list_of_tags ⇒ AWSCDK::IResolvable, ... (readonly)
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).
ListOfTagsonly supportsStringEquals.ConditionssupportsStringEquals,StringLike,StringNotEquals, andStringNotLike.
587 588 589 |
# File 'backup/cfn_backup_selection.rb', line 587 def @list_of_tags end |
#not_resources ⇒ Array<String>? (readonly)
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.
596 597 598 |
# File 'backup/cfn_backup_selection.rb', line 596 def not_resources @not_resources end |
#resources ⇒ Array<String>? (readonly)
An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.
601 602 603 |
# File 'backup/cfn_backup_selection.rb', line 601 def resources @resources end |
#selection_name ⇒ String (readonly)
The display name of a resource selection document.
563 564 565 |
# File 'backup/cfn_backup_selection.rb', line 563 def selection_name @selection_name end |
Class Method Details
.jsii_properties ⇒ Object
603 604 605 606 607 608 609 610 611 612 |
# File 'backup/cfn_backup_selection.rb', line 603 def self.jsii_properties { :iam_role_arn => "iamRoleArn", :selection_name => "selectionName", :conditions => "conditions", :list_of_tags => "listOfTags", :not_resources => "notResources", :resources => "resources", } end |
Instance Method Details
#to_jsii ⇒ Object
614 615 616 617 618 619 620 621 622 623 624 625 |
# File 'backup/cfn_backup_selection.rb', line 614 def to_jsii result = {} result.merge!({ "iamRoleArn" => @iam_role_arn, "selectionName" => @selection_name, "conditions" => @conditions, "listOfTags" => @list_of_tags, "notResources" => @not_resources, "resources" => @resources, }) result.compact end |