Show / Hide Table of Contents

Class CfnLifecyclePolicyProps

Properties for defining a CfnLifecyclePolicy.

Inheritance
object
CfnLifecyclePolicyProps
Implements
ICfnLifecyclePolicyProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.ImageBuilder
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLifecyclePolicyProps : ICfnLifecyclePolicyProps
Syntax (vb)
Public Class CfnLifecyclePolicyProps Implements ICfnLifecyclePolicyProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-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.ImageBuilder;

             var cfnLifecyclePolicyProps = new CfnLifecyclePolicyProps {
                 ExecutionRole = "executionRole",
                 Name = "name",
                 PolicyDetails = new [] { new PolicyDetailProperty {
                     Action = new ActionProperty {
                         Type = "type",

                         // the properties below are optional
                         IncludeResources = new IncludeResourcesProperty {
                             Amis = false,
                             Containers = false,
                             Snapshots = false
                         }
                     },
                     Filter = new FilterProperty {
                         Type = "type",
                         Value = 123,

                         // the properties below are optional
                         RetainAtLeast = 123,
                         Unit = "unit"
                     },

                     // the properties below are optional
                     ExclusionRules = new ExclusionRulesProperty {
                         Amis = new AmiExclusionRulesProperty {
                             IsPublic = false,
                             LastLaunched = new LastLaunchedProperty {
                                 Unit = "unit",
                                 Value = 123
                             },
                             Regions = new [] { "regions" },
                             SharedAccounts = new [] { "sharedAccounts" },
                             TagMap = new Dictionary<string, string> {
                                 { "tagMapKey", "tagMap" }
                             }
                         },
                         TagMap = new Dictionary<string, string> {
                             { "tagMapKey", "tagMap" }
                         }
                     }
                 } },
                 ResourceSelection = new ResourceSelectionProperty {
                     Recipes = new [] { new RecipeSelectionProperty {
                         Name = "name",
                         SemanticVersion = "semanticVersion"
                     } },
                     TagMap = new Dictionary<string, string> {
                         { "tagMapKey", "tagMap" }
                     }
                 },
                 ResourceType = "resourceType",

                 // the properties below are optional
                 Description = "description",
                 Status = "status",
                 Tags = new Dictionary<string, string> {
                     { "tagsKey", "tags" }
                 }
             };

Synopsis

Constructors

CfnLifecyclePolicyProps()

Properties for defining a CfnLifecyclePolicy.

Properties

Description

Optional description for the lifecycle policy.

ExecutionRole

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.

Name

The name of the lifecycle policy to create.

PolicyDetails

Configuration details for the lifecycle policy rules.

ResourceSelection

Selection criteria for the resources that the lifecycle policy applies to.

ResourceType

The type of Image Builder resource that the lifecycle policy applies to.

Status

Indicates whether the lifecycle policy resource is enabled.

Tags

Tags to apply to the lifecycle policy resource.

Constructors

CfnLifecyclePolicyProps()

Properties for defining a CfnLifecyclePolicy.

public CfnLifecyclePolicyProps()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-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.ImageBuilder;

             var cfnLifecyclePolicyProps = new CfnLifecyclePolicyProps {
                 ExecutionRole = "executionRole",
                 Name = "name",
                 PolicyDetails = new [] { new PolicyDetailProperty {
                     Action = new ActionProperty {
                         Type = "type",

                         // the properties below are optional
                         IncludeResources = new IncludeResourcesProperty {
                             Amis = false,
                             Containers = false,
                             Snapshots = false
                         }
                     },
                     Filter = new FilterProperty {
                         Type = "type",
                         Value = 123,

                         // the properties below are optional
                         RetainAtLeast = 123,
                         Unit = "unit"
                     },

                     // the properties below are optional
                     ExclusionRules = new ExclusionRulesProperty {
                         Amis = new AmiExclusionRulesProperty {
                             IsPublic = false,
                             LastLaunched = new LastLaunchedProperty {
                                 Unit = "unit",
                                 Value = 123
                             },
                             Regions = new [] { "regions" },
                             SharedAccounts = new [] { "sharedAccounts" },
                             TagMap = new Dictionary<string, string> {
                                 { "tagMapKey", "tagMap" }
                             }
                         },
                         TagMap = new Dictionary<string, string> {
                             { "tagMapKey", "tagMap" }
                         }
                     }
                 } },
                 ResourceSelection = new ResourceSelectionProperty {
                     Recipes = new [] { new RecipeSelectionProperty {
                         Name = "name",
                         SemanticVersion = "semanticVersion"
                     } },
                     TagMap = new Dictionary<string, string> {
                         { "tagMapKey", "tagMap" }
                     }
                 },
                 ResourceType = "resourceType",

                 // the properties below are optional
                 Description = "description",
                 Status = "status",
                 Tags = new Dictionary<string, string> {
                     { "tagsKey", "tags" }
                 }
             };

Properties

Description

Optional description for the lifecycle policy.

public string? Description { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-description

ExecutionRole

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.

public string ExecutionRole { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-executionrole

Name

The name of the lifecycle policy to create.

public string Name { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-name

PolicyDetails

Configuration details for the lifecycle policy rules.

public object PolicyDetails { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-policydetails

ResourceSelection

Selection criteria for the resources that the lifecycle policy applies to.

public object ResourceSelection { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-resourceselection

ResourceType

The type of Image Builder resource that the lifecycle policy applies to.

public string ResourceType { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-resourcetype

Status

Indicates whether the lifecycle policy resource is enabled.

public string? Status { get; set; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-status

Tags

Tags to apply to the lifecycle policy resource.

public IDictionary<string, string>? Tags { get; set; }
Property Value

IDictionary<string, string>

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-imagebuilder-lifecyclepolicy.html#cfn-imagebuilder-lifecyclepolicy-tags

Implements

ICfnLifecyclePolicyProps
Back to top Generated by DocFX