Class TagProps
Properties for a tag.
Inheritance
Implements
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TagProps : Object, ITagProps
Syntax (vb)
Public Class TagProps
Inherits Object
Implements ITagProps
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;
var tagProps = new TagProps {
ApplyToLaunchedInstances = false,
ExcludeResourceTypes = new [] { "excludeResourceTypes" },
IncludeResourceTypes = new [] { "includeResourceTypes" },
Priority = 123
};
Synopsis
Constructors
TagProps() |
Properties
ApplyToLaunchedInstances | Whether the tag should be applied to instances in an AutoScalingGroup. |
ExcludeResourceTypes | An array of Resource Types that will not receive this tag. |
IncludeResourceTypes | An array of Resource Types that will receive this tag. |
Priority | Priority of the tag operation. |
Constructors
TagProps()
public TagProps()
Properties
ApplyToLaunchedInstances
Whether the tag should be applied to instances in an AutoScalingGroup.
public Nullable<bool> ApplyToLaunchedInstances { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
ExcludeResourceTypes
An array of Resource Types that will not receive this tag.
public string[] ExcludeResourceTypes { get; set; }
Property Value
System.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
System.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 Nullable<double> Priority { get; set; }
Property Value
System.Nullable<System.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
SetTag
- 200 for
RemoveTag
- 50 for tags added directly to CloudFormation resources