2023-09-12 11:37:31 -07:00
|
|
|
---
|
|
|
|
|
layout: docs
|
|
|
|
|
page_title: roles remove-grants - Command
|
2024-12-17 14:13:18 -05:00
|
|
|
description: >-
|
|
|
|
|
The "roles remove-grants" command removes grants from an existing role resource.
|
2023-09-12 11:37:31 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# roles remove-grants
|
|
|
|
|
|
|
|
|
|
Command: `roles remove-grants`
|
|
|
|
|
|
|
|
|
|
The `roles remove-grants` command lets you remove grants from a role.
|
|
|
|
|
You can specify multiple grants per role.
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
|
|
This example removes a grant which permits read permissions from a role with the ID `r_1234567890`:
|
|
|
|
|
|
|
|
|
|
```shell-session
|
2024-01-17 23:54:49 -08:00
|
|
|
$ boundary roles remove-grants -id r_1234567890 -grant "ids=*;type=*;actions=read"
|
2023-09-12 11:37:31 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
<CodeBlockConfig hideClipboard>
|
|
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
|
$ boundary roles remove-grants [options] [args]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</CodeBlockConfig>
|
|
|
|
|
|
|
|
|
|
### Command options
|
|
|
|
|
|
|
|
|
|
- `-grant=<string>` - The grants you want to remove from 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.
|
2024-01-30 20:22:42 -05:00
|
|
|
- `-ids=<string>` - The IDs of the roles you want to remove grants from.
|
|
|
|
|
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.
|
2023-09-12 11:37:31 -07:00
|
|
|
- `-version=<int>` - The version of the role you want to remove grants from.
|
|
|
|
|
If you do not specify a version, the command performs a check-and-set automatically.
|
|
|
|
|
|
|
|
|
|
@include 'cmd-option-note.mdx'
|