Tagging AWS App Monetization resources
A tag is a label that you assign to an AWS resource. Each tag consists of a key and a value. You can use tags to organize your AWS App Monetization resources and to control access to them with IAM policies.
You can manage tags with the AWS App Monetization API or the AWS CLI. The console doesn't show tags yet.
Resources that you can tag
You can tag the following AWS App Monetization resources. Identify a resource by its ARN.
| Resource | ARN format |
|---|---|
App |
|
Pricing plan |
|
Metric |
|
One-time price |
|
Tag restrictions
The following restrictions apply to tags on AWS App Monetization resources:
-
A resource can have at most 50 tags. A request can add at most 50 tags or remove at most 50 tag keys.
-
A tag key is 1 to 128 characters long. A tag value is 0 to 256 characters long.
-
Keys and values can contain letters, numbers, spaces, and the following characters:
_ . : / = + - @ -
A tag key can't begin with
aws:in any combination of uppercase and lowercase letters. This prefix is reserved for AWS use. -
One request can't contain tag keys that differ only in letter case, such as
Teamandteam.
Working with tags
You can add tags when you create a resource, and add, remove, and list tags on an existing resource. The following table lists the AWS App Monetization API operations that you use.
| Task | API operation |
|---|---|
Add tags when you create a resource |
Use the |
Add tags or change the value of an existing tag |
|
Remove tags |
|
List the tags on a resource |
|
For details about each operation, see the AWS App Monetization API Reference.
The following AWS CLI command adds two tags to an existing app. In the
command, replace 111122223333 with your account ID and
01a1EXAMPLEAPPID7f3e2b1c with the ID of your app.
PROMPT>aws appmonetization tag-resource \ --region us-east-2 \ --resource-arn arn:aws:appmonetization:us-east-2:111122223333:apps/01a1EXAMPLEAPPID7f3e2b1c \ --tags Team=payments,Environment=production
The command uses the following parameters:
-
--region– The AWS Region of the app. -
--resource-arn– The ARN of the resource to tag. -
--tags– The tags to add, askey=valuepairs separated by commas. ReplaceTeam=payments,Environment=productionwith your own tag keys and values.
The following AWS CLI command creates an app with a tag. In the command,
replace app-name, shown in italics, with the name of your
app.
PROMPT>aws appmonetization create-app \ --region us-east-2 \ --nameapp-name\ --tags Team=payments
Using tags to control access
You can use tags in the condition element of an IAM policy to control access to AWS App Monetization resources. For the condition keys that AWS App Monetization supports, see ABAC with AWS App Monetization. For an example policy, see Deny deleting apps tagged as production.