@Generated(value="software.amazon.awssdk:codegen") public final class CreateRuleRequest extends RbinRequest implements ToCopyableBuilder<CreateRuleRequest.Builder,CreateRuleRequest>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CreateRuleRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CreateRuleRequest.Builder |
builder() |
String |
description()
The retention rule description.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasResourceTags()
For responses, this returns true if the service returned a value for the ResourceTags property.
|
boolean |
hasTags()
For responses, this returns true if the service returned a value for the Tags property.
|
LockConfiguration |
lockConfiguration()
Information about the retention rule lock configuration.
|
List<ResourceTag> |
resourceTags()
Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule.
|
ResourceType |
resourceType()
The resource type to be retained by the retention rule.
|
String |
resourceTypeAsString()
The resource type to be retained by the retention rule.
|
RetentionPeriod |
retentionPeriod()
Information about the retention period for which the retention rule is to retain resources.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CreateRuleRequest.Builder> |
serializableBuilderClass() |
List<Tag> |
tags()
Information about the tags to assign to the retention rule.
|
CreateRuleRequest.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
overrideConfigurationclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final RetentionPeriod retentionPeriod()
Information about the retention period for which the retention rule is to retain resources.
public final String description()
The retention rule description.
public final boolean hasTags()
isEmpty() method on the property). This is useful
because the SDK will never return a null collection or map, but you may need to differentiate between the service
returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
if a value for the property was specified in the request builder, and false if a value was not specified.public final List<Tag> tags()
Information about the tags to assign to the retention rule.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasTags() method.
public final 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.
If the service returns an enum value that is not available in the current SDK version, resourceType will
return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
resourceTypeAsString().
EBS_SNAPSHOT. To retain
EBS-backed AMIs, specify EC2_IMAGE.ResourceTypepublic final String resourceTypeAsString()
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.
If the service returns an enum value that is not available in the current SDK version, resourceType will
return ResourceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
resourceTypeAsString().
EBS_SNAPSHOT. To retain
EBS-backed AMIs, specify EC2_IMAGE.ResourceTypepublic final boolean hasResourceTags()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasResourceTags() method.
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 final LockConfiguration lockConfiguration()
Information about the retention rule lock configuration.
public CreateRuleRequest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CreateRuleRequest.Builder,CreateRuleRequest>toBuilder in class RbinRequestpublic static CreateRuleRequest.Builder builder()
public static Class<? extends CreateRuleRequest.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsRequestpublic final boolean equals(Object obj)
equals in class AwsRequestpublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkRequestCopyright © 2023. All rights reserved.