getLatestRecoveryTime method

Future<SqlInstancesGetLatestRecoveryTimeResponse> getLatestRecoveryTime(
  1. String project,
  2. String instance, {
  3. String? location,
  4. String? sourceInstanceDeletionTime,
  5. String? $fields,
})

Get Latest Recovery Time for a given instance.

Request parameters:

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

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

location - Optional. Region of the Cloud SQL instance.

sourceInstanceDeletionTime - The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.

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

Completes with a SqlInstancesGetLatestRecoveryTimeResponse.

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<SqlInstancesGetLatestRecoveryTimeResponse> getLatestRecoveryTime(
  core.String project,
  core.String instance, {
  core.String? location,
  core.String? sourceInstanceDeletionTime,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'location': ?location == null ? null : [location],
    'sourceInstanceDeletionTime': ?sourceInstanceDeletionTime == null
        ? null
        : [sourceInstanceDeletionTime],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'v1/projects/' +
      commons.escapeVariable('$project') +
      '/instances/' +
      commons.escapeVariable('$instance') +
      '/getLatestRecoveryTime';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return SqlInstancesGetLatestRecoveryTimeResponse.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}