getListsMetadata method
Gets the metadata of either all the lists under the account or the specified list.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of objects to return for the request.
Parameter name :
The name of the list.
Parameter nextToken :
The next token for the subsequent request.
Implementation
Future<GetListsMetadataResult> getListsMetadata({
int? maxResults,
String? name,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
5,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.GetListsMetadata'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (name != null) 'name': name,
if (nextToken != null) 'nextToken': nextToken,
},
);
return GetListsMetadataResult.fromJson(jsonResponse.body);
}