# EBSTagSpecification

Tag Specification for EBS volume.

- Source: [`aws-ecs/lib/base/service-managed-volume.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/base/service-managed-volume.ts#L147)
- Type last changed: v2.122.0 · 18 Jan 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const eBSTagSpecification: ecs.EBSTagSpecification = {
  propagateTags: ecs.EbsPropagatedTagSource.SERVICE,
  tags: {
    tagsKey: 'tags',
  },
};
```

Python:

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

e_bs_tag_specification = ecs.EBSTagSpecification(
    propagate_tags=ecs.EbsPropagatedTagSource.SERVICE,
    tags={
        "tags_key": "tags"
    }
)
```

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.services.ecs.*;

EBSTagSpecification eBSTagSpecification = EBSTagSpecification.builder()
        .propagateTags(EbsPropagatedTagSource.SERVICE)
        .tags(Map.of(
                "tagsKey", "tags"))
        .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.AWS.ECS;

var eBSTagSpecification = new EBSTagSpecification {
    PropagateTags = EbsPropagatedTagSource.SERVICE,
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
```

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

eBSTagSpecification := &EBSTagSpecification{
	PropagateTags: awscdk.Aws_ecs.EbsPropagatedTagSource_SERVICE,
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}
```

## Properties

- `propagateTags`: [EbsPropagatedTagSource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.EbsPropagatedTagSource.html) = undefined — Specifies whether to propagate the tags from the task definition or the service to the task.

  Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION

- `tags`: { [key: string]: string } — The tags to apply to the volume.

  **Default:** No tags
