takeoverEditLock method
- GoogleCloudIntegrationsV1alphaTakeoverEditLockRequest request,
- String integrationVersion, {
- String? $fields,
Clears the locked_by
and locked_at_timestamp
in the DRAFT version of
this integration.
It then performs the same action as the CreateDraftIntegrationVersion
(i.e., copies the DRAFT version of the integration as a SNAPSHOT and then
creates a new DRAFT version with the locked_by
set to the
user_taking_over
and the locked_at_timestamp
set to the current
timestamp). Both the locked_by
and user_taking_over
are notified via
email about the takeover. This RPC throws an exception if the integration
is not in DRAFT status or if the locked_by
and locked_at_timestamp
fields are not set.The TakeoverEdit lock is treated the same as an edit of
the integration, and hence shares ACLs with edit. Audit fields updated
include last_modified_timestamp, last_modified_by.
request
- The metadata request object.
Request parameters:
integrationVersion
- Required. The version to take over edit lock.
Format:
projects/{project}/locations/{location}/integrations/{integration}/versions/{version}
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/products/\[^/\]+/integrations/\[^/\]+/versions/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudIntegrationsV1alphaTakeoverEditLockResponse.
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<GoogleCloudIntegrationsV1alphaTakeoverEditLockResponse>
takeoverEditLock(
GoogleCloudIntegrationsV1alphaTakeoverEditLockRequest request,
core.String integrationVersion, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' +
core.Uri.encodeFull('$integrationVersion') +
':takeoverEditLock';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleCloudIntegrationsV1alphaTakeoverEditLockResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}