Struct aws_sdk_dlm::model::PolicyDetails
source · [−]#[non_exhaustive]pub struct PolicyDetails {
pub policy_type: Option<PolicyTypeValues>,
pub resource_types: Option<Vec<ResourceTypeValues>>,
pub resource_locations: Option<Vec<ResourceLocationValues>>,
pub target_tags: Option<Vec<Tag>>,
pub schedules: Option<Vec<Schedule>>,
pub parameters: Option<Parameters>,
pub event_source: Option<EventSource>,
pub actions: Option<Vec<Action>>,
}
Expand description
Specifies the configuration of a lifecycle policy.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.policy_type: Option<PolicyTypeValues>
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
.
resource_types: Option<Vec<ResourceTypeValues>>
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.
resource_locations: Option<Vec<ResourceLocationValues>>
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.
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.
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.
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.
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.
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.
Implementations
sourceimpl PolicyDetails
impl PolicyDetails
sourcepub fn policy_type(&self) -> Option<&PolicyTypeValues>
pub fn policy_type(&self) -> Option<&PolicyTypeValues>
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
.
sourcepub fn resource_types(&self) -> Option<&[ResourceTypeValues]>
pub fn resource_types(&self) -> Option<&[ResourceTypeValues]>
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.
sourcepub fn resource_locations(&self) -> Option<&[ResourceLocationValues]>
pub fn resource_locations(&self) -> Option<&[ResourceLocationValues]>
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.
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.
sourcepub fn schedules(&self) -> Option<&[Schedule]>
pub fn schedules(&self) -> Option<&[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.
sourcepub fn parameters(&self) -> Option<&Parameters>
pub fn parameters(&self) -> 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.
sourcepub fn event_source(&self) -> Option<&EventSource>
pub fn event_source(&self) -> 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.
sourceimpl PolicyDetails
impl PolicyDetails
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture PolicyDetails
Trait Implementations
sourceimpl Clone for PolicyDetails
impl Clone for PolicyDetails
sourcefn clone(&self) -> PolicyDetails
fn clone(&self) -> PolicyDetails
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PolicyDetails
impl Debug for PolicyDetails
sourceimpl PartialEq<PolicyDetails> for PolicyDetails
impl PartialEq<PolicyDetails> for PolicyDetails
sourcefn eq(&self, other: &PolicyDetails) -> bool
fn eq(&self, other: &PolicyDetails) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PolicyDetails) -> bool
fn ne(&self, other: &PolicyDetails) -> bool
This method tests for !=
.
impl StructuralPartialEq for PolicyDetails
Auto Trait Implementations
impl RefUnwindSafe for PolicyDetails
impl Send for PolicyDetails
impl Sync for PolicyDetails
impl Unpin for PolicyDetails
impl UnwindSafe for PolicyDetails
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more