updateSecurityMarks method
- SecurityMarks request,
- String name, {
- String? startTime,
- String? updateMask,
- String? $fields,
Updates security marks.
request
- The metadata request object.
Request parameters:
name
- The relative resource name of the SecurityMarks. See:
https://cloud.google.com/apis/design/resource_names#relative_resource_name
Examples:
"organizations/{organization_id}/assets/{asset_id}/securityMarks"
"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks".
Value must have pattern
^folders/\[^/\]+/sources/\[^/\]+/findings/\[^/\]+/securityMarks$
.
startTime
- The time at which the updated SecurityMarks take effect. If
not set uses current server time. Updates will be applied to the
SecurityMarks that are active immediately preceding this time. Must be
earlier or equal to the server time.
updateMask
- The FieldMask to use when updating the security marks
resource. The field mask must not contain duplicate fields. If empty or
set to "marks", all marks will be replaced. Individual marks can be
updated using "marks.".
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SecurityMarks.
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<SecurityMarks> updateSecurityMarks(
SecurityMarks request,
core.String name, {
core.String? startTime,
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (startTime != null) 'startTime': [startTime],
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return SecurityMarks.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}