create method
Requests the creation of a new WebApp in the specified FirebaseProject.
The result of this call is an Operation
which can be used to track the
provisioning process. The Operation
is automatically deleted after
completion, so there is no need to call DeleteOperation
.
request
- The metadata request object.
Request parameters:
parent
- The resource name of the parent FirebaseProject in which to
create a WebApp, in the format: projects/PROJECT_IDENTIFIER/webApps Refer
to the FirebaseProject
[name
](../projects#FirebaseProject.FIELDS.name) field for details
about PROJECT_IDENTIFIER values.
Value must have pattern ^projects/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Operation.
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<Operation> create(
WebApp request,
core.String parent, {
core.String? $fields,
}) async {
final _body = convert.json.encode(request.toJson());
final _queryParams = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta1/' + core.Uri.encodeFull('$parent') + '/webApps';
final _response = await _requester.request(
_url,
'POST',
body: _body,
queryParams: _queryParams,
);
return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
}