The following code examples show how to use TagResource
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code examples:
- AWS CLI
-
Example 1: To tag a data store
The following
tag-resource
code examples tags a data store.aws medical-imaging tag-resource \ --resource-arn
"arn:aws:medical-imaging:us-east-1:123456789012:datastore/12345678901234567890123456789012"
\ --tags '{"Deployment":"Development"}
'This command produces no output.
Example 2: To tag an image set
The following
tag-resource
code examples tags an image set.aws medical-imaging tag-resource \ --resource-arn
"arn:aws:medical-imaging:us-east-1:123456789012:datastore/12345678901234567890123456789012/imageset/18f88ac7870584f58d56256646b4d92b"
\ --tags '{"Deployment":"Development"}
'This command produces no output.
-
For API details, see TagResource
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.