stratumctl custom-policies
Manage custom Cedar policies
stratumctl custom-policies [flags]Aliases: custom-policy, cpol
Subcommands
Section titled “Subcommands”stratumctl custom-policies attach: Attach a policy to a user, group, or resourcestratumctl custom-policies attachments: List a policy’s attachmentsstratumctl custom-policies create: Create a custom policy from a statements filestratumctl custom-policies delete: Delete a custom policy (–force cascades attachments)stratumctl custom-policies detach: Detach a policy from a targetstratumctl custom-policies get: Show a custom policy (includes generated Cedar)stratumctl custom-policies list: List custom policies at a scope
stratumctl custom-policies attach
Section titled “stratumctl custom-policies attach”Attach a policy to a user, group, or resource
stratumctl custom-policies attach <policy-id> --target-kind <user|group|resource> --target-ref <id-or-arn> [flags]Examples
Section titled “Examples”stratumctl custom-policies attach pol-4k8m2x7q9a --target-kind user --target-ref u-alicestratumctl custom-policies attach pol-4k8m2x7q9a --target-kind group --target-ref g-5k8m2x7q9a| Flag | Type | Default | Description |
|---|---|---|---|
--target-kind |
string | user | group | resource (required) | |
--target-ref |
string | user/group id or resource ARN (required) |
stratumctl custom-policies attachments
Section titled “stratumctl custom-policies attachments”List a policy’s attachments
stratumctl custom-policies attachments <policy-id> [flags]Examples
Section titled “Examples”stratumctl custom-policies attachments pol-4k8m2x7q9astratumctl custom-policies attachments pol-4k8m2x7q9a --output jsonstratumctl custom-policies create
Section titled “stratumctl custom-policies create”Create a custom policy from a statements file
stratumctl custom-policies create --name <n> --scope-type <t> --scope-id <id> -f <statements.json> [flags]Examples
Section titled “Examples”stratumctl custom-policies create --name ci-deployer --scope-type project --scope-id p-team-a -f statements.jsonstratumctl custom-policies create --name ci-deployer --scope-type organization --scope-id o-acme --description "CI deploy rights" -f statements.json| Flag | Type | Default | Description |
|---|---|---|---|
--description |
string | description | |
-f, --file |
string | JSON statements array file (‘-’ = stdin) | |
--name |
string | policy name (required) | |
--scope-id |
string | org/project id (required) | |
--scope-type |
string | organization | project (required) |
stratumctl custom-policies delete
Section titled “stratumctl custom-policies delete”Delete a custom policy (–force cascades attachments)
stratumctl custom-policies delete <policy-id> [--force] [flags]Examples
Section titled “Examples”stratumctl custom-policies delete pol-4k8m2x7q9astratumctl custom-policies delete pol-4k8m2x7q9a --force| Flag | Type | Default | Description |
|---|---|---|---|
--force |
bool | false |
cascade-delete attachments |
stratumctl custom-policies detach
Section titled “stratumctl custom-policies detach”Detach a policy from a target
stratumctl custom-policies detach <policy-id> <attachment-id> [flags]Examples
Section titled “Examples”stratumctl custom-policies detach pol-4k8m2x7q9a att-6k2m8x4q7astratumctl custom-policies get
Section titled “stratumctl custom-policies get”Show a custom policy (includes generated Cedar)
stratumctl custom-policies get <policy-id> [flags]Examples
Section titled “Examples”stratumctl custom-policies get pol-4k8m2x7q9astratumctl custom-policies get pol-4k8m2x7q9a --output jsonstratumctl custom-policies list
Section titled “stratumctl custom-policies list”List custom policies at a scope
stratumctl custom-policies list --scope-type <organization|project> --scope-id <id> [flags]Examples
Section titled “Examples”stratumctl custom-policies list --scope-type project --scope-id p-team-astratumctl custom-policies list --scope-type organization --scope-id o-acme --output json| Flag | Type | Default | Description |
|---|---|---|---|
--scope-id |
string | org/project id (required) | |
--scope-type |
string | organization | project (required) |
