Skip to main content

tcb policy list

View the list of legacy gateway authentication policies.

PG environments and environments running the OPA authorization engine have no legacy gateway policy entries. Use tcb policy get instead.

Usage​

tcb policy list [options]

Parameters​

ParameterDescriptionDefault
-e, --env-id <envId>Environment ID—
--resource-type <type>Filter by resource type, available value: policyAll
--jsonOutput JSON—

Output Fields​

FieldDescription
PolicyIdPolicy ID
ResourceTypeResource type
ResourceIdResource ID
ResourceTitleResource title
ResourceNameResource name
EffectEffect (Allow/Deny)
IsAccessIs accessible
RoleIdentityRole identity
RoleNameRole name
SafeRuleSafe rule

JSON Output​

--json prints the cloud response as is; SkippedReason tells why no request was sent:

{
"data": {
"Data": { "PolicyList": [], "Total": "0" },
"RequestId": "",
"SkippedReason": "opa_authz_engine"
}
}
ValueDescription
postgresql_envPostgreSQL environment with no legacy gateway policies
opa_authz_engineOPA authorization engine enabled; legacy policies ignored

When SkippedReason is present, PolicyList is empty and RequestId is an empty string. An empty list does not mean there are no policies.

Examples​

# View all policies
tcb policy list -e my-env-id

# Filter by resource type
tcb policy list --resource-type policy -e my-env-id

# Output in JSON format
tcb policy list --json -e my-env-id