Skip to main content
Manage access policies For a detailed overview, please visit the policy’s reference page.

policy access-report

Show the access report for the referenced policy Usage
Common Options Reference

policy add-binding

Bind one or more permissions to the referenced policy and associate it with one or more users / service accounts / groups / identities Usage
Common Options Reference
  • Bind the view permission to the referenced policy named `demo-policy-add-binding` and associate it with the built-in controlplane service account

policy audit

Retrieve audit trail events for the referenced policy Usage
Common Options Reference

policy clone

Clone a policy Usage
Common Options Reference

policy create

Create a new policy Usage
Common Options Reference

policy delete

Delete one or more referenced policies Usage
Deleting a policy will remove all associated resources (targets, bindings, etc.)
Common Options Reference

policy edit

Edit the referenced policy, as YAML, within an editor Usage
The default editor can be set by using the EDITOR environment variable.
Common Options Reference

policy eventlog

Show the event log of the referenced policy Usage
Common Options Reference

policy get

Retrieve one or more referenced policies Usage
An empty reference will return all references
Common Options Reference
  • Get all policies
  • Get one policy
  • Get multiple policies

policy patch

Update the referenced policy’s metadata using an input file Usage
Running this command with the option --file - sets the input to stdin. The input is required to be a valid JSON or YAML string (e.g., {"description": "My new description"} or description: My new description). To complete the update, press Control-D (or Control-Z if you are using Windows).
Common Options Reference

policy permissions

Show the grantable permissions for a policy object type Usage
Common Options Reference

policy query

Find all the policies based on the given query Usage
Common Options Reference
Use the --match option to display all, none, or any of the results based on a given property or tag
  • Search for a policy based on the name property
  • Search for a policy based on the description property
  • Search for a policy based on a tag
  • Search for a policy based on a property and tag

policy remove-binding

Remove the bindings of one or more permissions from the referenced policy and disassociate it from one or more users / service accounts / groups / identities Usage
Common Options Reference
  • Remove the binding of the view permission from the policy named demo-policy and disassociate it with the built-in controlplane service account.

policy tag

Manage the tags belonging to one or more referenced policies Usage
Built-in tags, which begin with cpln/*, can’t be modified.
Common Options Reference
  • Add a tag to a policy
  • Update same tag (after running the example above)
  • Remove tag (after running the example above)
  • Add same tag to multiple policies
  • Update same tag on multiple policies (after running the example above)
  • Remove same tag from multiple policies (after running the example above)

policy update

Update properties of the referenced policy Usage
Common Options Reference
  • The --set option allows the modification of the following policy properties:
    • description
      • Description of the policy
      • Type: string
    • tags
      • Tags (key=value) associated with the policy
      • Type: string
    • targetLinks
      • Array of target links belonging to the policy
      • Type: string
    • target
      • The target of the policy
      • Type: string
      • Allowed values: ‘all’
  • For the examples below, the initial policy is configured as:
  • Update a policy’s description
  • Update a policy’s tags
  • Add to a policy’s target links.
  • Remove from a policy’s target links.
  • Update a policy’s target to all