listGatewayInstances method
Displays a list of instances associated with the Amazon Web Services account. This request returns a paginated result. You can use the filterArn property to display only the instances associated with the selected Gateway Amazon Resource Name (ARN).
May throw BadRequestException.
May throw ConflictException.
May throw InternalServerErrorException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
Parameter filterArn :
Filter the list results to display only the instances associated with the
selected Gateway ARN.
Parameter maxResults :
The maximum number of results to return per API request.
For example, you submit a ListInstances request with
MaxResults set at 5. Although 20 items match your request,
the service returns no more than the first 5 items. (The service also
returns a NextToken value that you can use to fetch the next
batch of results.)
The service might return fewer results than the MaxResults
value. If MaxResults is not included in the request, the
service defaults to pagination with a maximum of 10 results per page.
Parameter nextToken :
The token that identifies the batch of results that you want to see.
For example, you submit a ListInstances request with
MaxResults set at 5. The service returns the first batch of
results (up to 5) and a NextToken value. To see the next
batch of results, you can submit the ListInstances request a
second time and specify the NextToken value.
Implementation
Future<ListGatewayInstancesResponse> listGatewayInstances({
String? filterArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (filterArn != null) 'filterArn': [filterArn],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/v1/gateway-instances',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListGatewayInstancesResponse.fromJson(response);
}