View a markdown version of this page

ListTagsForResource - Amazon Simple Storage Service

ListTagsForResource

Lists all tags for S3 Files resources.

Request Syntax

GET /resource-tags/resourceId?MaxResults=maxResults&NextToken=nextToken HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

maxResults

The maximum number of tags to return in a single response.

Valid Range: Minimum value of 1. Maximum value of 50.

nextToken

A pagination token returned from a previous call to continue listing tags.

resourceId

The ID or Amazon Resource Name (ARN) of the resource to list tags for.

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

Pattern: (arn:aws[-a-z]*:s3files:[0-9a-z-:]+:file-system/fs-[0-9a-f]{17,40}(/access-point/fsap-[0-9a-f]{17,40})?|fs(ap)?-[0-9a-f]{17,40})

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "tags": [ { "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.

nextToken

A pagination token to use in a subsequent request if more results are available.

Type: String

tags

An array of tags associated with the resource.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Errors

InternalServerException

An internal server error occurred. Retry your request.

errorCode

The error code associated with the exception.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource was not found. Verify that the resource exists and that you have permission to access it.

errorCode

The error code associated with the exception.

HTTP Status Code: 404

ThrottlingException

The request was throttled. Retry your request using exponential backoff.

errorCode

The error code associated with the exception.

HTTP Status Code: 429

ValidationException

The input parameters are not valid. Check the parameter values and try again.

errorCode

The error code associated with the exception.

HTTP Status Code: 400

See Also

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