Synopsis
--policy-version, the policy is shown with its newest version and its current
version. The current version is the highest-numbered valid version, which is the
one an evaluation runs, so it can be older than the newest version.
With --policy-version, that version is shown with its status, its digest, who
published it and when, and the reason when it is rejected or failed. The command
exits 0 whatever the status of the version.
With --download and --policy-version, the bundle of that version is written to the
given file as a gzipped tar, unchanged and whatever the status of the version, in place
of printing it. An existing file is not overwritten.
Flags
Flags inherited from parent commands
Examples Use Cases
These examples all assume that the flags--api-token, --org, --host, (and --flow, --trail when required), are set/provided.
get a rego policy and its current version
get a rego policy and its current version
get version 3 of a rego policy
get version 3 of a rego policy
download the bundle of version 3 of a rego policy to ./pr-approved-v3.tgz
download the bundle of version 3 of a rego policy to ./pr-approved-v3.tgz
get version 3 of a rego policy as JSON
get version 3 of a rego policy as JSON