ListTagsForResource, TagResource, UntagResource
URI
/tags/
ResourceArn
HTTP methods
GET
Operation ID: ListTagsForResource
Lists the tags for a resource.
Name | Type | Required | Description |
---|---|---|---|
ResourceArn | String | True | The Amazon Resource Name (ARN) for the resource that's tagged. |
Status code | Response model | Description |
---|---|---|
200 | ListTagsForResourceResponse | 200 response - Success. |
400 | ValidationException | 400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you used parameters together incorrectly. |
404 | ResourceNotFoundException | 404 response - MalformedQueryString. The query string contains a syntax error or resource not found. |
500 | InternalServerException | 500 response - InternalServiceError. Temporary service error. Retry the request. |
POST
Operation ID: TagResource
Adds a tag to a resource.
Name | Type | Required | Description |
---|---|---|---|
ResourceArn | String | True | The Amazon Resource Name (ARN) for the resource that's tagged. |
Status code | Response model | Description |
---|---|---|
200 | TagResourceResponse | 200 response - Success. |
400 | ValidationException | 400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you used parameters together incorrectly. |
404 | ResourceNotFoundException | 404 response - MalformedQueryString. The query string contains a syntax error or resource not found. |
500 | InternalServerException | 500 response - InternalServiceError. Temporary service error. Retry the request. |
DELETE
Operation ID: UntagResource
Removes a tag from a resource.
Name | Type | Required | Description |
---|---|---|---|
ResourceArn | String | True | The Amazon Resource Name (ARN) for the resource that's tagged. |
Name | Type | Required | Description |
---|---|---|---|
TagKeys | String | True | Keys for the tags to be removed. |
Status code | Response model | Description |
---|---|---|
200 | UntagResourceResponse | 200 response - Success. |
400 | ValidationException | 400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you used parameters together incorrectly. |
404 | ResourceNotFoundException | 404 response - MalformedQueryString. The query string contains a syntax error or resource not found. |
500 | InternalServerException | 500 response - InternalServiceError. Temporary service error. Retry the request. |
OPTIONS
Name | Type | Required | Description |
---|---|---|---|
ResourceArn | String | True | The Amazon Resource Name (ARN) for the resource that's tagged. |
Status code | Response model | Description |
---|---|---|
200 | None | Default response for CORS method |
Schemas
Request bodies
Response bodies
{ }
{ }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
Properties
InternalServerException
500 response - InternalServiceError. Temporary service error. Retry the request.
Property | Type | Required | Description |
---|---|---|---|
message | string | True |
ListTagsForResourceResponse
The result of a successful ListTagsForResource
request.
Property | Type | Required | Description |
---|---|---|---|
Tags | Array of type Tag | False | The tags associated with the resource. |
ResourceNotFoundException
404 response - MalformedQueryString. The query string contains a syntax error or resource not found.
Property | Type | Required | Description |
---|---|---|---|
message | string | True |
Tag
A tag that you add to a resource.
Property | Type | Required | Description |
---|---|---|---|
Key | string MinLength: 1 MaxLength: 128 | True | The key for a tag. |
Value | string MaxLength: 256 | True | The value for a tag. |
TagResourceRequest
Request to tag a resource.
Property | Type | Required | Description |
---|---|---|---|
Tags | Array of type Tag | True | The tags associated with the resource. |
TagResourceResponse
The result of a successful TagResource
request.
UntagResourceResponse
The result of a successful UntagResource
request.
ValidationException
400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you might have used parameters together incorrectly.
Property | Type | Required | Description |
---|---|---|---|
message | string | True |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: