run method

Future<Operation> run(
  1. RunPipelineRequest request,
  2. String parent, {
  3. String? $fields,
})

Runs a pipeline.

The returned Operation's metadata field will contain a google.cloud.lifesciences.v2beta.Metadata object describing the status of the pipeline execution. The response field will contain a google.cloud.lifesciences.v2beta.RunPipelineResponse object if the pipeline completes successfully. Note: Before you can use this method, the Life Sciences Service Agent must have access to your project. This is done automatically when the Cloud Life Sciences API is first enabled, but if you delete this permission you must disable and re-enable the API to grant the Life Sciences Service Agent the required permissions. Authorization requires the following Google IAM permission: * lifesciences.workflows.run

request - The metadata request object.

Request parameters:

parent - The project and location that this request should be executed against. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

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

Completes with a Operation.

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<Operation> run(
  RunPipelineRequest request,
  core.String parent, {
  core.String? $fields,
}) async {
  final _body = convert.json.encode(request.toJson());
  final _queryParams = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final _url = 'v2beta/' + core.Uri.encodeFull('$parent') + '/pipelines:run';

  final _response = await _requester.request(
    _url,
    'POST',
    body: _body,
    queryParams: _queryParams,
  );
  return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
}