Class Tags
Manages AWS tags for all resources within a construct scope.
Inheritance
Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public class Tags : DeputyBase
Syntax (vb)
Public Class Tags
Inherits DeputyBase
Remarks
ExampleMetadata: infused
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");
Synopsis
Constructors
Tags(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Tags(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Add(String, String, ITagProps) | add tags to the node of a construct and all its the taggable children. |
Of(IConstruct) | Returns the tags API for this scope. |
Remove(String, ITagProps) | remove tags to the node of a construct and all its the taggable children. |
Constructors
Tags(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Tags(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Tags(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Tags(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
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
- key System.String
- value System.String
- props ITagProps
Of(IConstruct)
Returns the tags API for this scope.
public static Tags Of(IConstruct scope)
Parameters
- scope IConstruct
The 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)
Parameters
- key System.String
- props ITagProps