Class Tags
Manages AWS tags for all resources within a construct scope.
public class Tags : DeputyBase
- Inheritance
-
Tags
Examples
Mesh mesh;
Service service;
var node = new VirtualNode(this, "node", new VirtualNodeProps {
Mesh = mesh,
ServiceDiscovery = ServiceDiscovery.CloudMap(service),
Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
Port = 8080,
HealthCheck = HealthCheck.Http(new HttpHealthCheckOptions {
HealthyThreshold = 3,
Interval = Duration.Seconds(5),
Path = "/ping",
Timeout = Duration.Seconds(2),
UnhealthyThreshold = 2
}),
Timeout = new HttpTimeout {
Idle = Duration.Seconds(5)
}
}) },
BackendDefaults = new BackendDefaults {
TlsClientPolicy = new TlsClientPolicy {
Validation = new TlsValidation {
Trust = TlsValidationTrust.File("/keys/local_cert_chain.pem")
}
}
},
AccessLog = AccessLog.FromFilePath("/dev/stdout")
});
Tags.Of(node).Add("Environment", "Dev");
Remarks
ExampleMetadata: infused
Methods
Add(string, string, ITagProps?)
add tags to the node of a construct and all its the taggable children.
public virtual void Add(string key, string value, ITagProps? props = null)
Parameters
Of(IConstruct)
Returns the tags API for this scope.
public static Tags Of(IConstruct scope)
Parameters
scope
IConstructThe scope.
Returns
Remove(string, ITagProps?)
remove tags to the node of a construct and all its the taggable children.
public virtual void Remove(string key, ITagProps? props = null)