Menu
AWS Storage Gateway Service
API Reference (API Version 2013-06-30)

ListFileShares

Gets a list of the file shares for a specific file gateway, or the list of file shares that belong to the calling user account. This operation is only supported in the file gateway type.

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",
         "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 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

Example

Get a List of File Shares Exposed by a File Gateway

In the following request, you get information about the first file share exposed by a 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 AWS SDKs, see the following: