@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CreateRuleRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
CreateRuleRequest() |
Modifier and Type | Method and Description |
---|---|
CreateRuleRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getDescription()
The retention rule description.
|
LockConfiguration |
getLockConfiguration()
Information about the retention rule lock configuration.
|
List<ResourceTag> |
getResourceTags()
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule.
|
String |
getResourceType()
The resource type to be retained by the retention rule.
|
RetentionPeriod |
getRetentionPeriod()
Information about the retention period for which the retention rule is to retain resources.
|
List<Tag> |
getTags()
Information about the tags to assign to the retention rule.
|
int |
hashCode() |
void |
setDescription(String description)
The retention rule description.
|
void |
setLockConfiguration(LockConfiguration lockConfiguration)
Information about the retention rule lock configuration.
|
void |
setResourceTags(Collection<ResourceTag> resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule.
|
void |
setResourceType(String resourceType)
The resource type to be retained by the retention rule.
|
void |
setRetentionPeriod(RetentionPeriod retentionPeriod)
Information about the retention period for which the retention rule is to retain resources.
|
void |
setTags(Collection<Tag> tags)
Information about the tags to assign to the retention rule.
|
String |
toString()
Returns a string representation of this object.
|
CreateRuleRequest |
withDescription(String description)
The retention rule description.
|
CreateRuleRequest |
withLockConfiguration(LockConfiguration lockConfiguration)
Information about the retention rule lock configuration.
|
CreateRuleRequest |
withResourceTags(Collection<ResourceTag> resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule.
|
CreateRuleRequest |
withResourceTags(ResourceTag... resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule.
|
CreateRuleRequest |
withResourceType(ResourceType resourceType)
The resource type to be retained by the retention rule.
|
CreateRuleRequest |
withResourceType(String resourceType)
The resource type to be retained by the retention rule.
|
CreateRuleRequest |
withRetentionPeriod(RetentionPeriod retentionPeriod)
Information about the retention period for which the retention rule is to retain resources.
|
CreateRuleRequest |
withTags(Collection<Tag> tags)
Information about the tags to assign to the retention rule.
|
CreateRuleRequest |
withTags(Tag... tags)
Information about the tags to assign to the retention rule.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setRetentionPeriod(RetentionPeriod retentionPeriod)
Information about the retention period for which the retention rule is to retain resources.
retentionPeriod
- Information about the retention period for which the retention rule is to retain resources.public RetentionPeriod getRetentionPeriod()
Information about the retention period for which the retention rule is to retain resources.
public CreateRuleRequest withRetentionPeriod(RetentionPeriod retentionPeriod)
Information about the retention period for which the retention rule is to retain resources.
retentionPeriod
- Information about the retention period for which the retention rule is to retain resources.public void setDescription(String description)
The retention rule description.
description
- The retention rule description.public String getDescription()
The retention rule description.
public CreateRuleRequest withDescription(String description)
The retention rule description.
description
- The retention rule description.public List<Tag> getTags()
Information about the tags to assign to the retention rule.
public void setTags(Collection<Tag> tags)
Information about the tags to assign to the retention rule.
tags
- Information about the tags to assign to the retention rule.public CreateRuleRequest withTags(Tag... tags)
Information about the tags to assign to the retention rule.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Information about the tags to assign to the retention rule.public CreateRuleRequest withTags(Collection<Tag> tags)
Information about the tags to assign to the retention rule.
tags
- Information about the tags to assign to the retention rule.public void setResourceType(String resourceType)
The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs
are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
resourceType
- The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and
EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain
EBS-backed AMIs, specify EC2_IMAGE
.ResourceType
public String getResourceType()
The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs
are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
EBS_SNAPSHOT
. To retain
EBS-backed AMIs, specify EC2_IMAGE
.ResourceType
public CreateRuleRequest withResourceType(String resourceType)
The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs
are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
resourceType
- The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and
EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain
EBS-backed AMIs, specify EC2_IMAGE
.ResourceType
public CreateRuleRequest withResourceType(ResourceType resourceType)
The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and EBS-backed AMIs
are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
resourceType
- The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots and
EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT
. To retain
EBS-backed AMIs, specify EC2_IMAGE
.ResourceType
public List<ResourceTag> getResourceTags()
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
public void setResourceTags(Collection<ResourceTag> resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
resourceTags
- Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention
rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one
or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not
have any of the specified tag key and value pairs, it is immediately deleted without being retained by the
retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
public CreateRuleRequest withResourceTags(ResourceTag... resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
NOTE: This method appends the values to the existing list (if any). Use
setResourceTags(java.util.Collection)
or withResourceTags(java.util.Collection)
if you want to
override the existing values.
resourceTags
- Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention
rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one
or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not
have any of the specified tag key and value pairs, it is immediately deleted without being retained by the
retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
public CreateRuleRequest withResourceTags(Collection<ResourceTag> resourceTags)
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
resourceTags
- Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention
rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one
or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not
have any of the specified tag key and value pairs, it is immediately deleted without being retained by the
retention rule.
You can add the same tag key and value pair to a maximum or five retention rules.
To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.
public void setLockConfiguration(LockConfiguration lockConfiguration)
Information about the retention rule lock configuration.
lockConfiguration
- Information about the retention rule lock configuration.public LockConfiguration getLockConfiguration()
Information about the retention rule lock configuration.
public CreateRuleRequest withLockConfiguration(LockConfiguration lockConfiguration)
Information about the retention rule lock configuration.
lockConfiguration
- Information about the retention rule lock configuration.public String toString()
toString
in class Object
Object.toString()
public CreateRuleRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()