Class CfnLifecyclePolicy.CreateRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.CreateRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicy.CreateRuleProperty>
- Enclosing interface:
CfnLifecyclePolicy.CreateRuleProperty
@Stability(Stable)
public static final class CfnLifecyclePolicy.CreateRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicy.CreateRuleProperty>
A builder for
CfnLifecyclePolicy.CreateRuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.cronExpression
(String cronExpression) Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getCronExpression()
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getInterval()
intervalUnit
(String intervalUnit) Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getIntervalUnit()
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getLocation()
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getTimes()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cronExpression
@Stability(Stable) public CfnLifecyclePolicy.CreateRuleProperty.Builder cronExpression(String cronExpression) Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getCronExpression()
- Parameters:
cronExpression
- The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see Cron expressions in the Amazon CloudWatch User Guide .- Returns:
this
-
interval
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getInterval()
- Parameters:
interval
- The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.- Returns:
this
-
intervalUnit
@Stability(Stable) public CfnLifecyclePolicy.CreateRuleProperty.Builder intervalUnit(String intervalUnit) Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getIntervalUnit()
- Parameters:
intervalUnit
- The interval unit.- Returns:
this
-
location
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getLocation()
- Parameters:
location
- [Snapshot policies only] Specifies the destination for snapshots created by the policy. To create snapshots in the same Region as the source resource, specifyCLOUD
. To create snapshots on the same Outpost as the source resource, specifyOUTPOST_LOCAL
. If you omit this parameter,CLOUD
is used by default.If the policy targets resources in an AWS Region , then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost.
- Returns:
this
-
times
Sets the value ofCfnLifecyclePolicy.CreateRuleProperty.getTimes()
- Parameters:
times
- The time, in UTC, to start the operation. The supported format is hh:mm. The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicy.CreateRuleProperty>
- Returns:
- a new instance of
CfnLifecyclePolicy.CreateRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-