listCertificates method
- List<
CertificateStatus> ? certificateStatuses, - Filters? includes,
- int? maxItems,
- String? nextToken,
Retrieves a list of certificate ARNs and domain names. You can request
that only certificates that match a specific status be listed. You can
also filter by specific attributes of the certificate. Default filtering
returns only RSA_2048
certificates. For more information, see
Filters.
May throw InvalidArgsException.
Parameter certificateStatuses
:
Filter the certificate list by status value.
Parameter includes
:
Filter the certificate list. For more information, see the Filters
structure.
Parameter maxItems
:
Use this parameter when paginating results to specify the maximum number
of items to return in the response. If additional items exist beyond the
number you specify, the NextToken
element is sent in the
response. Use this NextToken
value in a subsequent request to
retrieve additional items.
Parameter nextToken
:
Use this parameter only when paginating results and only in a subsequent
request after you receive a response with truncated results. Set it to the
value of NextToken
from the response you just received.
Implementation
Future<ListCertificatesResponse> listCertificates({
List<CertificateStatus>? certificateStatuses,
Filters? includes,
int? maxItems,
String? nextToken,
}) async {
_s.validateNumRange(
'maxItems',
maxItems,
1,
1000,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
10000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CertificateManager.ListCertificates'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (certificateStatuses != null)
'CertificateStatuses':
certificateStatuses.map((e) => e.toValue()).toList(),
if (includes != null) 'Includes': includes,
if (maxItems != null) 'MaxItems': maxItems,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListCertificatesResponse.fromJson(jsonResponse.body);
}