updateCacheConfig method

Future<GoogleLongrunningOperation> updateCacheConfig(
  1. GoogleCloudAiplatformV1CacheConfig request,
  2. String name, {
  3. String? updateMask,
  4. String? $fields,
})

Updates a cache config.

request - The metadata request object.

Request parameters:

name - Identifier. Name of the cache config. Format: - projects/{project}/cacheConfig. Value must have pattern ^projects/\[^/\]+/cacheConfig$.

updateMask - Optional. The list of fields of cache_config to update. Supported paths are disable_cache, retention_config (and its subfields such as retention_config.retention_type), and the special value *; any other path returns INVALID_ARGUMENT. Fields not covered by the mask keep their stored value. If the mask is omitted, it is treated as an implied mask covering the fields populated in cache_config, so updating one field never clears another. retention_config is covered only when the request carries it. disable_cache is always covered: it is a bare bool, so the server cannot tell a request that omits it from one that sets it to false. * requests full replacement of the resource: every settable field is written from the request, clearing retention_config when the request omits it. It cannot be combined with other paths. Prefer naming fields explicitly -- a caller that sends * without knowing about a field added to CacheConfig later would silently reset that field.

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

Completes with a GoogleLongrunningOperation.

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<GoogleLongrunningOperation> updateCacheConfig(
  GoogleCloudAiplatformV1CacheConfig request,
  core.String name, {
  core.String? updateMask,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    '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 GoogleLongrunningOperation.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}