patch method

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

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters. Completed longrunning.Operation will contain the new ACL policy object in the response field.

request - The metadata request object.

Request parameters:

name - Identifier. Full resource path of the ACL policy. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/aclPolicies/\[^/\]+$.

requestId - Optional. Idempotent request UUID.

updateMask - Optional. Mask of fields to be updated. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from AclPolicy: * rules

$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(
  AclPolicy 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>);
}