CmdID

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

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.jsonIdentify

Contents 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

2 in the AWS CLI reference
--resource-arnThe Amazon Resource Name (ARN) of the resource that you want to tag.
--tagsThe tags to apply to the resource.