Skip to content
v2.278.0

ExclusionRulesProperty Struct ​

Specifies resources that lifecycle policy actions should not apply to.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const exclusionRulesProperty: imagebuilder.CfnLifecyclePolicy.ExclusionRulesProperty = {
  amis: {
    isPublic: false,
    lastLaunched: {
      unit: 'unit',
      value: 123,
    },
    regions: ['regions'],
    sharedAccounts: ['sharedAccounts'],
    tagMap: {
      tagMapKey: 'tagMap',
    },
  },
  tagMap: {
    tagMapKey: 'tagMap',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_imagebuilder as imagebuilder

exclusion_rules_property = imagebuilder.CfnLifecyclePolicy.ExclusionRulesProperty(
    amis=imagebuilder.CfnLifecyclePolicy.AmiExclusionRulesProperty(
        is_public=False,
        last_launched=imagebuilder.CfnLifecyclePolicy.LastLaunchedProperty(
            unit="unit",
            value=123
        ),
        regions=["regions"],
        shared_accounts=["sharedAccounts"],
        tag_map={
            "tag_map_key": "tagMap"
        }
    ),
    tag_map={
        "tag_map_key": "tagMap"
    }
)
java
// 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.*;

ExclusionRulesProperty exclusionRulesProperty = 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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 exclusionRulesProperty = 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" }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

exclusionRulesProperty := &ExclusionRulesProperty{
	Amis: &AmiExclusionRulesProperty{
		IsPublic: jsii.Boolean(false),
		LastLaunched: &LastLaunchedProperty{
			Unit: jsii.String("unit"),
			Value: jsii.Number(123),
		},
		Regions: []*string{
			jsii.String("regions"),
		},
		SharedAccounts: []*string{
			jsii.String("sharedAccounts"),
		},
		TagMap: map[string]*string{
			"tagMapKey": jsii.String("tagMap"),
		},
	},
	TagMap: map[string]*string{
		"tagMapKey": jsii.String("tagMap"),
	},
}

Properties ​

amisoptionalIResolvable | CfnLifecyclePolicy.AmiExclusionRulesPropertyamisoptionaltyping.Union[IResolvable, AmiExclusionRulesProperty]amisoptionalIResolvableAmisoptionalIResolvableAmisoptionalinterface{} #
Lists configuration values that apply to AMIs that Image Builder should exclude from the lifecycle action.
tagMapoptionalIResolvable | { [key: string]: string }tag_mapoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]tagMapoptionalIResolvableTagMapoptionalIResolvableTagMapoptionalinterface{} #
Contains a list of tags that Image Builder uses to skip lifecycle actions for Image Builder image resources that have them.