Adds or overwrites only the specified tags for the specified Amazon EC2 resource or
resources. When you specify an existing tag key, the value is overwritten with
the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and
optional value. Tag keys must be unique per resource.
Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.
For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide. For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, CreateTagsCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, CreateTagsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new CreateTagsCommand(input); const response = await client.send(command);
CreateTagsCommandInput for command's
input
shape.CreateTagsCommandOutput for command's
response
shape.config for EC2Client's
config
shape.