Table of Contents

Class TagProps

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

Properties for a tag.

public class TagProps : ITagProps
Inheritance
TagProps
Implements
Inherited Members

Examples

// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            var tagProps = new TagProps {
                ApplyToLaunchedInstances = false,
                ExcludeResourceTypes = new [] { "excludeResourceTypes" },
                IncludeResourceTypes = new [] { "includeResourceTypes" },
                Priority = 123
            };

Remarks

ExampleMetadata: fixture=_generated

Constructors

TagProps()

public TagProps()

Properties

ApplyToLaunchedInstances

Whether the tag should be applied to instances in an AutoScalingGroup.

public bool? ApplyToLaunchedInstances { get; set; }

Property Value

bool?

Remarks

Default: true

ExcludeResourceTypes

An array of Resource Types that will not receive this tag.

public string[]? ExcludeResourceTypes { get; set; }

Property Value

string[]

Remarks

An empty array will allow this tag to be applied to all resources. A non-empty array will apply this tag only if the Resource type is not in this array.

Default: []

IncludeResourceTypes

An array of Resource Types that will receive this tag.

public string[]? IncludeResourceTypes { get; set; }

Property Value

string[]

Remarks

An empty array will match any Resource. A non-empty array will apply this tag only to Resource types that are included in this array.

Default: []

Priority

Priority of the tag operation.

public double? Priority { get; set; }

Property Value

double?

Remarks

Higher or equal priority tags will take precedence.

Setting priority will enable the user to control tags when they need to not follow the default precedence pattern of last applied and closest to the construct in the tree.

Default: Default priorities:

  • 100 for {@link SetTag}
  • 200 for {@link RemoveTag}
  • 50 for tags added directly to CloudFormation resources