listLabelGroups method
Returns a list of the label groups.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter labelGroupNameBeginsWith :
The beginning of the name of the label groups to be listed.
Parameter maxResults :
Specifies the maximum number of label groups to list.
Parameter nextToken :
An opaque pagination token indicating where to continue the listing of
label groups.
Implementation
Future<ListLabelGroupsResponse> listLabelGroups({
String? labelGroupNameBeginsWith,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
500,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AWSLookoutEquipmentFrontendService.ListLabelGroups'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (labelGroupNameBeginsWith != null)
'LabelGroupNameBeginsWith': labelGroupNameBeginsWith,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListLabelGroupsResponse.fromJson(jsonResponse.body);
}