Files
threshold/website/content/docs/commands/roles/add-grants.mdx
T
Dan HeathandRobin Beck b442c1fa60 docs: Update meta content - CLI (#5343)
* docs: Update meta content - CLI

* docs: Edits for consistency

* docs: More edits for consistency

* Apply batch of suggestions from code review

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* Apply batch suggestions from code review

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* docs: Remove given id references

* Update read.mdx

* Update read.mdx

---------

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
2024-12-17 14:13:18 -05:00

46 lines
1.2 KiB
Plaintext

---
layout: docs
page_title: roles add-grants - Command
description: >-
The "roles add-grants" command adds grants to an existing role resource.
---
# 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.
- `-ids=<string>` - The IDs of the roles you want to add grants to.
You can specify one or more IDs.
If you specify multiple IDs using text, use commas to separate the IDs.
If you specify multiple IDs using JSON, use an array.
- `-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'