Menu
AWS Systems Manager
API Reference (API Version 2014-11-06)

ListTagsForResource

Returns a list of the tags assigned to the specified resource.

Request Syntax

{ "ResourceId": "string", "ResourceType": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ResourceId

The resource ID for which you want to see a list of tags.

Type: String

Required: Yes

ResourceType

Returns a list of tags for a specific resource type.

Type: String

Valid Values: Document | ManagedInstance | MaintenanceWindow | Parameter | PatchBaseline

Required: Yes

Response Syntax

{ "TagList": [ { "Key": "string", "Value": "string" } ] }

Response Elements

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

The following data is returned in JSON format by the service.

TagList

A list of tags.

Type: Array of Tag objects

Errors

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

InternalServerError

An error occurred on the server side.

HTTP Status Code: 400

InvalidResourceId

The resource ID is not valid. Verify that you entered the correct ID and try again.

HTTP Status Code: 400

InvalidResourceType

The resource type is not valid. For example, if you are attempting to tag an instance, the instance must be a registered, managed instance.

HTTP Status Code: 400

See Also

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