describeAccelerators method

Future<DescribeAcceleratorsResponse> describeAccelerators({
  1. List<String>? acceleratorIds,
  2. List<Filter>? filters,
  3. int? maxResults,
  4. String? nextToken,
})

Describes information over a provided set of accelerators belonging to an account.

May throw BadRequestException. May throw ResourceNotFoundException. May throw InternalServerException.

Parameter acceleratorIds : The IDs of the accelerators to describe.

Parameter filters : One or more filters. Filter names and values are case-sensitive. Valid filter names are: accelerator-types: can provide a list of accelerator type names to filter for. instance-id: can provide a list of EC2 instance ids to filter for.

Parameter maxResults : The total number of items to return in the command's output. If the total number of items available is more than the value specified, a NextToken is provided in the command's output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command. Do not use the NextToken response element directly outside of the AWS CLI.

Parameter nextToken : A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Implementation

Future<DescribeAcceleratorsResponse> describeAccelerators({
  List<String>? acceleratorIds,
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  final $payload = <String, dynamic>{
    if (acceleratorIds != null) 'acceleratorIds': acceleratorIds,
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/describe-accelerators',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeAcceleratorsResponse.fromJson(response);
}