Class Tag
The Tag Aspect will handle adding a tag to this node and cascading tags to children.
public class Tag : DeputyBase, IAspect
- Inheritance
-
Tag
- Implements
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var tag = new Tag("key", "value", new TagProps {
ApplyToLaunchedInstances = false,
ExcludeResourceTypes = new [] { "excludeResourceTypes" },
IncludeResourceTypes = new [] { "includeResourceTypes" },
Priority = 123
});
Remarks
ExampleMetadata: fixture=_generated
Constructors
Tag(string, string, ITagProps?)
public Tag(string key, string value, ITagProps? props = null)
Parameters
Properties
Key
The string key for the tag.
public virtual string Key { get; }
Property Value
Props
protected virtual ITagProps Props { get; }
Property Value
Value
The string value of the tag.
public virtual string Value { get; }
Property Value
Methods
Add(Construct, string, string, ITagProps?)
(deprecated) DEPRECATED: add tags to the node of a construct and all its the taggable children.
[Obsolete("use `Tags.of(scope).add()`")]
public static void Add(Construct scope, string key, string value, ITagProps? props = null)
Parameters
Remarks
Stability: Deprecated
ApplyTag(ITaggable)
protected virtual void ApplyTag(ITaggable resource)
Parameters
resource
ITaggable
Remove(Construct, string, ITagProps?)
(deprecated) DEPRECATED: remove tags to the node of a construct and all its the taggable children.
[Obsolete("use `Tags.of(scope).remove()`")]
public static void Remove(Construct scope, string key, ITagProps? props = null)
Parameters
Remarks
Stability: Deprecated
Visit(IConstruct)
All aspects can visit an IConstruct.
public virtual void Visit(IConstruct construct)
Parameters
construct
IConstruct