create method
- GoogleCloudApigeeV1EndpointAttachment request,
- String parent, {
- String? endpointAttachmentId,
- String? $fields,
Creates an endpoint attachment.
Note: Not supported for Apigee hybrid.
request
- The metadata request object.
Request parameters:
parent
- Required. Organization the endpoint attachment will be created
in.
Value must have pattern ^organizations/\[^/\]+$
.
endpointAttachmentId
- ID to use for the endpoint attachment. ID must
start with a lowercase letter followed by up to 31 lowercase letters,
numbers, or hyphens, and cannot end with a hyphen. The minimum length is
2.
$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(
GoogleCloudApigeeV1EndpointAttachment request,
core.String parent, {
core.String? endpointAttachmentId,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (endpointAttachmentId != null)
'endpointAttachmentId': [endpointAttachmentId],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/endpointAttachments';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleLongrunningOperation.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}