Class Tags
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Example:
Mesh mesh;
Service service;
VirtualNode node = VirtualNode.Builder.create(this, "node")
.mesh(mesh)
.serviceDiscovery(ServiceDiscovery.cloudMap(service))
.listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
.port(8080)
.healthCheck(HealthCheck.http(HttpHealthCheckOptions.builder()
.healthyThreshold(3)
.interval(Duration.seconds(5))
.path("/ping")
.timeout(Duration.seconds(2))
.unhealthyThreshold(2)
.build()))
.timeout(HttpTimeout.builder()
.idle(Duration.seconds(5))
.build())
.build())))
.backendDefaults(BackendDefaults.builder()
.tlsClientPolicy(TlsClientPolicy.builder()
.validation(TlsValidation.builder()
.trust(TlsValidationTrust.file("/keys/local_cert_chain.pem"))
.build())
.build())
.build())
.accessLog(AccessLog.fromFilePath("/dev/stdout"))
.build();
Tags.of(node).add("Environment", "Dev");
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd tags to the node of a construct and all its the taggable children.voidAdd tags to the node of a construct and all its the taggable children.static Tagsof(software.constructs.IConstruct scope) Returns the tags API for this scope.voidremove tags to the node of a construct and all its the taggable children.voidremove tags to the node of a construct and all its the taggable children.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Tags
protected Tags(software.amazon.jsii.JsiiObjectRef objRef) -
Tags
protected Tags(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
of
Returns the tags API for this scope.- Parameters:
scope- The scope. This parameter is required.
-
add
@Stability(Stable) public void add(@NotNull String key, @NotNull String value, @Nullable TagProps props) Add tags to the node of a construct and all its the taggable children.Tagging and CloudFormation Stacks
If the feature flag
@aws-cdk/core:explicitStackTagsis set totrue(recommended modern behavior), Stacks will not automatically be tagged. Stack tags should be configured on Stacks directly (preferred), or you must explicitly include the resource typeaws:cdk:stackin theincludeResourceTypesarray.If the feature flag is set to
false(legacy behavior) then both Stacks and resources in the indicated scope will both be tagged by default, which leads to tags being applied twice (once in the template, and then once again automatically by CloudFormation as part of the stack deployment). That behavior leads to loss of control asexcludeResourceTypeswill prevent tags from appearing in the template, but they will still be applied to the Stack and hence CloudFormation will still apply them to the resource.- Parameters:
key- This parameter is required.value- This parameter is required.props-
-
add
Add tags to the node of a construct and all its the taggable children.Tagging and CloudFormation Stacks
If the feature flag
@aws-cdk/core:explicitStackTagsis set totrue(recommended modern behavior), Stacks will not automatically be tagged. Stack tags should be configured on Stacks directly (preferred), or you must explicitly include the resource typeaws:cdk:stackin theincludeResourceTypesarray.If the feature flag is set to
false(legacy behavior) then both Stacks and resources in the indicated scope will both be tagged by default, which leads to tags being applied twice (once in the template, and then once again automatically by CloudFormation as part of the stack deployment). That behavior leads to loss of control asexcludeResourceTypeswill prevent tags from appearing in the template, but they will still be applied to the Stack and hence CloudFormation will still apply them to the resource.- Parameters:
key- This parameter is required.value- This parameter is required.
-
remove
remove tags to the node of a construct and all its the taggable children.- Parameters:
key- This parameter is required.props-
-
remove
remove tags to the node of a construct and all its the taggable children.- Parameters:
key- This parameter is required.
-