From 98e5ada44c9c56023550ea441dad9b34e0f2ca0b Mon Sep 17 00:00:00 2001 From: Paul Gottschling Date: Tue, 15 Oct 2024 14:41:50 -0400 Subject: [PATCH] Add `tctl request create` to the reference (#47407) --- docs/pages/reference/cli/tctl.mdx | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/docs/pages/reference/cli/tctl.mdx b/docs/pages/reference/cli/tctl.mdx index 1f06ae3064fe9..b18943770aa97 100644 --- a/docs/pages/reference/cli/tctl.mdx +++ b/docs/pages/reference/cli/tctl.mdx @@ -825,6 +825,45 @@ $ tctl request approve [token] $ tctl request approve request-id-1, request-id-2 ``` +## tctl request create + +Create a pending Access Request. + +```code +$ tctl request create +``` + +### Arguments + +- `` - Name of target user (required). + +### Flags + +| Name | Default Value(s) | Allowed Value(s) | Description | +| - | - | - | - | +|`roles`|none|Comma-separated list of strings|Roles to be requested| +|`resource`|none|Comma-separated list of strings|Resource IDs to be requested| +|`reason`|none|String|Optional reason message| +|`dry-run`|none|Boolean|Don't actually generate the Access Request| + +Use the `dry-run` flag if you want to validate whether Teleport can create an +Access Request for the user in the `username` argument, given the user's static +roles. + +### Global flags + +These flags are available for all commands `--debug, --config`. Run +`tctl help ` or see the [Global Flags section](#tctl-global-flags). + +### Examples + +Create an Access Request for user `myuser` for the `prod` role, providing a +reason: + +```code +$ tctl request create myuser --roles=prod --reason="Fix an outage" +``` + ## tctl request deny Denies a user's request: