create method
- GoogleCloudAiplatformV1MetadataStore request,
- String parent, {
- String? metadataStoreId,
- String? $fields,
Initializes a MetadataStore, including allocation of resources.
request
- The metadata request object.
Request parameters:
parent
- Required. The resource name of the Location where the
MetadataStore should be created. Format:
projects/{project}/locations/{location}/
Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$
.
metadataStoreId
- The {metadatastore} portion of the resource name with
the format:
projects/{project}/locations/{location}/metadataStores/{metadatastore}
If not provided, the MetadataStore'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 MetadataStores in the parent Location.
(Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
if the caller can't view the preexisting MetadataStore.)
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleLongrunningOperation.
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<GoogleLongrunningOperation> create(
GoogleCloudAiplatformV1MetadataStore request,
core.String parent, {
core.String? metadataStoreId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (metadataStoreId != null) 'metadataStoreId': [metadataStoreId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/metadataStores';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleLongrunningOperation.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}