get method
Returns an execution of the given name.
Request parameters:
name
- Required. Name of the execution to be retrieved. Format:
projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/workflows/\[^/\]+/executions/\[^/\]+$
.
view
- Optional. A view defining which fields should be filled in the
returned execution. The API will default to the FULL view.
Possible string values are:
- "EXECUTION_VIEW_UNSPECIFIED" : The default / unset value.
- "BASIC" : Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.
- "FULL" : Includes all data.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Execution.
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<Execution> get(
core.String name, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Execution.fromJson(response_ as core.Map<core.String, core.dynamic>);
}