@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PolicyDetails extends Object implements Serializable, Cloneable, StructuredPojo
Specifies the configuration of a lifecycle policy.
Constructor and Description |
---|
PolicyDetails() |
Modifier and Type | Method and Description |
---|---|
PolicyDetails |
clone() |
boolean |
equals(Object obj) |
List<Action> |
getActions()
The actions to be performed when the event-based policy is triggered.
|
EventSource |
getEventSource()
The event that triggers the event-based policy.
|
Parameters |
getParameters()
A set of optional parameters for snapshot and AMI lifecycle policies.
|
String |
getPolicyType()
The valid target resource types and actions a policy can manage.
|
List<String> |
getResourceLocations()
The location of the resources to backup.
|
List<String> |
getResourceTypes()
The target resource type for snapshot and AMI lifecycle policies.
|
List<Schedule> |
getSchedules()
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
|
List<Tag> |
getTargetTags()
The single tag that identifies targeted resources for this policy.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setActions(Collection<Action> actions)
The actions to be performed when the event-based policy is triggered.
|
void |
setEventSource(EventSource eventSource)
The event that triggers the event-based policy.
|
void |
setParameters(Parameters parameters)
A set of optional parameters for snapshot and AMI lifecycle policies.
|
void |
setPolicyType(String policyType)
The valid target resource types and actions a policy can manage.
|
void |
setResourceLocations(Collection<String> resourceLocations)
The location of the resources to backup.
|
void |
setResourceTypes(Collection<String> resourceTypes)
The target resource type for snapshot and AMI lifecycle policies.
|
void |
setSchedules(Collection<Schedule> schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
|
void |
setTargetTags(Collection<Tag> targetTags)
The single tag that identifies targeted resources for this policy.
|
String |
toString()
Returns a string representation of this object.
|
PolicyDetails |
withActions(Action... actions)
The actions to be performed when the event-based policy is triggered.
|
PolicyDetails |
withActions(Collection<Action> actions)
The actions to be performed when the event-based policy is triggered.
|
PolicyDetails |
withEventSource(EventSource eventSource)
The event that triggers the event-based policy.
|
PolicyDetails |
withParameters(Parameters parameters)
A set of optional parameters for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withPolicyType(PolicyTypeValues policyType)
The valid target resource types and actions a policy can manage.
|
PolicyDetails |
withPolicyType(String policyType)
The valid target resource types and actions a policy can manage.
|
PolicyDetails |
withResourceLocations(Collection<String> resourceLocations)
The location of the resources to backup.
|
PolicyDetails |
withResourceLocations(ResourceLocationValues... resourceLocations)
The location of the resources to backup.
|
PolicyDetails |
withResourceLocations(String... resourceLocations)
The location of the resources to backup.
|
PolicyDetails |
withResourceTypes(Collection<String> resourceTypes)
The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withResourceTypes(ResourceTypeValues... resourceTypes)
The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withResourceTypes(String... resourceTypes)
The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withSchedules(Collection<Schedule> schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withSchedules(Schedule... schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withTargetTags(Collection<Tag> targetTags)
The single tag that identifies targeted resources for this policy.
|
PolicyDetails |
withTargetTags(Tag... targetTags)
The single tag that identifies targeted resources for this policy.
|
public void setPolicyType(String policyType)
The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to
create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify
EVENT_BASED_POLICY
to create an event-based policy that performs specific actions when a defined
event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
policyType
- The valid target resource types and actions a policy can manage. Specify
EBS_SNAPSHOT_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of Amazon EBS
snapshots. Specify IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle
of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create an event-based policy that performs
specific actions when a defined event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
PolicyTypeValues
public String getPolicyType()
The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to
create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify
EVENT_BASED_POLICY
to create an event-based policy that performs specific actions when a defined
event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
EBS_SNAPSHOT_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of Amazon
EBS snapshots. Specify IMAGE_MANAGEMENT
to create a lifecycle policy that manages the
lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create an event-based policy
that performs specific actions when a defined event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
PolicyTypeValues
public PolicyDetails withPolicyType(String policyType)
The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to
create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify
EVENT_BASED_POLICY
to create an event-based policy that performs specific actions when a defined
event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
policyType
- The valid target resource types and actions a policy can manage. Specify
EBS_SNAPSHOT_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of Amazon EBS
snapshots. Specify IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle
of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create an event-based policy that performs
specific actions when a defined event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
PolicyTypeValues
public PolicyDetails withPolicyType(PolicyTypeValues policyType)
The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT
to
create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify
IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify
EVENT_BASED_POLICY
to create an event-based policy that performs specific actions when a defined
event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
policyType
- The valid target resource types and actions a policy can manage. Specify
EBS_SNAPSHOT_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of Amazon EBS
snapshots. Specify IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle
of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create an event-based policy that performs
specific actions when a defined event occurs in your Amazon Web Services account.
The default is EBS_SNAPSHOT_MANAGEMENT
.
PolicyTypeValues
public List<String> getResourceTypes()
The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create snapshots of
individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an
instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
VOLUME
to create
snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the
volumes for an instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
ResourceTypeValues
public void setResourceTypes(Collection<String> resourceTypes)
The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create snapshots of
individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an
instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
resourceTypes
- The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create
snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the
volumes for an instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
ResourceTypeValues
public PolicyDetails withResourceTypes(String... resourceTypes)
The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create snapshots of
individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an
instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
NOTE: This method appends the values to the existing list (if any). Use
setResourceTypes(java.util.Collection)
or withResourceTypes(java.util.Collection)
if you want
to override the existing values.
resourceTypes
- The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create
snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the
volumes for an instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
ResourceTypeValues
public PolicyDetails withResourceTypes(Collection<String> resourceTypes)
The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create snapshots of
individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an
instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
resourceTypes
- The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create
snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the
volumes for an instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
ResourceTypeValues
public PolicyDetails withResourceTypes(ResourceTypeValues... resourceTypes)
The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create snapshots of
individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an
instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
resourceTypes
- The target resource type for snapshot and AMI lifecycle policies. Use VOLUME
to create
snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the
volumes for an instance.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
ResourceTypeValues
public List<String> getResourceLocations()
The location of the resources to backup. If the source resources are located in an Amazon Web Services Region,
specify CLOUD
. If the source resources are located on an Outpost in your account, specify
OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type
with matching target tags across all of the Outposts in your account.
CLOUD
. If the source resources are located on an Outpost in your account,
specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the
specified type with matching target tags across all of the Outposts in your account.
ResourceLocationValues
public void setResourceLocations(Collection<String> resourceLocations)
The location of the resources to backup. If the source resources are located in an Amazon Web Services Region,
specify CLOUD
. If the source resources are located on an Outpost in your account, specify
OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type
with matching target tags across all of the Outposts in your account.
resourceLocations
- The location of the resources to backup. If the source resources are located in an Amazon Web Services
Region, specify CLOUD
. If the source resources are located on an Outpost in your account,
specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified
type with matching target tags across all of the Outposts in your account.
ResourceLocationValues
public PolicyDetails withResourceLocations(String... resourceLocations)
The location of the resources to backup. If the source resources are located in an Amazon Web Services Region,
specify CLOUD
. If the source resources are located on an Outpost in your account, specify
OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type
with matching target tags across all of the Outposts in your account.
NOTE: This method appends the values to the existing list (if any). Use
setResourceLocations(java.util.Collection)
or withResourceLocations(java.util.Collection)
if
you want to override the existing values.
resourceLocations
- The location of the resources to backup. If the source resources are located in an Amazon Web Services
Region, specify CLOUD
. If the source resources are located on an Outpost in your account,
specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified
type with matching target tags across all of the Outposts in your account.
ResourceLocationValues
public PolicyDetails withResourceLocations(Collection<String> resourceLocations)
The location of the resources to backup. If the source resources are located in an Amazon Web Services Region,
specify CLOUD
. If the source resources are located on an Outpost in your account, specify
OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type
with matching target tags across all of the Outposts in your account.
resourceLocations
- The location of the resources to backup. If the source resources are located in an Amazon Web Services
Region, specify CLOUD
. If the source resources are located on an Outpost in your account,
specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified
type with matching target tags across all of the Outposts in your account.
ResourceLocationValues
public PolicyDetails withResourceLocations(ResourceLocationValues... resourceLocations)
The location of the resources to backup. If the source resources are located in an Amazon Web Services Region,
specify CLOUD
. If the source resources are located on an Outpost in your account, specify
OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type
with matching target tags across all of the Outposts in your account.
resourceLocations
- The location of the resources to backup. If the source resources are located in an Amazon Web Services
Region, specify CLOUD
. If the source resources are located on an Outpost in your account,
specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified
type with matching target tags across all of the Outposts in your account.
ResourceLocationValues
public List<Tag> getTargetTags()
The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public void setTargetTags(Collection<Tag> targetTags)
The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
targetTags
- The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public PolicyDetails withTargetTags(Tag... targetTags)
The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
NOTE: This method appends the values to the existing list (if any). Use
setTargetTags(java.util.Collection)
or withTargetTags(java.util.Collection)
if you want to
override the existing values.
targetTags
- The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public PolicyDetails withTargetTags(Collection<Tag> targetTags)
The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
targetTags
- The single tag that identifies targeted resources for this policy.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public List<Schedule> getSchedules()
The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public void setSchedules(Collection<Schedule> schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
schedules
- The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to
four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public PolicyDetails withSchedules(Schedule... schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
NOTE: This method appends the values to the existing list (if any). Use
setSchedules(java.util.Collection)
or withSchedules(java.util.Collection)
if you want to
override the existing values.
schedules
- The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to
four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public PolicyDetails withSchedules(Collection<Schedule> schedules)
The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
schedules
- The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy can have up to
four schedules—one mandatory schedule and up to three optional schedules.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public void setParameters(Parameters parameters)
A set of optional parameters for snapshot and AMI lifecycle policies.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
parameters
- A set of optional parameters for snapshot and AMI lifecycle policies.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public Parameters getParameters()
A set of optional parameters for snapshot and AMI lifecycle policies.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public PolicyDetails withParameters(Parameters parameters)
A set of optional parameters for snapshot and AMI lifecycle policies.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
parameters
- A set of optional parameters for snapshot and AMI lifecycle policies.
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
public void setEventSource(EventSource eventSource)
The event that triggers the event-based policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
eventSource
- The event that triggers the event-based policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public EventSource getEventSource()
The event that triggers the event-based policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public PolicyDetails withEventSource(EventSource eventSource)
The event that triggers the event-based policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
eventSource
- The event that triggers the event-based policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public List<Action> getActions()
The actions to be performed when the event-based policy is triggered. You can specify only one action per policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public void setActions(Collection<Action> actions)
The actions to be performed when the event-based policy is triggered. You can specify only one action per policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
actions
- The actions to be performed when the event-based policy is triggered. You can specify only one action per
policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public PolicyDetails withActions(Action... actions)
The actions to be performed when the event-based policy is triggered. You can specify only one action per policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
NOTE: This method appends the values to the existing list (if any). Use
setActions(java.util.Collection)
or withActions(java.util.Collection)
if you want to override
the existing values.
actions
- The actions to be performed when the event-based policy is triggered. You can specify only one action per
policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public PolicyDetails withActions(Collection<Action> actions)
The actions to be performed when the event-based policy is triggered. You can specify only one action per policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
actions
- The actions to be performed when the event-based policy is triggered. You can specify only one action per
policy.
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
public String toString()
toString
in class Object
Object.toString()
public PolicyDetails clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.