View a markdown version of this page

ListGateways - Amazon Elastic Container Service

ListGateways

Returns a list of gateways in your account. You can filter the results by gateway name and status. The results are paginated. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

Request Syntax

{ "maxResults": number, "names": [ "string" ], "nextToken": "string", "status": [ "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.

maxResults

The maximum number of gateway results that ListGateways returns in a single page. The default is 100.

Type: Integer

Required: No

names

The gateway names to filter the results by. You can specify up to 10 names.

Type: Array of strings

Required: No

nextToken

The nextToken value returned from a previous paginated ListGateways request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results.

Type: String

Required: No

status

The gateway statuses to filter the results by.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 5 items.

Valid Values: ACTIVE | UPDATE_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_FAILED | DELETED

Required: No

Response Syntax

{ "gateways": [ { "createdAt": number, "gatewayArn": "string", "name": "string", "status": "string" } ], "nextToken": "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

The list of gateways that match the request.

Type: Array of GatewaySummary objects

nextToken

The nextToken value to include in a future ListGateways request. When the results of a ListGateways request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Type: String

Errors

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

AccessDeniedException

You don't have authorization to perform the requested action.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ClientException

These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

InvalidParameterException

The specified parameter isn't valid. Review the available parameters for the API request.

For more information about service event errors, see Amazon ECS service event messages.

message

Message that describes the cause of the exception.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

message

Message that describes the cause of the exception.

HTTP Status Code: 500

UnsupportedFeatureException

The specified task isn't supported in this Region.

message

Message that describes the cause of 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: