Skip to navigation

Replace a policy. [experimental]

View as Markdown
Replace an existing policy's rules and description.

Authentication

AuthorizationBearer
Bearer authentication

Path parameters

PolicyIdstringRequiredformat: "uuid"
The unique identifier for the policy.

Request

This endpoint expects an object.
descriptionstringOptionalformat: ".*"1-1023 characters
A description of the policy.
ruleslist of objectsOptional
The rules declared on this policy. Each rule targets a field in the workload spec and constrains its allowed values through its enforcements.

Response

The updated policy.
createdAtdatetime
The timestamp for when the policy was created.
createdBystring>=1 character
Identifier of the user who created the policy.
idstringformat: "uuid"
The unique identifier for the policy.
scopeenum
Allowed values:
updatedAtdatetime
The timestamp for when the policy was last updated.
updatedBystring>=1 character
Identifier of the user who last updated the policy.
workloadTypeobject

Specifies the Group, Version, and Kind (GVK) of the Kubernetes resource that defines the workload.

clusterIdstring or nullOptionalformat: "uuid"
The id of the cluster the policy applies to. Required when the scope is cluster.
departmentIdstring or nullOptionalformat: ".*">=1 character
The id of the department the policy applies to. Required when the scope is department.
descriptionstringOptionalformat: ".*"1-1023 characters
A description of the policy.
effectiveRuleslist of objectsOptional

The merged rule set in effect for this policy, including rules inherited from broader scopes (cluster, then department, then project). Each entry adds the sourceOfRule indicating where the rule was defined. Returned in responses only; not accepted in requests.

projectIdstring or nullOptionalformat: ".*"
The id of the project the policy applies to. Required when the scope is project.
ruleslist of objectsOptional
The rules declared on this policy. Each rule targets a field in the workload spec and constrains its allowed values through its enforcements.
statusobject or nullOptional

Configuration issues detected by the server for this policy. Returned in responses only; not accepted in requests.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
503
Service Unavailable Error