create method

Future<CosmosDbDatabase> create(
  1. String name, {
  2. CosmosDbPermission? permission,
  3. CosmosDbThroughput? throughput,
})

Creates a new CosmosDbDatabase with the specified name.

Implementation

Future<CosmosDbDatabase> create(
  String name, {
  CosmosDbPermission? permission,
  CosmosDbThroughput? throughput,
}) =>
    client.post<CosmosDbDatabase>(
      _url,
      CosmosDbDatabase(server, name),
      Context(
        type: 'dbs',
        resId: '',
        headers: throughput?.header,
        builder: _build,
        token: permission?.token,
      ),
    );