TagResource - AWS Payment Cryptography Control Plane

TagResource

Adds or edits tags on an AWS Payment Cryptography key.

Note

Tagging or untagging an AWS Payment Cryptography key can allow or deny permission to the key.

Each tag consists of a tag key and a tag value, both of which are case-sensitive strings. The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag key and a new tag value. You can also add tags to an AWS Payment Cryptography key when you create it with CreateKey.

Cross-account use: This operation can't be used across different AWS accounts.

Related operations:

Request Syntax

{ "ResourceArn": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

The request accepts the following data in JSON format.

ResourceArn

The KeyARN of the key whose tags are being updated.

Type: String

Length Constraints: Minimum length of 70. Maximum length of 150.

Pattern: arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:key/[0-9a-zA-Z]{16,64}

Required: Yes

Tags

One or more tags. Each tag consists of a tag key and a tag value. The tag value can be an empty (null) string. You can't have more than one tag on an AWS Payment Cryptography key with the same tag key. If you specify an existing tag key with a different tag value, AWS Payment Cryptography replaces the current tag value with the new one.

Important

Don't include personal, confidential or sensitive information in this field. This field may be displayed in plaintext in AWS CloudTrail logs and other output.

To use this parameter, you must have TagResource permission in an IAM policy.

Important

Don't include personal, confidential or sensitive information in this field. This field may be displayed in plaintext in AWS CloudTrail logs and other output.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400

ConflictException

This request can cause an inconsistent state for the resource.

HTTP Status Code: 400

InternalServerException

The request processing has failed because of an unknown error, exception, or failure.

HTTP Status Code: 500

ResourceNotFoundException

The request was denied due to an invalid resource error.

HTTP Status Code: 400

ServiceQuotaExceededException

This request would cause a service quota to be exceeded.

HTTP Status Code: 400

ServiceUnavailableException

The service cannot complete the request.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400

ValidationException

The request was denied due to an invalid request error.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: