aws-cdk-lib.aws_ec2.CfnLaunchTemplate.TagSpecificationProperty

interface TagSpecificationProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnLaunchTemplate.TagSpecificationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnLaunchTemplate_TagSpecificationProperty
Javasoftware.amazon.awscdk.services.ec2.CfnLaunchTemplate.TagSpecificationProperty
Pythonaws_cdk.aws_ec2.CfnLaunchTemplate.TagSpecificationProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnLaunchTemplate » TagSpecificationProperty

Specifies the tags to apply to a resource when the resource is created for the launch template.

TagSpecification is a property type of TagSpecifications . TagSpecifications is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const tagSpecificationProperty: ec2.CfnLaunchTemplate.TagSpecificationProperty = {
  resourceType: 'resourceType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
resourceType?stringThe type of resource to tag.
tags?CfnTag[]The tags to apply to the resource.

resourceType?

Type: string (optional)

The type of resource to tag.

The Valid Values are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: instance | volume | elastic-gpu | network-interface | spot-instances-request

To tag a resource after it has been created, see CreateTags .


tags?

Type: CfnTag[] (optional)

The tags to apply to the resource.