logo
pub struct PolicyDetails {
    pub actions: Option<Vec<Action>>,
    pub event_source: Option<EventSource>,
    pub parameters: Option<Parameters>,
    pub policy_type: Option<String>,
    pub resource_locations: Option<Vec<String>>,
    pub resource_types: Option<Vec<String>>,
    pub schedules: Option<Vec<Schedule>>,
    pub target_tags: Option<Vec<Tag>>,
}
Expand description

Specifies the configuration of a lifecycle policy.

Fields

actions: Option<Vec<Action>>

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.

event_source: Option<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.

parameters: Option<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.

policy_type: Option<String>

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 AWS account.

The default is EBS_SNAPSHOT_MANAGEMENT.

resource_locations: Option<Vec<String>>

The location of the resources to backup. If the source resources are located in an AWS Region, specify CLOUD. If the source resources are located on an AWS 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.

resource_types: Option<Vec<String>>

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.

schedules: Option<Vec<Schedule>>

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.

target_tags: Option<Vec<Tag>>

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more