listServerCas method

Future<InstancesListServerCasResponse> listServerCas(
  1. String project,
  2. String instance, {
  3. String? $fields,
})

Lists all of the trusted Certificate Authorities (CAs) for the specified instance.

There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.

Request parameters:

project - Project ID of the project that contains the instance.

instance - Cloud SQL instance ID. This does not include the project ID.

$fields - Selector specifying which fields to include in a partial response.

Completes with a InstancesListServerCasResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<InstancesListServerCasResponse> listServerCas(
  core.String project,
  core.String instance, {
  core.String? $fields,
}) async {
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'sql/v1beta4/projects/' +
      commons.escapeVariable('$project') +
      '/instances/' +
      commons.escapeVariable('$instance') +
      '/listServerCas';

  final _response = await _requester.request(
    _url,
    'GET',
    queryParams: _queryParams,
  );
  return InstancesListServerCasResponse.fromJson(
      _response as core.Map<core.String, core.dynamic>);
}