Files
threshold/website/content/docs/commands/roles/set-principals.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

43 lines
1.2 KiB
Plaintext

---
layout: docs
page_title: roles set-principals - Command
description: >-
The "roles set-principals" command sets the complete set of principals on an existing role resource. Principals can be users or groups.
---
# roles set-principals
Command: `roles set-principals`
The `roles set-principals` command lets you set the complete set of principals on a role.
Principals can be users or groups.
You can specify multiple principals per role.
## Example
This example sets the principals `u_anon` and `sg_1234567890` on a role with the ID `r_1234567890`:
```shell-session
$ boundary roles set-principals -id r_1234567890 -principal u_anon -principal sg_1234567890
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles set-principals [options] [args]
```
</CodeBlockConfig>
### Command options
- `-id=<string>` - The ID of the role you want to set principals on.
- `-principal=<string>` - The principals you want to set on the role.
Principals can be users or groups.
You can optionally specify multiple principals per role.
- `-version=<int>` The version of the role to set principals on.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'