Files
threshold/website/content/docs/commands/roles/add-grants.mdx
T
Jeff Mitchell 253d79116c Swap id field in grants to ids since that's now standardized (#4250)
* Swap id field in grants to ids since that's now standardized

* Fix some tests I missed

* Update generated resource table
2024-01-17 23:54:49 -08:00

43 lines
1.1 KiB
Plaintext

---
layout: docs
page_title: roles add-grants - Command
description: |-
The "roles add-grants" command lets you add grants to a role.
---
# roles add-grants
Command: `roles add-grants`
The `roles add-grants` command lets you add grants to a role.
You can specify multiple grants per role.
## Example
This example adds a grant which permits read permissions to a role with the ID `r_1234567890`:
```shell-session
$ boundary roles add-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles add-grants [options] [args]
```
</CodeBlockConfig>
### Command options
- `-grant=<string>` - The grants you want to add.
You can specify grants in compact string format or JSON.
If you use JSON, be sure to escape it properly.
You can optionally specify multiple grants.
- `-id=<string>` - The ID of the role you want to add grants to.
- `-version=<int>` The version of the role to add grants to.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'