updateSharedFlowRevision method

Future<GoogleCloudApigeeV1SharedFlowRevision> updateSharedFlowRevision(
  1. GoogleApiHttpBody request,
  2. String name, {
  3. bool? validate,
  4. String? $fields,
})

Updates a shared flow revision.

This operation is only allowed on revisions which have never been deployed. After deployment a revision becomes immutable, even if it becomes undeployed. The payload is a ZIP-formatted shared flow. Content type must be either multipart/form-data or application/octet-stream.

request - The metadata request object.

Request parameters:

name - Required. The name of the shared flow revision to update. Must be of the form: organizations/{organization_id}/sharedflows/{shared_flow_id}/revisions/{revision_id} Value must have pattern ^organizations/\[^/\]+/sharedflows/\[^/\]+/revisions/\[^/\]+$.

validate - Ignored. All uploads are validated regardless of the value of this field. It is kept for compatibility with existing APIs. Must be true or false if provided.

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

Completes with a GoogleCloudApigeeV1SharedFlowRevision.

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<GoogleCloudApigeeV1SharedFlowRevision> updateSharedFlowRevision(
  GoogleApiHttpBody request,
  core.String name, {
  core.bool? validate,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (validate != null) 'validate': ['${validate}'],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'POST',
    body: body_,
    queryParams: queryParams_,
  );
  return GoogleCloudApigeeV1SharedFlowRevision.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}