create method
Uploads a ZIP-formatted shared flow configuration bundle to an organization.
If the shared flow already exists, this creates a new revision of it. If the shared flow does not exist, this creates it. Once imported, the shared flow revision must be deployed before it can be accessed at runtime. The size limit of a shared flow bundle is 15 MB.
request
- The metadata request object.
Request parameters:
parent
- Required. The name of the parent organization under which to
create the shared flow. Must be of the form:
organizations/{organization_id}
If the resource has the space
attribute set, IAM permissions are checked against the Space resource
path. To learn more, read the
Apigee Spaces Overview.
Value must have pattern ^organizations/\[^/\]+$
.
action
- Required. Must be set to either import
or validate
.
name
- Required. The name to give the shared flow
space
- Optional. The ID of the space to associated with this shared
flow. Any IAM policies applied to the space will affect access to this
shared flow. Note that this field is only respected when creating a new
shared flow. It has no effect when creating a new revision for an existing
shared flow.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudApigeeV1SharedFlowRevision.
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<GoogleCloudApigeeV1SharedFlowRevision> create(
GoogleApiHttpBody request,
core.String parent, {
core.String? action,
core.String? name,
core.String? space,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (action != null) 'action': [action],
if (name != null) 'name': [name],
if (space != null) 'space': [space],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/sharedflows';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleCloudApigeeV1SharedFlowRevision.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}