Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
islamaliev committed Jul 8, 2024
1 parent f93f679 commit eaa8992
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions docs/website/references/cli/defradb_client_collection_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ Create a new document.
Create a new document.

Options:
-i, --identity
Marks the document as private and set the identity as the owner. The access to the document
-i, --identity
Marks the document as private and set the identity as the owner. The access to the document
and permissions are controlled by ACP (Access Control Policy).

-e, --encrypt
Encrypt flag specified if the document needs to be encrypted. If set, DefraDB will generate a
symmetric key for encryption using AES-GCM.

--encrypt-fields
Comma-separated list of fields to encrypt. If set, DefraDB will encrypt only the specified fields
and for every field in the list it will generate a symmetric key for encryption using AES-GCM.
If combined with '--encrypt' flag, all the fields in the document not listed in '--encrypt-fields'
will be encrypted with the same key.

Example: create from string:
defradb client collection create --name User '{ "name": "Bob" }'
Expand All @@ -33,15 +39,16 @@ Example: create from stdin:


```
defradb client collection create [-i --identity] [-e --encrypt] <document> [flags]
defradb client collection create [-i --identity] [-e --encrypt] [--encrypt-fields] <document> [flags]
```

### Options

```
-e, --encrypt Flag to enable encryption of the document
-f, --file string File containing document(s)
-h, --help help for create
-e, --encrypt Flag to enable encryption of the document
--encrypt-fields strings Comma-separated list of fields to encrypt
-f, --file string File containing document(s)
-h, --help help for create
```

### Options inherited from parent commands
Expand Down

0 comments on commit eaa8992

Please sign in to comment.