Class CfnLifecyclePolicy
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.imagebuilder.CfnLifecyclePolicy
- All Implemented Interfaces:
IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.93.0 (build 1706ca5)",
date="2024-01-03T18:29:27.552Z")
@Stability(Stable)
public class CfnLifecyclePolicy
extends CfnResource
implements IInspectable
The configuration details for a lifecycle policy resource.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.imagebuilder.*;
CfnLifecyclePolicy cfnLifecyclePolicy = CfnLifecyclePolicy.Builder.create(this, "MyCfnLifecyclePolicy")
.executionRole("executionRole")
.name("name")
.policyDetails(List.of(PolicyDetailProperty.builder()
.action(ActionProperty.builder()
.type("type")
// the properties below are optional
.includeResources(IncludeResourcesProperty.builder()
.amis(false)
.containers(false)
.snapshots(false)
.build())
.build())
.filter(FilterProperty.builder()
.type("type")
.value(123)
// the properties below are optional
.retainAtLeast(123)
.unit("unit")
.build())
// the properties below are optional
.exclusionRules(ExclusionRulesProperty.builder()
.amis(AmiExclusionRulesProperty.builder()
.isPublic(false)
.lastLaunched(LastLaunchedProperty.builder()
.unit("unit")
.value(123)
.build())
.regions(List.of("regions"))
.sharedAccounts(List.of("sharedAccounts"))
.tagMap(Map.of(
"tagMapKey", "tagMap"))
.build())
.tagMap(Map.of(
"tagMapKey", "tagMap"))
.build())
.build()))
.resourceSelection(ResourceSelectionProperty.builder()
.recipes(List.of(RecipeSelectionProperty.builder()
.name("name")
// the properties below are optional
.semanticVersion("semanticVersion")
.build()))
.tagMap(Map.of(
"tagMapKey", "tagMap"))
.build())
.resourceType("resourceType")
// the properties below are optional
.description("description")
.status("status")
.tags(Map.of(
"tagsKey", "tags"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe action of the policy detail.static interfaceThe AMI exclusion rules for the policy detail.static final classA fluent builder forCfnLifecyclePolicy.static interfaceThe exclusion rules to apply of the policy detail.static interfaceA filter name and value pair that is used to return a more specific list of results from a list operation.static interfaceThe included resources of the policy detail.static interfaceThe last launched time of a resource.static interfaceThe policy detail of the lifecycle policy.static interfaceThe recipe to apply the lifecycle policy for.static interfaceThe resource selection for the lifecycle policy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) CfnLifecyclePolicy(software.constructs.Construct scope, String id, CfnLifecyclePolicyProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the lifecycle policy resource.Optional description for the lifecycle policy.The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy.getName()The name of the lifecycle policy.The configuration details for a lifecycle policy resource.Resource selection criteria used to run the lifecycle policy.The type of resources the lifecycle policy targets.Indicates whether the lifecycle policy resource is enabled.getTags()To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDescription(String value) Optional description for the lifecycle policy.voidsetExecutionRole(String value) The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy.voidThe name of the lifecycle policy.voidsetPolicyDetails(List<Object> value) The configuration details for a lifecycle policy resource.voidsetPolicyDetails(IResolvable value) The configuration details for a lifecycle policy resource.voidsetResourceSelection(IResolvable value) Resource selection criteria used to run the lifecycle policy.voidResource selection criteria used to run the lifecycle policy.voidsetResourceType(String value) The type of resources the lifecycle policy targets.voidIndicates whether the lifecycle policy resource is enabled.voidTo help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnLifecyclePolicy
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLifecyclePolicy
protected CfnLifecyclePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLifecyclePolicy
@Stability(Stable) public CfnLifecyclePolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLifecyclePolicyProps props) - Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the lifecycle policy resource. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getExecutionRole
The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. -
setExecutionRole
The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. -
getName
The name of the lifecycle policy. -
setName
The name of the lifecycle policy. -
getPolicyDetails
The configuration details for a lifecycle policy resource. -
setPolicyDetails
The configuration details for a lifecycle policy resource. -
setPolicyDetails
The configuration details for a lifecycle policy resource. -
getResourceSelection
Resource selection criteria used to run the lifecycle policy. -
setResourceSelection
Resource selection criteria used to run the lifecycle policy. -
setResourceSelection
@Stability(Stable) public void setResourceSelection(@NotNull CfnLifecyclePolicy.ResourceSelectionProperty value) Resource selection criteria used to run the lifecycle policy. -
getResourceType
The type of resources the lifecycle policy targets. -
setResourceType
The type of resources the lifecycle policy targets. -
getDescription
Optional description for the lifecycle policy. -
setDescription
Optional description for the lifecycle policy. -
getStatus
Indicates whether the lifecycle policy resource is enabled. -
setStatus
Indicates whether the lifecycle policy resource is enabled. -
getTags
To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. -
setTags
To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags.
-