advanceRelocateBucket method

Future<void> advanceRelocateBucket(
  1. AdvanceRelocateBucketOperationRequest request,
  2. String bucket,
  3. String operationId, {
  4. String? $fields,
})

Starts asynchronous advancement of the relocate bucket operation in the case of required write downtime, to allow it to lock the bucket at the source location, and proceed with the bucket location swap.

The server makes a best effort to advance the relocate bucket operation, but success is not guaranteed.

request - The metadata request object.

Request parameters:

bucket - Name of the bucket to advance the relocate for.

operationId - ID of the operation resource.

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

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<void> advanceRelocateBucket(
  AdvanceRelocateBucketOperationRequest request,
  core.String bucket,
  core.String operationId, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'b/' +
      commons.escapeVariable('$bucket') +
      '/operations/' +
      commons.escapeVariable('$operationId') +
      '/advanceRelocateBucket';

  await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
    downloadOptions: null,
  );
}