Execute an immutable saved plan artifact exactly as persisted.
- Applies a plan saved by POST
/policieswhen/{id} /plan exact_apply_supported: true. Otherwise use POST/policies./{id} /apply - Refuses (
409) if the target changed since planning. - For a group rule, apply the group plan itself: a single member’s plan returns
404.
Parameters
Saved Plan ID (UUID)
Responses
Accepted
ApplyPolicyResponse · 10 fields
Whether this operation has finished.
Final operation result, or null while the operation is active.
successfailurecancelledpartialQualifies the status and outcome of an operation where they alone would hide what the operator must know. Null when none applies.
rollback_in_progress rolled_back needs_repair outcome_unknown interruptedrequires_approval holds_lock awaiting_confirmation expiredtimed_out rescheduledHuman-readable message about job status
May be empty if plan creation failed
Where a background operation is in the shared lifecycle (decision S1). outcome says how a finished operation ended and substate qualifies the state.
queuedrunningfinishedBad Request - the plan ID is not a UUID, or the saved plan cannot be executed exactly (details.error_code exact_plan_not_supported). POST /policies/{id}/plan reports the latter in advance as exact_apply_supported false
Conflict - another mutation or cleanup of the policy is in progress (details.cleanup_task_id names a cleanup task. Code policy.apply_in_progress names a running apply of the rule with the same resources, resolution and details as POST /policies/{id}/apply), the saved plan can no longer be applied because it expired, its apply failed or it is a legacy plan not bound to a policy (details.error_code plan_not_applicable), or the plan was generated for an older policy version (the version-mismatch detail). A spent or stale plan needs a new plan. Code policy.member_credentials_pending means members of a group bound directly still have kubeconfigs for the target's previous sign-in source (resources names them). Nothing was applied. Code policy.target_service_account_incomplete means the last check of the MariaDB target's service account found privileges missing (resources names the target, details.missing_privileges the privileges, details.recommended_sql the command a database administrator runs). Nothing was queued
Unprocessable: Principal doesn't manage the target, so it doesn't change access on it (code request.unprocessable). Switch the target to managed, then try again. Before v7.3 this answer was 403 authorization.denied.
Common errors: 401 403 404 429 503 504. They mean the same for every operation, see Errors.