listWorkerConfigurations method

Future<ListWorkerConfigurationsResponse> listWorkerConfigurations({
  1. int? maxResults,
  2. String? namePrefix,
  3. String? nextToken,
})

Returns a list of all of the worker configurations in this account and Region.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter maxResults : The maximum number of worker configurations to list in one response.

Parameter namePrefix : Lists worker configuration names that start with the specified text string.

Parameter nextToken : If the response of a ListWorkerConfigurations operation is truncated, it will include a NextToken. Send this NextToken in a subsequent request to continue listing from where the previous operation left off.

Implementation

Future<ListWorkerConfigurationsResponse> listWorkerConfigurations({
  int? maxResults,
  String? namePrefix,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (namePrefix != null) 'namePrefix': [namePrefix],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v1/worker-configurations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListWorkerConfigurationsResponse.fromJson(response);
}