ListGateways - Storage Gateway

ListGateways

Lists gateways owned by an AWS account in an AWS Region specified in the request. The returned list is ordered by gateway Amazon Resource Name (ARN).

By default, the operation returns a maximum of 100 gateways. This operation supports pagination that allows you to optionally reduce the number of gateways returned in a response.

If you have more gateways than are returned in a response (that is, the response returns only a truncated list of your gateways), the response contains a marker that you can specify in your next request to fetch the next page of gateways.

Request Syntax

{ "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.

Limit

Specifies that the list of gateways returned be limited to the specified number of items.

Type: Integer

Valid Range: Minimum value of 1.

Required: No

Marker

An opaque string that indicates the position at which to begin the returned list of gateways.

Type: String

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

Required: No

Response Syntax

{ "Gateways": [ { "DeprecationDate": "string", "Ec2InstanceId": "string", "Ec2InstanceRegion": "string", "GatewayARN": "string", "GatewayId": "string", "GatewayName": "string", "GatewayOperationalState": "string", "GatewayType": "string", "HostEnvironment": "string", "HostEnvironmentId": "string", "SoftwareVersion": "string" } ], "Marker": "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.

Gateways

An array of GatewayInfo objects.

Type: Array of GatewayInfo objects

Marker

Use the marker in your next request to fetch the next set of gateways in the list. If there are no more gateways to list, this field does not appear in the response.

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

List of gateways owned by an in a specified

The following example does not specify any criteria for the returned list. Note that the request body is "{}". The response returns gateways (or up to the first 100) in the specified AWS Region owned by the AWS account.

Sample Request

POST / HTTP/1.1 Host: storagegateway.us-east-2.amazonaws.com x-amz-Date: 20120425T120000Z Authorization: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Content-type: application/x-amz-json-1.1 x-amz-target: StorageGateway_20130630.ListGateways

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Date: Wed, 25 Apr 2012 12:00:02 GMT Content-type: application/x-amz-json-1.1 Content-length: 178 { "GatewayList": [ { "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-23A4567C" } ] }

See Also

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