listCertificatesByCA method

Future<ListCertificatesByCAResponse> listCertificatesByCA({
  1. required String caCertificateId,
  2. bool? ascendingOrder,
  3. String? marker,
  4. int? pageSize,
})

List the device certificates signed by the specified CA certificate.

Requires permission to access the ListCertificatesByCA action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException.

Parameter caCertificateId : The ID of the CA certificate. This operation will list all registered device certificate that were signed by this CA certificate.

Parameter ascendingOrder : Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.

Parameter marker : The marker for the next set of results.

Parameter pageSize : The result page size.

Implementation

Future<ListCertificatesByCAResponse> listCertificatesByCA({
  required String caCertificateId,
  bool? ascendingOrder,
  String? marker,
  int? pageSize,
}) async {
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (ascendingOrder != null)
      'isAscendingOrder': [ascendingOrder.toString()],
    if (marker != null) 'marker': [marker],
    if (pageSize != null) 'pageSize': [pageSize.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/certificates-by-ca/${Uri.encodeComponent(caCertificateId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListCertificatesByCAResponse.fromJson(response);
}