Skip to content
v2.276.0

Tag Struct ​

Metadata Entry spec for stack tag.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const tag: cloud_assembly_schema.Tag = {
  key: 'key',
  value: 'value',
};
python
from aws_cdk.cloud_assembly_schema import Tag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cloud_assembly_schema

tag = Tag(
    key="key",
    value="value"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;

Tag tag = Tag.builder()
        .key("key")
        .value("value")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Cloud_assembly_schema;

var tag = new Tag {
    Key = "key",
    Value = "value"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

tag := &Tag{
	Key: jsii.String("key"),
	Value: jsii.String("value"),
}

Properties ​

keystringkeystrkeyStringKeystringKey*stringrequired#
Tag key.
notes

(In the actual file on disk this will be cased as "Key", and the structure is patched to match this structure upon loading: https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)

valuestringvaluestrvalueStringValuestringValue*stringrequired#
Tag value.
notes

(In the actual file on disk this will be cased as "Value", and the structure is patched to match this structure upon loading: https://github.com/aws/aws-cdk/blob/4aadaa779b48f35838cccd4e25107b2338f05547/packages/%40aws-cdk/cloud-assembly-schema/lib/manifest.ts#L137)