Struct aws_sdk_backup::types::BackupSelection
source · #[non_exhaustive]pub struct BackupSelection {
pub selection_name: String,
pub iam_role_arn: String,
pub resources: Option<Vec<String>>,
pub list_of_tags: Option<Vec<Condition>>,
pub not_resources: Option<Vec<String>>,
pub conditions: Option<Conditions>,
}
Expand description
Used to specify a set of resources to a backup plan.
Specifying your desired Conditions
, ListOfTags
, NotResources
, and/or Resources
is recommended. If none of these are specified, Backup will attempt to select all supported and opted-in storage resources, which could have unintended cost implications.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.selection_name: String
The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters.
iam_role_arn: String
The ARN of the IAM role that Backup uses to authenticate when backing up the target resource; for example, arn:aws:iam::123456789012:role/S3Access
.
resources: Option<Vec<String>>
A list of Amazon Resource Names (ARNs) to assign to a backup plan. The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.
If you need to assign many resources to a backup plan, consider a different resource selection strategy, such as assigning all resources of a resource type or refining your resource selection using 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 supportsStringEquals
.Conditions
supportsStringEquals
,StringLike
,StringNotEquals
, andStringNotLike
.
not_resources: Option<Vec<String>>
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.
conditions: Option<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
supportsStringEquals
,StringLike
,StringNotEquals
, andStringNotLike
.ListOfTags
only supportsStringEquals
.
Implementations§
source§impl BackupSelection
impl BackupSelection
sourcepub fn selection_name(&self) -> &str
pub fn selection_name(&self) -> &str
The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters.
sourcepub fn iam_role_arn(&self) -> &str
pub fn iam_role_arn(&self) -> &str
The ARN of the IAM role that Backup uses to authenticate when backing up the target resource; for example, arn:aws:iam::123456789012:role/S3Access
.
sourcepub fn resources(&self) -> &[String]
pub fn resources(&self) -> &[String]
A list of Amazon Resource Names (ARNs) to assign to a backup plan. The maximum number of ARNs is 500 without wildcards, or 30 ARNs with wildcards.
If you need to assign many resources to a backup plan, consider a different resource selection strategy, such as assigning all resources of a resource type or refining your resource selection using tags.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .resources.is_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 supportsStringEquals
.Conditions
supportsStringEquals
,StringLike
,StringNotEquals
, andStringNotLike
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .list_of_tags.is_none()
.
sourcepub fn not_resources(&self) -> &[String]
pub fn not_resources(&self) -> &[String]
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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .not_resources.is_none()
.
sourcepub fn conditions(&self) -> Option<&Conditions>
pub fn conditions(&self) -> Option<&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
supportsStringEquals
,StringLike
,StringNotEquals
, andStringNotLike
.ListOfTags
only supportsStringEquals
.
source§impl BackupSelection
impl BackupSelection
sourcepub fn builder() -> BackupSelectionBuilder
pub fn builder() -> BackupSelectionBuilder
Creates a new builder-style object to manufacture BackupSelection
.
Trait Implementations§
source§impl Clone for BackupSelection
impl Clone for BackupSelection
source§fn clone(&self) -> BackupSelection
fn clone(&self) -> BackupSelection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BackupSelection
impl Debug for BackupSelection
source§impl PartialEq for BackupSelection
impl PartialEq for BackupSelection
source§fn eq(&self, other: &BackupSelection) -> bool
fn eq(&self, other: &BackupSelection) -> bool
self
and other
values to be equal, and is used
by ==
.