Struct aws_sdk_dlm::model::policy_details::Builder
source · [−]#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for PolicyDetails
Implementations
sourceimpl Builder
impl Builder
sourcepub fn policy_type(self, input: PolicyTypeValues) -> Self
pub fn policy_type(self, input: PolicyTypeValues) -> Self
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 set_policy_type(self, input: Option<PolicyTypeValues>) -> Self
pub fn set_policy_type(self, input: Option<PolicyTypeValues>) -> Self
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, input: ResourceTypeValues) -> Self
pub fn resource_types(self, input: ResourceTypeValues) -> Self
Appends an item to resource_types
.
To override the contents of this collection use set_resource_types
.
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 set_resource_types(self, input: Option<Vec<ResourceTypeValues>>) -> Self
pub fn set_resource_types(self, input: Option<Vec<ResourceTypeValues>>) -> Self
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, input: ResourceLocationValues) -> Self
pub fn resource_locations(self, input: ResourceLocationValues) -> Self
Appends an item to resource_locations
.
To override the contents of this collection use set_resource_locations
.
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.
sourcepub fn set_resource_locations(
self,
input: Option<Vec<ResourceLocationValues>>
) -> Self
pub fn set_resource_locations(
self,
input: Option<Vec<ResourceLocationValues>>
) -> Self
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.
Appends an item to target_tags
.
To override the contents of this collection use set_target_tags
.
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.
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, input: Schedule) -> Self
pub fn schedules(self, input: Schedule) -> Self
Appends an item to schedules
.
To override the contents of this collection use set_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.
sourcepub fn set_schedules(self, input: Option<Vec<Schedule>>) -> Self
pub fn set_schedules(self, input: Option<Vec<Schedule>>) -> Self
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, input: Parameters) -> Self
pub fn parameters(self, input: Parameters) -> Self
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 set_parameters(self, input: Option<Parameters>) -> Self
pub fn set_parameters(self, input: Option<Parameters>) -> Self
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, input: EventSource) -> Self
pub fn event_source(self, input: EventSource) -> Self
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.
sourcepub fn set_event_source(self, input: Option<EventSource>) -> Self
pub fn set_event_source(self, input: Option<EventSource>) -> Self
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.
sourcepub fn actions(self, input: Action) -> Self
pub fn actions(self, input: Action) -> Self
Appends an item to actions
.
To override the contents of this collection use set_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.
sourcepub fn set_actions(self, input: Option<Vec<Action>>) -> Self
pub fn set_actions(self, input: Option<Vec<Action>>) -> Self
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.
sourcepub fn build(self) -> PolicyDetails
pub fn build(self) -> PolicyDetails
Consumes the builder and constructs a PolicyDetails
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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