@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:19:53.152Z") public class Tag extends software.amazon.jsii.JsiiObject implements IAspect
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.core.*; Tag tag = Tag.Builder.create("key", "value") .applyToLaunchedInstances(false) .excludeResourceTypes(List.of("excludeResourceTypes")) .includeResourceTypes(List.of("includeResourceTypes")) .priority(123) .build();
Modifier and Type | Class and Description |
---|---|
static class |
Tag.Builder
A fluent builder for
Tag . |
IAspect.Jsii$Default, IAspect.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Tag(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Tag(software.amazon.jsii.JsiiObjectRef objRef) |
|
Tag(java.lang.String key,
java.lang.String value) |
|
Tag(java.lang.String key,
java.lang.String value,
TagProps props) |
Modifier and Type | Method and Description |
---|---|
static void |
add(Construct scope,
java.lang.String key,
java.lang.String value)
Deprecated.
use `Tags.of(scope).add()`
|
static void |
add(Construct scope,
java.lang.String key,
java.lang.String value,
TagProps props)
Deprecated.
use `Tags.of(scope).add()`
|
protected void |
applyTag(ITaggable resource) |
java.lang.String |
getKey()
The string key for the tag.
|
protected TagProps |
getProps() |
java.lang.String |
getValue()
The string value of the tag.
|
static void |
remove(Construct scope,
java.lang.String key)
Deprecated.
use `Tags.of(scope).remove()`
|
static void |
remove(Construct scope,
java.lang.String key,
TagProps props)
Deprecated.
use `Tags.of(scope).remove()`
|
void |
visit(IConstruct construct)
All aspects can visit an IConstruct.
|
protected Tag(software.amazon.jsii.JsiiObjectRef objRef)
protected Tag(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Tag(java.lang.String key, java.lang.String value, TagProps props)
key
- This parameter is required.value
- This parameter is required.props
- public Tag(java.lang.String key, java.lang.String value)
key
- This parameter is required.value
- This parameter is required.@Deprecated public static void add(Construct scope, java.lang.String key, java.lang.String value, TagProps props)
scope
- This parameter is required.key
- This parameter is required.value
- This parameter is required.props
- @Deprecated public static void add(Construct scope, java.lang.String key, java.lang.String value)
scope
- This parameter is required.key
- This parameter is required.value
- This parameter is required.@Deprecated public static void remove(Construct scope, java.lang.String key, TagProps props)
scope
- This parameter is required.key
- This parameter is required.props
- @Deprecated public static void remove(Construct scope, java.lang.String key)
scope
- This parameter is required.key
- This parameter is required.protected void applyTag(ITaggable resource)
resource
- This parameter is required.public void visit(IConstruct construct)
public java.lang.String getKey()
protected TagProps getProps()
public java.lang.String getValue()