Class CfnLifecyclePolicy
A CloudFormation AWS::DLM::LifecyclePolicy
.
Inherited Members
Namespace: Amazon.CDK.AWS.DLM
Assembly: Amazon.CDK.AWS.DLM.dll
Syntax (csharp)
public class CfnLifecyclePolicy : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnLifecyclePolicy
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Specifies a lifecycle policy, which is used to automate operations on Amazon EBS resources.
The properties are required when you add a lifecycle policy and optional when you update a lifecycle policy.
CloudformationResource: AWS::DLM::LifecyclePolicy
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DLM;
var cfnLifecyclePolicy = new CfnLifecyclePolicy(this, "MyCfnLifecyclePolicy", new CfnLifecyclePolicyProps {
Description = "description",
ExecutionRoleArn = "executionRoleArn",
PolicyDetails = new PolicyDetailsProperty {
Actions = new [] { new ActionProperty {
CrossRegionCopy = new [] { new CrossRegionCopyActionProperty {
EncryptionConfiguration = new EncryptionConfigurationProperty {
Encrypted = false,
// the properties below are optional
CmkArn = "cmkArn"
},
Target = "target",
// the properties below are optional
RetainRule = new CrossRegionCopyRetainRuleProperty {
Interval = 123,
IntervalUnit = "intervalUnit"
}
} },
Name = "name"
} },
EventSource = new EventSourceProperty {
Type = "type",
// the properties below are optional
Parameters = new EventParametersProperty {
EventType = "eventType",
SnapshotOwner = new [] { "snapshotOwner" },
// the properties below are optional
DescriptionRegex = "descriptionRegex"
}
},
Parameters = new ParametersProperty {
ExcludeBootVolume = false,
ExcludeDataVolumeTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
NoReboot = false
},
PolicyType = "policyType",
ResourceLocations = new [] { "resourceLocations" },
ResourceTypes = new [] { "resourceTypes" },
Schedules = new [] { new ScheduleProperty {
ArchiveRule = new ArchiveRuleProperty {
RetainRule = new ArchiveRetainRuleProperty {
RetentionArchiveTier = new RetentionArchiveTierProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
}
}
},
CopyTags = false,
CreateRule = new CreateRuleProperty {
CronExpression = "cronExpression",
Interval = 123,
IntervalUnit = "intervalUnit",
Location = "location",
Times = new [] { "times" }
},
CrossRegionCopyRules = new [] { new CrossRegionCopyRuleProperty {
Encrypted = false,
// the properties below are optional
CmkArn = "cmkArn",
CopyTags = false,
DeprecateRule = new CrossRegionCopyDeprecateRuleProperty {
Interval = 123,
IntervalUnit = "intervalUnit"
},
RetainRule = new CrossRegionCopyRetainRuleProperty {
Interval = 123,
IntervalUnit = "intervalUnit"
},
Target = "target",
TargetRegion = "targetRegion"
} },
DeprecateRule = new DeprecateRuleProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
FastRestoreRule = new FastRestoreRuleProperty {
AvailabilityZones = new [] { "availabilityZones" },
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
Name = "name",
RetainRule = new RetainRuleProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
ShareRules = new [] { new ShareRuleProperty {
TargetAccounts = new [] { "targetAccounts" },
UnshareInterval = 123,
UnshareIntervalUnit = "unshareIntervalUnit"
} },
TagsToAdd = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VariableTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
} },
TargetTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
},
State = "state",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnLifecyclePolicy(Construct, String, ICfnLifecyclePolicyProps) | Create a new |
CfnLifecyclePolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnLifecyclePolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the lifecycle policy. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | A description of the lifecycle policy. |
ExecutionRoleArn | The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy. |
PolicyDetails | The configuration details of the lifecycle policy. |
State | The activation state of the lifecycle policy. |
Tags | The tags to apply to the lifecycle policy during creation. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnLifecyclePolicy(Construct, String, ICfnLifecyclePolicyProps)
Create a new AWS::DLM::LifecyclePolicy
.
public CfnLifecyclePolicy(Construct scope, string id, ICfnLifecyclePolicyProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnLifecyclePolicyProps
- resource properties.
CfnLifecyclePolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnLifecyclePolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnLifecyclePolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnLifecyclePolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the lifecycle policy.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
A description of the lifecycle policy.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
The characters ^[0-9A-Za-z _-]+$ are supported.
ExecutionRoleArn
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
public virtual string ExecutionRoleArn { get; set; }
Property Value
System.String
Remarks
PolicyDetails
The configuration details of the lifecycle policy.
public virtual object PolicyDetails { get; set; }
Property Value
System.Object
Remarks
State
The activation state of the lifecycle policy.
public virtual string State { get; set; }
Property Value
System.String
Remarks
Tags
The tags to apply to the lifecycle policy during creation.
public virtual TagManager Tags { get; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>