# RemoveTag

The RemoveTag Aspect will handle removing tags from this node and children.

Implements: [IAspect](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IAspect.html)

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

## Example

TypeScript:

```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 removeTag = new cdk.RemoveTag('key', /* all optional props */ {
  applyToLaunchedInstances: false,
  excludeResourceTypes: ['excludeResourceTypes'],
  includeResourceTypes: ['includeResourceTypes'],
  priority: 123,
});
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

remove_tag = cdk.RemoveTag("key",
    apply_to_launched_instances=False,
    exclude_resource_types=["excludeResourceTypes"],
    include_resource_types=["includeResourceTypes"],
    priority=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

RemoveTag removeTag = RemoveTag.Builder.create("key")
        .applyToLaunchedInstances(false)
        .excludeResourceTypes(List.of("excludeResourceTypes"))
        .includeResourceTypes(List.of("includeResourceTypes"))
        .priority(123)
        .build();
```

C# / .NET:

```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;

var removeTag = new RemoveTag("key", new TagProps {
    ApplyToLaunchedInstances = false,
    ExcludeResourceTypes = new [] { "excludeResourceTypes" },
    IncludeResourceTypes = new [] { "includeResourceTypes" },
    Priority = 123
});
```

Golang:

```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 cdk "github.com/aws/aws-cdk-go/awscdk"

removeTag := cdk.NewRemoveTag(jsii.String("key"), &TagProps{
	ApplyToLaunchedInstances: jsii.Boolean(false),
	ExcludeResourceTypes: []*string{
		jsii.String("excludeResourceTypes"),
	},
	IncludeResourceTypes: []*string{
		jsii.String("includeResourceTypes"),
	},
	Priority: jsii.Number(123),
})
```

## Initializer

TypeScript:

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

Python:

```python
RemoveTag(key: str, props: typing.Optional[TagProps] = None)
```

Java:

```java
new RemoveTag(String key, TagProps props)
```

C# / .NET:

```csharp
new RemoveTag(string key, TagProps? props = null)
```

Golang:

```go
NewRemoveTag(Key *string, Props TagProps)
```

## Properties

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

## Methods

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