create method

Future<GoogleCloudAiplatformV1PipelineJob> create(
  1. GoogleCloudAiplatformV1PipelineJob request,
  2. String parent, {
  3. String? pipelineJobId,
  4. String? $fields,
})

Creates a PipelineJob.

A PipelineJob will run immediately when created.

request - The metadata request object.

Request parameters:

parent - Required. The resource name of the Location to create the PipelineJob in. Format: projects/{project}/locations/{location} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

pipelineJobId - The ID to use for the PipelineJob, which will become the final component of the PipelineJob name. If not provided, an ID will be automatically generated. This value should be less than 128 characters, and valid characters are /a-z-/.

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

Completes with a GoogleCloudAiplatformV1PipelineJob.

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<GoogleCloudAiplatformV1PipelineJob> create(
  GoogleCloudAiplatformV1PipelineJob request,
  core.String parent, {
  core.String? pipelineJobId,
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pipelineJobId != null) 'pipelineJobId': [pipelineJobId],
    if ($fields != null) 'fields': [$fields],
  };

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

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