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.

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

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 {
  ArgumentError.checkNotNull(caCertificateId, 'caCertificateId');
  _s.validateStringLength(
    'caCertificateId',
    caCertificateId,
    64,
    64,
    isRequired: true,
  );
  _s.validateStringLength(
    'marker',
    marker,
    0,
    1024,
  );
  _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);
}