CmdID / aws / aws imagebuilder
aws imagebuilder tag-resource
Adds a tag to a resource. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To tag a resource
The following tag-resource example adds and tags a resource to EC2 Image Builder using a JSON file.
aws imagebuilder tag-resource --cli-input-json file://tag-resource.jsonIdentifyContents of tag-resource.json:
{
"resourceArn": "arn:aws:imagebuilder:us-west-2:123456789012:image-pipeline/mywindows2016pipeline",
"tags": {
"KeyName": "KeyValue"
}
}
This command produces no output.
For more information, see Manage custom image creation in Image Builder through a repeatable pipeline process in the EC2 Image Builder Users Guide.
Options
--resource-arnThe Amazon Resource Name (ARN) of the resource that you want to tag.--tagsThe tags to apply to the resource.