Files
threshold/website/content/docs/commands/roles/set-grants.mdx
T
Robert Main 18f469105c Deprecate website folder (#6212)
* Update website folder to indicate deprecation

Adds an alert banner to the top of all MDX files within `/website` to
indicate deprecation

* Update website README
2025-11-04 10:22:10 -05:00

52 lines
1.9 KiB
Plaintext

---
layout: docs
page_title: roles set-grants - Command
description: >-
The "roles set-grants" command sets the complete set of grants on an existing role resource.
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# roles set-grants
Command: `roles set-grants`
The `roles set-grants` command lets you set the complete set of grants on a role.
You can specify multiple grants per role.
## Example
This example sets multiple grants which allow read and list permissions for a role with the ID `r_1234567890`:
```shell-session
$ boundary roles set-grants -id r_1234567890 -grant "ids=*;type=*;actions=read" -grant
"ids=*;type=*;actions=list"
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles set-grants [options] [args]
```
</CodeBlockConfig>
### Command options
- `-grant=<string>` - The grants you want to set on the role.
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 set grants on.
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 set grants on.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'