create method

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

Creates an Execution associated with a MetadataStore.

request - The metadata request object.

Request parameters:

parent - Required. The resource name of the MetadataStore where the Execution should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/metadataStores/\[^/\]+$.

executionId - The {execution} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution} If not provided, the Execution's ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /a-z-/. Must be unique across all Executions in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can't view the preexisting Execution.)

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

Completes with a GoogleCloudAiplatformV1Execution.

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

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

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