Class CfnLifecyclePolicy.EventParametersProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.EventParametersProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLifecyclePolicy.EventParametersProperty>
- Enclosing interface:
CfnLifecyclePolicy.EventParametersProperty
@Stability(Stable)
public static final class CfnLifecyclePolicy.EventParametersProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLifecyclePolicy.EventParametersProperty>
A builder for
CfnLifecyclePolicy.EventParametersProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.descriptionRegex
(String descriptionRegex) Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getDescriptionRegex()
Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getEventType()
snapshotOwner
(List<String> snapshotOwner) Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getSnapshotOwner()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
eventType
@Stability(Stable) public CfnLifecyclePolicy.EventParametersProperty.Builder eventType(String eventType) Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getEventType()
- Parameters:
eventType
- The type of event. This parameter is required. Currently, only snapshot sharing events are supported.- Returns:
this
-
snapshotOwner
@Stability(Stable) public CfnLifecyclePolicy.EventParametersProperty.Builder snapshotOwner(List<String> snapshotOwner) Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getSnapshotOwner()
- Parameters:
snapshotOwner
- The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. This parameter is required. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.- Returns:
this
-
descriptionRegex
@Stability(Stable) public CfnLifecyclePolicy.EventParametersProperty.Builder descriptionRegex(String descriptionRegex) Sets the value ofCfnLifecyclePolicy.EventParametersProperty.getDescriptionRegex()
- Parameters:
descriptionRegex
- The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.For example, specifying
^.*Created for policy: policy-1234567890abcdef0.*$
configures the policy to run only if snapshots created by policypolicy-1234567890abcdef0
are shared with your account.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLifecyclePolicy.EventParametersProperty>
- Returns:
- a new instance of
CfnLifecyclePolicy.EventParametersProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-