curl --request PATCH \
--url https://api.cpln.io/org/{org}/policy/{name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"$drop": [
"description"
],
"name": "<string>",
"description": "<string>",
"tags": {},
"$replace/tags": {},
"targetKind": "org",
"targetLinks": [
"<string>"
],
"$drop/targetLinks": [
"<string>"
],
"$append/targetLinks": [
"<string>"
],
"$retain/targetLinks": [
"<string>"
],
"targetQuery": {
"$drop": [
"kind"
],
"kind": "<string>",
"spec": {
"$drop": [
"match"
],
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"$drop/terms": [
"<string>"
],
"$append/terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"$patch/terms": [
{
"$drop": [
"op"
],
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"$replace/value": "<string>",
"value": "<unknown>"
}
],
"$retain/terms": [
"<string>"
],
"sort": {
"$drop": [
"by"
],
"by": "<string>",
"order": "asc"
},
"$replace/sort": {
"by": "<string>",
"order": "asc"
}
},
"$replace/spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"$replace/targetQuery": {
"kind": "<string>",
"spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"target": "all",
"origin": "default",
"bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
],
"$drop/bindings": [
"<string>"
],
"$append/bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
],
"$retain/bindings": [
"<string>"
],
"$patch/bindings": [
{
"$drop": [
"permissions"
],
"permissions": [
"<string>"
],
"$drop/permissions": [
"<string>"
],
"$append/permissions": [
"<string>"
],
"$retain/permissions": [
"<string>"
],
"principalLinks": [
"<string>"
],
"$drop/principalLinks": [
"<string>"
],
"$append/principalLinks": [
"<string>"
],
"$retain/principalLinks": [
"<string>"
]
}
]
}
'{
"id": "<string>",
"name": "<string>",
"kind": "<string>",
"version": 123,
"description": "<string>",
"tags": {},
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"links": [
{
"rel": "<string>",
"href": "<string>"
}
],
"targetKind": "org",
"targetLinks": [
"<string>"
],
"targetQuery": {
"kind": "<string>",
"context": {},
"spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"target": "all",
"origin": "default",
"bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
]
}curl --request PATCH \
--url https://api.cpln.io/org/{org}/policy/{name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"$drop": [
"description"
],
"name": "<string>",
"description": "<string>",
"tags": {},
"$replace/tags": {},
"targetKind": "org",
"targetLinks": [
"<string>"
],
"$drop/targetLinks": [
"<string>"
],
"$append/targetLinks": [
"<string>"
],
"$retain/targetLinks": [
"<string>"
],
"targetQuery": {
"$drop": [
"kind"
],
"kind": "<string>",
"spec": {
"$drop": [
"match"
],
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"$drop/terms": [
"<string>"
],
"$append/terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"$patch/terms": [
{
"$drop": [
"op"
],
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"$replace/value": "<string>",
"value": "<unknown>"
}
],
"$retain/terms": [
"<string>"
],
"sort": {
"$drop": [
"by"
],
"by": "<string>",
"order": "asc"
},
"$replace/sort": {
"by": "<string>",
"order": "asc"
}
},
"$replace/spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"$replace/targetQuery": {
"kind": "<string>",
"spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"target": "all",
"origin": "default",
"bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
],
"$drop/bindings": [
"<string>"
],
"$append/bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
],
"$retain/bindings": [
"<string>"
],
"$patch/bindings": [
{
"$drop": [
"permissions"
],
"permissions": [
"<string>"
],
"$drop/permissions": [
"<string>"
],
"$append/permissions": [
"<string>"
],
"$retain/permissions": [
"<string>"
],
"principalLinks": [
"<string>"
],
"$drop/principalLinks": [
"<string>"
],
"$append/principalLinks": [
"<string>"
],
"$retain/principalLinks": [
"<string>"
]
}
]
}
'{
"id": "<string>",
"name": "<string>",
"kind": "<string>",
"version": 123,
"description": "<string>",
"tags": {},
"created": "2023-11-07T05:31:56Z",
"lastModified": "2023-11-07T05:31:56Z",
"links": [
{
"rel": "<string>",
"href": "<string>"
}
],
"targetKind": "org",
"targetLinks": [
"<string>"
],
"targetQuery": {
"kind": "<string>",
"context": {},
"spec": {
"match": "all",
"terms": [
{
"op": "=",
"property": "<string>",
"rel": "<string>",
"tag": "<string>",
"value": "<string>"
}
],
"sort": {
"by": "<string>",
"order": "asc"
}
}
},
"target": "all",
"origin": "default",
"bindings": [
{
"permissions": [
"<string>"
],
"principalLinks": [
"<string>"
]
}
]
}Service account key can be used as API keys
description, tags, targetKind, targetLinks, targetQuery, target, origin, bindings 64250org, cloudaccount, policy, user, group, resource, task, permissions, serviceaccount, secret, location, gvc, workload, quota, identity, deployment, event, domain, image, ipset, resourcepolicy, agent, accessreport, policymembership, dbcluster, auditctx, memcachecluster, spicedbcluster, tenant, mk8s, command, imagesummary, volumeset Show child attributes
kind, spec Show child attributes
match, terms, sort all, any, none Show child attributes
Show child attributes
op, property, rel, tag, value =, >, >=, <, <=, !=, ~, exists, !exists Show child attributes
all, any, none Show child attributes
Show child attributes
Show child attributes
all, any, none Show child attributes
all default, builtin Show child attributes
permissions, principalLinks Success
64250org, cloudaccount, policy, user, group, resource, task, permissions, serviceaccount, secret, location, gvc, workload, quota, identity, deployment, event, domain, image, ipset, resourcepolicy, agent, accessreport, policymembership, dbcluster, auditctx, memcachecluster, spicedbcluster, tenant, mk8s, command, imagesummary, volumeset Show child attributes
Show child attributes
all, any, none all default, builtin