Update policy in project
Changes a policy of an organization or a project. The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: `spec` left out keeps the policy, null unsets it, and an object changes it, a field at a time. An organization's policy binds every one of its projects; a project's that is looser than its organization's is kept, and has no effect while the organization's is stricter. With If-Match, the update fails with failed_precondition, as 412, if the policy changed since it was read.
Changes a policy of an organization or a project.
The body is a JSON merge patch (RFC 7396), sent as application/merge-patch+json: spec left out keeps the policy, null unsets it, and an object changes it, a field at a time. An organization's policy binds every one of its projects; a project's that is looser than its organization's is kept, and has no effect while the organization's is stricter. With If-Match, the update fails with failed_precondition, as 412, if the policy changed since it was read.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$constraint*stringThe constraint's ID, such as environments.maxDiskGib.
^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)+$If-Match?stringThe ETag of the policy as it was read: the update fails with failed_precondition, as 412, if it changed since.
application/merge-patch+json- body
spec?|Changes to what this level sets, which sets a policy if none is set, or null to unset it, so that what the level above makes apply applies. A spec left with nothing set, such as enforced set to false, unsets it too.
OK
application/json- response
constraint*stringThe constraint's ID, such as environments.maxDiskGib.
effective*What the level above makes apply: for a project, its organization's effective policy; for an organization, its plan limit when lower than kosem's limit, else kosem's default.
inherited*What the level above makes apply: for a project, its organization's effective policy; for an organization, its plan limit when lower than kosem's limit, else kosem's default.
name*stringResource name, organizations/{organization_id}/policies/{constraint_id} or projects/{project_id}/policies/{constraint_id}.
spec?What this level sets; absent while unset, where what the level above makes apply applies.
updateTime?stringWhen this level's policy last changed; absent if it never did.
date-timecurl -X PATCH 'https://api.kosem.ai/v1/projects/string/policies/string' \
-H 'Content-Type: application/merge-patch+json' \
-d '{}'{
"constraint": "string",
"effective": {
"allowedValues": [
"string"
],
"enforced": true,
"max": 0,
"requiredPlan": "PRO",
"source": "organization"
},
"inherited": {
"allowedValues": [
"string"
],
"enforced": true,
"max": 0,
"requiredPlan": "PRO",
"source": "organization"
},
"name": "string",
"spec": {
"allowedValues": [
"string"
],
"enforced": true,
"max": 0
},
"updateTime": "2019-08-24T14:15:22Z"
}