# Tag

The Tag Aspect will handle adding a tag to this node and cascading tags to children.

Extends: Tag
Implements: IAspect

- Source: [`core/lib/tag-aspect.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/tag-aspect.ts#L96)
- Type last changed: v2.81.0 · 25 May 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const tag = new cdk.Tag('key', 'value', /* all optional props */ {
  applyToLaunchedInstances: false,
  excludeResourceTypes: ['excludeResourceTypes'],
  includeResourceTypes: ['includeResourceTypes'],
  priority: 123,
});
```

## Initializer

```ts
new Tag(key: string, value: string, props?: TagProps)
```

## Properties

- `key`: string — The string key for the tag.

- `value`: string — The string value of the tag.

## Methods

- `visit(construct: IConstruct): void` — All aspects can visit an IConstruct.
