v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-224341,4072.0 MB
Policy

Create

Create a policy.

post/api/v1/policies

Request body

annotationsobject

Bounded key/value metadata bag for IaC marking and customer tags. See .rfcs/object-annotations.md §2. Limits: ≤16 entries; keys 1–128 chars matching ^[A-Za-z][A-Za-z0-9._/-]{0,127}$; values 0–256 chars matching URL-safe ASCII; total serialized ≤4096 bytes. Keys starting with c1/ are reserved for server-managed use and rejected on write.

Well-known keys: managed_by, iac_workspace, iac_resource_address, iac_tool_version.

descriptionstring

The description of the new policy.

displayNamestring required

The display name of the new policy.

policyStepsobject

Step sequences for this policy. The map must include a baseline entry keyed by the lowercased policy type (e.g., "grant"). Additional entries with opaque keys can be added for conditional routing via the rules array.

policyType'POLICY_TYPE_UNSPECIFIED' | 'POLICY_TYPE_GRANT' | 'POLICY_TYPE_REVOKE' | 'POLICY_TYPE_CERTIFY' | 'POLICY_TYPE_ACCESS_REQUEST' | 'POLICY_TYPE_PROVISION'

The type of policy to create (grant, revoke, or certify).

reassignTasksToDelegatesboolean

This field is no longer used. Configure delegate reassignment in the policy step instead.

Response

The CreatePolicyResponse message contains the created policy object.