PATCH
/
org
/
{org}
/
policy
/
{name}
curl --request PATCH \
  --url https://api.cpln.io/org/{org}/policy/{name} \
  --header 'Content-Type: application/json' \
  --data '{
  "$drop": [
    "description"
  ],
  "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": "<any>"
        }
      ],
      "$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",
  "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>"
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Service account key can be used as API keys

Path Parameters

org
string
required
name
string
required

Body

application/json
$drop
enum<string>[]
Available options:
description,
tags,
targetKind,
targetLinks,
targetQuery,
target,
bindings
description
string
Maximum length: 250
tags
object
$replace/tags
object
targetKind
enum<string>
Available options:
org,
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
targetQuery
object
$replace/targetQuery
object
target
enum<string>
Available options:
all
bindings
object[]
$drop/bindings
string[]
$append/bindings
object[]
$retain/bindings
string[]
$patch/bindings
object[]

Response

200
application/json
Success
id
string
name
string
Maximum length: 64
kind
string
version
integer
description
string
Maximum length: 250
tags
object
created
string
lastModified
string
targetKind
enum<string>
Available options:
org,
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
targetQuery
object
target
enum<string>
Available options:
all
origin
enum<string>
default:default
Available options:
default,
builtin
bindings
object[]