listComponents method

Future<ListComponentsResponse> listComponents({
  1. bool? byName,
  2. List<Filter>? filters,
  3. int? maxResults,
  4. String? nextToken,
  5. Ownership? owner,
})

Returns the list of component build versions for the specified semantic version.

May throw ServiceException. May throw ClientException. May throw ServiceUnavailableException. May throw InvalidRequestException. May throw InvalidPaginationTokenException. May throw ForbiddenException. May throw CallRateLimitExceededException.

Parameter byName : Returns the list of component build versions for the specified semantic version.

Parameter filters : The filters.

Parameter maxResults : The maximum items to return in a request.

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

Parameter owner : The owner defines which components you want to list. By default, this request will only show components owned by your account. You can use this field to specify if you want to view components owned by yourself, by Amazon, or those components that have been shared with you by other customers.

Implementation

Future<ListComponentsResponse> listComponents({
  bool? byName,
  List<Filter>? filters,
  int? maxResults,
  String? nextToken,
  Ownership? owner,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    65535,
  );
  final $payload = <String, dynamic>{
    if (byName != null) 'byName': byName,
    if (filters != null) 'filters': filters,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (owner != null) 'owner': owner.toValue(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/ListComponents',
    exceptionFnMap: _exceptionFns,
  );
  return ListComponentsResponse.fromJson(response);
}