Interface ICfnLifecyclePolicyProps
Properties for defining a CfnLifecyclePolicy
.
Namespace: Amazon.CDK.AWS.ImageBuilder
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnLifecyclePolicyProps
Syntax (vb)
Public Interface ICfnLifecyclePolicyProps
Remarks
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
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. |
Properties
Description
Optional description for the lifecycle policy.
virtual string Description { get; }
Property Value
System.String
Remarks
ExecutionRole
The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.
string ExecutionRole { get; }
Property Value
System.String
Remarks
Name
The name of the lifecycle policy to create.
string Name { get; }
Property Value
System.String
Remarks
PolicyDetails
Configuration details for the lifecycle policy rules.
object PolicyDetails { get; }
Property Value
System.Object
Remarks
ResourceSelection
Selection criteria for the resources that the lifecycle policy applies to.
object ResourceSelection { get; }
Property Value
System.Object
Remarks
ResourceType
The type of Image Builder resource that the lifecycle policy applies to.
string ResourceType { get; }
Property Value
System.String
Remarks
Status
Indicates whether the lifecycle policy resource is enabled.
virtual string Status { get; }
Property Value
System.String
Remarks
Tags
Tags to apply to the lifecycle policy resource.
virtual IDictionary<string, string> Tags { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>