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": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "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": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "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": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "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": { "Key": "aws:ResourceTag/CreatedByCryo", "Value": "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
impl StructuralPartialEq for BackupSelection
Auto Trait Implementations§
impl Freeze for BackupSelection
impl RefUnwindSafe for BackupSelection
impl Send for BackupSelection
impl Sync for BackupSelection
impl Unpin for BackupSelection
impl UnwindSafe for BackupSelection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more