View a markdown version of this page

TagResource - AWS IAM CredentialBroker Control Plane

TagResource

Adds or replaces tags on a credential provider pool or a credential provider. A key that is already present on the resource has its value overwritten; keys that are not named are left alone. Takes effect immediately.

The operation is idempotent.

Request Syntax

POST /TagResource HTTP/1.1 Content-type: application/json { "resourceArn": "string", "tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

resourceArn

Amazon Resource Name of a taggable resource, either a credential provider pool or a credential provider within a pool.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1010.

Pattern: arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b):credentialbroker:[a-z0-9-]*:[0-9]{12}:credentialproviderpool/[a-z0-9]+((/credentialprovider/[a-z0-9]+)?)

Required: Yes

tags

Tags attached to a resource, as key-value pairs. Keys are unique within a resource and are case-sensitive. Use tags to categorize resources and to control access with tag-based IAM policies.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

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

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

The caller is not authorized to perform the request, or a resource the request depends on refused access. reason distinguishes a denial by this service from a denial reported by a dependency the caller configured, such as a customer-owned secret, KMS key, or external identity provider, which usually points at a permission or configuration fix outside this API.

HTTP Status Code: 403

InternalServerException

The request failed because of an unexpected error in the service. Whether the request took effect is undefined, so for a create or update, read the resource back before retrying. Retryable: the same request may succeed later.

retryAfterSeconds

The number of seconds to wait before retrying. If this field is absent, retry with exponential backoff.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource does not exist, or the caller is not permitted to know that it exists. A resource that was deleted, or that is still being created, can also be reported this way.

resourceId

The identifier of the resource that could not be found, echoed from the request.

resourceType

The type of the resource named by resourceId, when present.

HTTP Status Code: 404

ThrottlingException

The request was denied because the caller exceeded a request rate limit. Nothing was changed. Retry with exponential backoff, honoring retryAfterSeconds when it is present.

retryAfterSeconds

The number of seconds to wait before retrying. If this field is absent, retry with exponential backoff.

HTTP Status Code: 429

ValidationException

The request is not valid. The request was rejected before any change was made, so it is safe to correct the input and retry. Use reason to branch in code and message for the human-readable detail of which field or combination of fields was at fault.

HTTP Status Code: 400

See Also

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