ListFileShares - Storage Gateway
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ListFileShares

Gets a list of the file shares for a specific S3 File Gateway, or the list of file shares that belong to the calling Amazon Web Services account. This operation is only supported for S3 File Gateways.

Request Syntax

{ "GatewayARN": "string", "Limit": number, "Marker": "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.

GatewayARN

The Amazon Resource Name (ARN) of the gateway whose file shares you want to list. If this field is not present, all file shares under your account are listed.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: No

Limit

The maximum number of file shares to return in the response. The value must be an integer with a value greater than zero. Optional.

Type: Integer

Valid Range: Minimum value of 1.

Required: No

Marker

Opaque pagination token returned from a previous ListFileShares operation. If present, Marker specifies where to continue the list from after a previous call to ListFileShares. Optional.

Type: String

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

Required: No

Response Syntax

{ "FileShareInfoList": [ { "FileShareARN": "string", "FileShareId": "string", "FileShareStatus": "string", "FileShareType": "string", "GatewayARN": "string" } ], "Marker": "string", "NextMarker": "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.

FileShareInfoList

An array of information about the S3 File Gateway's file shares.

Type: Array of FileShareInfo objects

Marker

If the request includes Marker, the response returns that value in this field.

Type: String

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

NextMarker

If a value is present, there are more file shares to return. In a subsequent request, use NextMarker as the value for Marker to retrieve the next set of file shares.

Type: String

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

Errors

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

InternalServerError

An internal server error has occurred during the request. For more information, see the error and message fields.

HTTP Status Code: 400

InvalidGatewayRequestException

An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

HTTP Status Code: 400

Examples

Get a list of file shares for a specific S3 File Gateway.

In the following request, you get information about the first file share exposed by a S3 File Gateway; the Limit field restricts the number of file share descriptions returned. To get the remaining file share descriptions, use the NextMarker field value in the response JSON as the value for Marker in subsequent calls to ListFileShares.

Sample Request

{ "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-xxxxxxx", "Limit": "1" }

Sample Response

{ "FileShareInfos": [ { "FileShareARN": "arn:aws:storagegateway:us-east-2:111122223333:share/share-XXXXXXXX", "FileShareId": "share-XXXXXXXX", "FileShareStatus": "AVAILABLE", "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-YYYYYYYY" } ], "NextMarker": "c2hhcmUtMUU0MjIwNzU=" }

See Also

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