patch method
- GoogleCloudDatacatalogV1beta1PolicyTag request,
- String name, {
- String? updateMask,
- String? $fields,
Updates a policy tag.
request
- The metadata request object.
Request parameters:
name
- Output only. Resource name of this policy tag, whose format is:
"projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}".
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/taxonomies/\[^/\]+/policyTags/\[^/\]+$
.
updateMask
- The update mask applies to the resource. Only display_name,
description and parent_policy_tag can be updated and thus can be listed in
the mask. If update_mask is not provided, all allowed fields (i.e.
display_name, description and parent) will be updated. For more
information including the FieldMask
definition, see
https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
If not set, defaults to all of the fields that are allowed to update.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudDatacatalogV1beta1PolicyTag
.
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<GoogleCloudDatacatalogV1beta1PolicyTag> patch(
GoogleCloudDatacatalogV1beta1PolicyTag request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final _body = convert.json.encode(request.toJson());
final _queryParams = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta1/' + core.Uri.encodeFull('$name');
final _response = await _requester.request(
_url,
'PATCH',
body: _body,
queryParams: _queryParams,
);
return GoogleCloudDatacatalogV1beta1PolicyTag.fromJson(
_response as core.Map<core.String, core.dynamic>);
}