@Stability(value=Stable)
public static interface CfnLifecyclePolicy.PolicyDetailsProperty
extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dlm.*;
PolicyDetailsProperty policyDetailsProperty = PolicyDetailsProperty.builder()
.actions(List.of(ActionProperty.builder()
.crossRegionCopy(List.of(CrossRegionCopyActionProperty.builder()
.encryptionConfiguration(EncryptionConfigurationProperty.builder()
.encrypted(false)
// the properties below are optional
.cmkArn("cmkArn")
.build())
.target("target")
// the properties below are optional
.retainRule(CrossRegionCopyRetainRuleProperty.builder()
.interval(123)
.intervalUnit("intervalUnit")
.build())
.build()))
.name("name")
.build()))
.eventSource(EventSourceProperty.builder()
.type("type")
// the properties below are optional
.parameters(EventParametersProperty.builder()
.eventType("eventType")
.snapshotOwner(List.of("snapshotOwner"))
// the properties below are optional
.descriptionRegex("descriptionRegex")
.build())
.build())
.parameters(ParametersProperty.builder()
.excludeBootVolume(false)
.excludeDataVolumeTags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.noReboot(false)
.build())
.policyType("policyType")
.resourceLocations(List.of("resourceLocations"))
.resourceTypes(List.of("resourceTypes"))
.schedules(List.of(ScheduleProperty.builder()
.copyTags(false)
.createRule(CreateRuleProperty.builder()
.cronExpression("cronExpression")
.interval(123)
.intervalUnit("intervalUnit")
.location("location")
.times(List.of("times"))
.build())
.crossRegionCopyRules(List.of(CrossRegionCopyRuleProperty.builder()
.encrypted(false)
// the properties below are optional
.cmkArn("cmkArn")
.copyTags(false)
.deprecateRule(CrossRegionCopyDeprecateRuleProperty.builder()
.interval(123)
.intervalUnit("intervalUnit")
.build())
.retainRule(CrossRegionCopyRetainRuleProperty.builder()
.interval(123)
.intervalUnit("intervalUnit")
.build())
.target("target")
.targetRegion("targetRegion")
.build()))
.deprecateRule(DeprecateRuleProperty.builder()
.count(123)
.interval(123)
.intervalUnit("intervalUnit")
.build())
.fastRestoreRule(FastRestoreRuleProperty.builder()
.availabilityZones(List.of("availabilityZones"))
.count(123)
.interval(123)
.intervalUnit("intervalUnit")
.build())
.name("name")
.retainRule(RetainRuleProperty.builder()
.count(123)
.interval(123)
.intervalUnit("intervalUnit")
.build())
.shareRules(List.of(ShareRuleProperty.builder()
.targetAccounts(List.of("targetAccounts"))
.unshareInterval(123)
.unshareIntervalUnit("unshareIntervalUnit")
.build()))
.tagsToAdd(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.variableTags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build()))
.targetTags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnLifecyclePolicy.PolicyDetailsProperty.Builder
A builder for
CfnLifecyclePolicy.PolicyDetailsProperty |
static class |
CfnLifecyclePolicy.PolicyDetailsProperty.Jsii$Proxy
An implementation for
CfnLifecyclePolicy.PolicyDetailsProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnLifecyclePolicy.PolicyDetailsProperty.Builder |
builder() |
default Object |
getActions()
The actions to be performed when the event-based policy is triggered.
|
default Object |
getEventSource()
The event that triggers the event-based policy.
|
default Object |
getParameters()
A set of optional parameters for snapshot and AMI lifecycle policies.
|
default String |
getPolicyType()
The valid target resource types and actions a policy can manage.
|
default List<String> |
getResourceLocations()
The location of the resources to backup.
|
default List<String> |
getResourceTypes()
The target resource type for snapshot and AMI lifecycle policies.
|
default Object |
getSchedules()
The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
|
default Object |
getTargetTags()
The single tag that identifies targeted resources for this policy.
|
@Stability(value=Stable) @Nullable default Object getActions()
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
@Stability(value=Stable) @Nullable default Object getEventSource()
This parameter is required for event-based policies only. If you are creating a snapshot or AMI policy, omit this parameter.
@Stability(value=Stable) @Nullable default Object getParameters()
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
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.
@Stability(value=Stable) @Nullable default String getPolicyType()
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 .
@Stability(value=Stable) @Nullable default List<String> getResourceLocations()
If the source resources are located in an AWS 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.
@Stability(value=Stable) @Nullable default List<String> getResourceTypes()
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.
@Stability(value=Stable) @Nullable default Object getSchedules()
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.
@Stability(value=Stable) @Nullable default Object getTargetTags()
This parameter is required for snapshot and AMI policies only. If you are creating an event-based policy, omit this parameter.
@Stability(value=Stable) static CfnLifecyclePolicy.PolicyDetailsProperty.Builder builder()
Copyright © 2022. All rights reserved.