create method
- GoogleCloudDataplexV1Entry request,
- String parent, {
- String? entryId,
- String? $fields,
Creates an Entry.
request
- The metadata request object.
Request parameters:
parent
- Required. The resource name of the parent Entry Group:
projects/{project}/locations/{location}/entryGroups/{entry_group}.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/entryGroups/\[^/\]+$
.
entryId
- Required. Entry identifier. It has to be unique within an
Entry Group.Entries corresponding to Google Cloud resources use Entry ID
format based on Full Resource Names
(https://cloud.google.com/apis/design/resource_names#full_resource_name).
The format is a Full Resource Name of the resource without the prefix
double slashes in the API Service Name part of Full Resource Name. This
allows retrieval of entries using their associated resource name.For
example if the Full Resource Name of a resource is
//library.googleapis.com/shelves/shelf1/books/book2, then the suggested
entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also
suggested to follow the same convention for entries corresponding to
resources from other providers or systems than Google Cloud.The maximum
size of the field is 4000 characters.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudDataplexV1Entry.
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<GoogleCloudDataplexV1Entry> create(
GoogleCloudDataplexV1Entry request,
core.String parent, {
core.String? entryId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (entryId != null) 'entryId': [entryId],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/entries';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleCloudDataplexV1Entry.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}