listCertificates method
Returns a list of the current certificates that have been imported into
Transfer Family. If you want to limit the results to a certain number,
supply a value for the MaxResults parameter. If you ran the
command previously and received a value for the NextToken
parameter, you can supply that value to continue listing certificates from
where you left off.
May throw InternalServiceError.
May throw InvalidNextTokenException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter maxResults :
The maximum number of items to return.
Parameter nextToken :
When you can get additional results from the ListCertificates
call, a NextToken parameter is returned in the output. You
can then pass in a subsequent command to the NextToken
parameter to continue listing additional certificates.
Implementation
Future<ListCertificatesResponse> listCertificates({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.ListCertificates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListCertificatesResponse.fromJson(jsonResponse.body);
}