Amazon Managed Streaming for Apache Kafka
Amazon MSK API Reference

Tags

Represents the set of tags for an MSK resource. A tag is a key-value pair that you define for the cluster. Using tags is a simple yet powerful way to manage AWS resources and organize data, including billing data.

URI

/v1/tags/resourceArn

HTTP Methods

GET

Operation ID: ListTagsForResource

Returns a list of the tags associated with the specified resource.

Path Parameters

Name Type Required Description
resourceArn String True

The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.

Responses

Status Code Response Model Description
200 ListTagsForResourceResponse

Success response.

400 Error

The request isn't valid because the input is incorrect. Correct your input and then submit it again.

404 Error

The resource could not be found due to incorrect input. Correct the input, then retry the request.

500 Error

There was an unexpected internal server error. Retrying your request might resolve the issue.

POST

Operation ID: TagResource

Adds tags to the specified MSK resource.

Path Parameters

Name Type Required Description
resourceArn String True

The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.

Responses

Status Code Response Model Description
204 None

204 response

400 Error

The request isn't valid because the input is incorrect. Correct your input and then submit it again.

404 Error

The resource could not be found due to incorrect input. Correct the input, then retry the request.

500 Error

There was an unexpected internal server error. Retrying your request might resolve the issue.

DELETE

Operation ID: UntagResource

Removes the tags associated with the keys that are provided in the query.

Path Parameters

Name Type Required Description
resourceArn String True

The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.

Query Parameters

Name Type Required Description
tagKeys String True

Tag keys must be unique for a given cluster. In addition, the following restrictions apply:

  • Each tag key must be unique. If you add a tag with a key that's already in use, your new tag overwrites the existing key-value pair.

  • You can't start a tag key with aws: because this prefix is reserved for use by AWS. AWS creates tags that begin with this prefix on your behalf, but you can't edit or delete them.

  • Tag keys must be between 1 and 128 Unicode characters in length.

  • Tag keys must consist of the following characters: Unicode letters, digits, white space, and the following special characters: _ . / = + - @.

Responses

Status Code Response Model Description
204 None

204 response

400 Error

The request isn't valid because the input is incorrect. Correct your input and then submit it again.

404 Error

The resource could not be found due to incorrect input. Correct the input, then retry the request.

500 Error

There was an unexpected internal server error. Retrying your request might resolve the issue.

Schemas

Request Bodies

Example POST

{ "tags": { } }

Response Bodies

Example ListTagsForResourceResponse

{ "tags": { } }

Example Error

{ "message": "string", "invalidParameter": "string" }

Properties

Error

Returns information about an error.

Property Type Required Description
message

string

False

The description of the error.

invalidParameter

string

False

The parameter that caused the error.

ListTagsForResourceResponse

Response of listing tags for a resource.

Property Type Required Description
tags

object

True

The key-value pair for the resource tag.

TagResourceRequest

Tag a resource.

Property Type Required Description
tags

object

True

The key-value pair for the resource tag.

See Also

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

ListTagsForResource

TagResource

UntagResource