@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PolicyDetails extends Object implements Serializable, Cloneable, StructuredPojo
[All policy types] 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()
[Event-based policies only] The actions to be performed when the event-based policy is activated.
|
EventSource |
getEventSource()
[Event-based policies only] The event that activates the event-based policy.
|
Parameters |
getParameters()
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
|
String |
getPolicyType()
[All policy types] The valid target resource types and actions a policy can manage.
|
List<String> |
getResourceLocations()
[Snapshot and AMI policies only] The location of the resources to backup.
|
List<String> |
getResourceTypes()
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
|
List<Schedule> |
getSchedules()
[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle
policies.
|
List<Tag> |
getTargetTags()
[Snapshot and AMI policies only] 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)
[Event-based policies only] The actions to be performed when the event-based policy is activated.
|
void |
setEventSource(EventSource eventSource)
[Event-based policies only] The event that activates the event-based policy.
|
void |
setParameters(Parameters parameters)
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
|
void |
setPolicyType(String policyType)
[All policy types] The valid target resource types and actions a policy can manage.
|
void |
setResourceLocations(Collection<String> resourceLocations)
[Snapshot and AMI policies only] The location of the resources to backup.
|
void |
setResourceTypes(Collection<String> resourceTypes)
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
|
void |
setSchedules(Collection<Schedule> schedules)
[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle
policies.
|
void |
setTargetTags(Collection<Tag> targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
|
String |
toString()
Returns a string representation of this object.
|
PolicyDetails |
withActions(Action... actions)
[Event-based policies only] The actions to be performed when the event-based policy is activated.
|
PolicyDetails |
withActions(Collection<Action> actions)
[Event-based policies only] The actions to be performed when the event-based policy is activated.
|
PolicyDetails |
withEventSource(EventSource eventSource)
[Event-based policies only] The event that activates the event-based policy.
|
PolicyDetails |
withParameters(Parameters parameters)
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withPolicyType(PolicyTypeValues policyType)
[All policy types] The valid target resource types and actions a policy can manage.
|
PolicyDetails |
withPolicyType(String policyType)
[All policy types] The valid target resource types and actions a policy can manage.
|
PolicyDetails |
withResourceLocations(Collection<String> resourceLocations)
[Snapshot and AMI policies only] The location of the resources to backup.
|
PolicyDetails |
withResourceLocations(ResourceLocationValues... resourceLocations)
[Snapshot and AMI policies only] The location of the resources to backup.
|
PolicyDetails |
withResourceLocations(String... resourceLocations)
[Snapshot and AMI policies only] The location of the resources to backup.
|
PolicyDetails |
withResourceTypes(Collection<String> resourceTypes)
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withResourceTypes(ResourceTypeValues... resourceTypes)
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withResourceTypes(String... resourceTypes)
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
|
PolicyDetails |
withSchedules(Collection<Schedule> schedules)
[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle
policies.
|
PolicyDetails |
withSchedules(Schedule... schedules)
[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle
policies.
|
PolicyDetails |
withTargetTags(Collection<Tag> targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
|
PolicyDetails |
withTargetTags(Tag... targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
|
public void setPolicyType(String policyType)
[All policy types] 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
- [All policy types] 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()
[All policy types] 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)
[All policy types] 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
- [All policy types] 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)
[All policy types] 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
- [All policy types] 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()
[Snapshot policies only] 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.
VOLUME
to create snapshots of individual volumes or use INSTANCE
to create
multi-volume snapshots from the volumes for an instance.ResourceTypeValues
public void setResourceTypes(Collection<String> resourceTypes)
[Snapshot policies only] 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.
resourceTypes
- [Snapshot policies only] 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.ResourceTypeValues
public PolicyDetails withResourceTypes(String... resourceTypes)
[Snapshot policies only] 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.
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
- [Snapshot policies only] 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.ResourceTypeValues
public PolicyDetails withResourceTypes(Collection<String> resourceTypes)
[Snapshot policies only] 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.
resourceTypes
- [Snapshot policies only] 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.ResourceTypeValues
public PolicyDetails withResourceTypes(ResourceTypeValues... resourceTypes)
[Snapshot policies only] 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.
resourceTypes
- [Snapshot policies only] 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.ResourceTypeValues
public List<String> getResourceLocations()
[Snapshot and AMI policies only] 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)
[Snapshot and AMI policies only] 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
- [Snapshot and AMI policies only] 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)
[Snapshot and AMI policies only] 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
- [Snapshot and AMI policies only] 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)
[Snapshot and AMI policies only] 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
- [Snapshot and AMI policies only] 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)
[Snapshot and AMI policies only] 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
- [Snapshot and AMI policies only] 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()
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
public void setTargetTags(Collection<Tag> targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
targetTags
- [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.public PolicyDetails withTargetTags(Tag... targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
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
- [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.public PolicyDetails withTargetTags(Collection<Tag> targetTags)
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
targetTags
- [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.public List<Schedule> getSchedules()
[Snapshot and AMI policies only] 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.
public void setSchedules(Collection<Schedule> schedules)
[Snapshot and AMI policies only] 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.
schedules
- [Snapshot and AMI policies only] 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.public PolicyDetails withSchedules(Schedule... schedules)
[Snapshot and AMI policies only] 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.
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
- [Snapshot and AMI policies only] 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.public PolicyDetails withSchedules(Collection<Schedule> schedules)
[Snapshot and AMI policies only] 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.
schedules
- [Snapshot and AMI policies only] 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.public void setParameters(Parameters parameters)
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
parameters
- [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle
policies. If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
public Parameters getParameters()
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
public PolicyDetails withParameters(Parameters parameters)
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
parameters
- [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle
policies. If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
public void setEventSource(EventSource eventSource)
[Event-based policies only] The event that activates the event-based policy.
eventSource
- [Event-based policies only] The event that activates the event-based policy.public EventSource getEventSource()
[Event-based policies only] The event that activates the event-based policy.
public PolicyDetails withEventSource(EventSource eventSource)
[Event-based policies only] The event that activates the event-based policy.
eventSource
- [Event-based policies only] The event that activates the event-based policy.public List<Action> getActions()
[Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.
public void setActions(Collection<Action> actions)
[Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.
actions
- [Event-based policies only] The actions to be performed when the event-based policy is activated.
You can specify only one action per policy.public PolicyDetails withActions(Action... actions)
[Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.
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
- [Event-based policies only] The actions to be performed when the event-based policy is activated.
You can specify only one action per policy.public PolicyDetails withActions(Collection<Action> actions)
[Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.
actions
- [Event-based policies only] The actions to be performed when the event-based policy is activated.
You can specify only one action per policy.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.