aws-cdk-lib.aws_ec2.CfnCapacityReservationFleet.TagSpecificationProperty

interface TagSpecificationProperty

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

The tags to apply to a resource when the resource is being created.

When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

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.CfnCapacityReservationFleet.TagSpecificationProperty = {
  resourceType: 'resourceType',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
resourceType?stringThe type of resource to tag on creation. Specify capacity-reservation-fleet .
tags?CfnTag[]The tags to apply to the resource.

resourceType?

Type: string (optional)

The type of resource to tag on creation. Specify capacity-reservation-fleet .

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


tags?

Type: CfnTag[] (optional)

The tags to apply to the resource.