patch method

Future<Operation> patch(
  1. Cluster request,
  2. String name, {
  3. String? requestId,
  4. String? updateMask,
  5. String? $fields,
})

Updates the parameters of a single Cluster.

request - The metadata request object.

Request parameters:

name - Identifier. Relative resource name of the cluster, in the format projects/{project}/locations/{location}/clusters/{cluster}. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/clusters/\[^/\]+$.

requestId - Optional. A unique identifier for this request. A random UUID is recommended. This request is idempotent if and only if request_id is provided.

updateMask - Optional. Mask specifying which fields in the cluster to update. All paths must be specified explicitly - wildcards are not supported. At least one path must be provided.

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

Completes with a Operation.

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<Operation> patch(
  Cluster request,
  core.String name, {
  core.String? requestId,
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    'requestId': ?requestId == null ? null : [requestId],
    'updateMask': ?updateMask == null ? null : [updateMask],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

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