listAcmeAccounts method

Future<ListAcmeAccountsResponse> listAcmeAccounts({
  1. required String acmeEndpointArn,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves a list of ACME accounts registered with the specified ACME endpoint. ACME accounts are created when clients use external account binding credentials to register.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter acmeEndpointArn : The Amazon Resource Name (ARN) of the ACME endpoint.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : A token for pagination.

Implementation

Future<ListAcmeAccountsResponse> listAcmeAccounts({
  required String acmeEndpointArn,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CertificateManager.ListAcmeAccounts'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AcmeEndpointArn': acmeEndpointArn,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
    endpoint: _resolveEndpoint(
      serviceType: 'ACM-ACME',
    ),
  );

  return ListAcmeAccountsResponse.fromJson(jsonResponse.body);
}