Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Network.AWS.KMS.TagResource
Description
Adds or overwrites one or more tags for the specified customer master key (CMK). You cannot perform this operation on a CMK in a different AWS account.
Each tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.
You cannot use the same tag key more than once per CMK. For example, consider a CMK with one tag whose tag key is Purpose
and tag value is Test
. If you send a TagResource
request for this CMK with a tag key of Purpose
and a tag value of Prod
, it does not create a second tag. Instead, the original tag is overwritten with the new tag value.
For information about the rules that apply to tag keys and tag values, see User-Defined Tag Restrictions in the AWS Billing and Cost Management User Guide .
Synopsis
Creating a Request
Arguments
:: Text | |
-> TagResource |
Creates a value of TagResource
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
trKeyId
- A unique identifier for the CMK you are tagging. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:1234abcd-12ab-34cd-56ef-1234567890ab
* Key ARN:arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a CMK, useListKeys
orDescribeKey
.trTags
- One or more tags. Each tag consists of a tag key and a tag value.
data TagResource Source #
See: tagResource
smart constructor.
Instances
Request Lenses
trKeyId :: Lens' TagResource Text Source #
A unique identifier for the CMK you are tagging. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
* Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a CMK, use ListKeys
or DescribeKey
.
trTags :: Lens' TagResource [Tag] Source #
One or more tags. Each tag consists of a tag key and a tag value.
Destructuring the Response
tagResourceResponse :: TagResourceResponse Source #
Creates a value of TagResourceResponse
with the minimum fields required to make a request.
data TagResourceResponse Source #
See: tagResourceResponse
smart constructor.