Files
threshold/website/content/docs/commands/roles/set-grant-scopes.mdx
T
587592897f docs: Document grant normalization (#5850)
* docs: Document grant normalization

* docs: Add deprecation badges

* Update website/content/docs/concepts/domain-model/scopes.mdx

Co-authored-by: Sorawis Nilparuk (Bo) <sorawis.nilparuk@hashicorp.com>

* docs: Remove deprecation notice

* docs: Remove deprecation badge

* Update website/content/docs/concepts/domain-model/scopes.mdx

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

---------

Co-authored-by: Sorawis Nilparuk (Bo) <sorawis.nilparuk@hashicorp.com>
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
2025-07-10 09:39:54 -04:00

49 lines
1.6 KiB
Plaintext

---
layout: docs
page_title: roles set-grant-scopes - Command
description: >-
The "roles set-grant-scopes" command sets the complete set of grant scopes on an existing role resource.
---
# roles set-grant-scopes
Command: `roles set-grant-scopes`
The `roles set-grant-scopes` command lets you set the complete set of grant scopes on a role.
You can specify multiple grant scopes per role.
## Example
This example sets the complete set of grant scopes on a role with the ID `r_1234567890` in the current scope and any children scopes:
```shell-session
$ boundary roles set-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles set-grant-scopes [options] [args]
```
</CodeBlockConfig>
### Command options
- `-grant-scope-id=<string>` - The scope IDs that inherit grants set on the role.
You can specify the following values:
- `this` - Applies to the current scope.
- `children` - Applies to all direct children of the scope and can only be used with global and org scopes.
- `descendants` - Applies to all descendants of the scope and can only be used with the global scope.
Boundary does not allow you to create redudnant grant scopes.
For example, if an org scope inherits a grant from the global scope, you cannot apply the same grant directly to the org scope.
- `-id=<string>` - The ID of the role you want to set grant scopes on.
- `-version=<int>` The version of the role to set grant scopes on.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'