/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.backup.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* 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.
*
* The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. *
*/ private String selectionName; /** *
* 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
.
*
* 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. *
*/ private java.util.List
* 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
.
*
* 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. *
*/ private java.util.List
* 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
.
*
* The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @param selectionName * The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. */ public void setSelectionName(String selectionName) { this.selectionName = selectionName; } /** ** The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @return The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. */ public String getSelectionName() { return this.selectionName; } /** ** The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @param selectionName * The display name of a resource selection document. Must contain 1 to 50 alphanumeric or '-_.' characters. * @return Returns a reference to this object so that method calls can be chained together. */ public BackupSelection withSelectionName(String selectionName) { setSelectionName(selectionName); return this; } /** *
* 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
.
*
arn:aws:iam::123456789012:role/S3Access
.
*/
public void setIamRoleArn(String iamRoleArn) {
this.iamRoleArn = iamRoleArn;
}
/**
*
* 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
.
*
arn:aws:iam::123456789012:role/S3Access
.
*/
public String getIamRoleArn() {
return this.iamRoleArn;
}
/**
*
* 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
.
*
arn:aws:iam::123456789012:role/S3Access
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BackupSelection withIamRoleArn(String iamRoleArn) {
setIamRoleArn(iamRoleArn);
return this;
}
/**
* * 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. *
* * @return 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.
*/
public java.util.List
* 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 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.
*/
public void setResources(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setResources(java.util.Collection)} or {@link #withResources(java.util.Collection)} if you want to
* override the existing values.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BackupSelection withResources(String... resources) {
if (this.resources == null) {
setResources(new java.util.ArrayList
* 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 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BackupSelection withResources(java.util.Collection
* A list of conditions that you define to assign resources to your backup plans using tags. For example,
*
*
* When you specify more than one condition, you assign all resources that match AT LEAST ONE condition (using OR
* logic).
*
* "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },
.
* Condition operators are case sensitive.
* ListOfTags
differs from Conditions
as follows:
*
*
*
* @return A list of conditions that you define to assign resources to your backup plans using tags. For example,
* ListOfTags
only supports StringEquals
. Conditions
supports
* StringEquals
, StringLike
, StringNotEquals
, and StringNotLike
.
* "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
.
*
* 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
.
*
"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
.
*
* 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
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setListOfTags(java.util.Collection)} or {@link #withListOfTags(java.util.Collection)} if you want to * override the existing values. *
* * @param listOfTags * 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
.
*
* 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
.
*
"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
.
*
* 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. *
* * @return 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.
*/
public java.util.List
* 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 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.
*/
public void setNotResources(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNotResources(java.util.Collection)} or {@link #withNotResources(java.util.Collection)} if you want to
* override the existing values.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BackupSelection withNotResources(String... notResources) {
if (this.notResources == null) {
setNotResources(new java.util.ArrayList
* 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 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BackupSelection withNotResources(java.util.Collection
* A list of conditions that you define to assign resources to your backup plans using tags. For example,
*
*
* When you specify more than one condition, you only assign the resources that match ALL conditions (using AND
* logic).
*
* "StringEquals": { "ConditionKey": "aws:ResourceTag/CreatedByCryo", "ConditionValue": "true" },
.
* Condition operators are case sensitive.
* Conditions
differs from ListOfTags
as follows:
*
*
*
* @param conditions
* A list of conditions that you define to assign resources to your backup plans using tags. For example,
* Conditions
supports StringEquals
, StringLike
, StringNotEquals
* , and StringNotLike
. ListOfTags
only supports StringEquals
.
* "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
.
*
* 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
.
*
"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
.
*
* 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
.
*
"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
.
*