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>"
      ]
    },
    "$replace/spec": {
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ]
    }
  },
  "$replace/targetQuery": {
    "kind": "<string>",
    "spec": {
      "match": "all",
      "terms": [
        {
          "op": "=",
          "property": "<string>",
          "rel": "<string>",
          "tag": "<string>",
          "value": "<string>"
        }
      ]
    }
  },
  "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>"
        }
      ]
    }
  },
  "target": "all",
  "origin": "default",
  "bindings": [
    {
      "permissions": [
        "<string>"
      ],
      "principalLinks": [
        "<string>"
      ]
    }
  ]
}

Authorizations

Authorization
string
headerrequired

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
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,
resourcepolicy,
agent,
accessreport,
policymembership,
dbcluster,
auditctx,
memcachecluster,
spicedbcluster,
tenant,
mk8s,
command,
imagesummary,
volumeset
targetLinks
string[]
$drop/targetLinks
string[]
$append/targetLinks
string[]
$retain/targetLinks
string[]
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
id
string
name
string
kind
string
version
integer
description
string
tags
object
created
string
lastModified
string
links
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,
resourcepolicy,
agent,
accessreport,
policymembership,
dbcluster,
auditctx,
memcachecluster,
spicedbcluster,
tenant,
mk8s,
command,
imagesummary,
volumeset
targetLinks
string[]
targetQuery
object
target
enum<string>
Available options:
all
origin
enum<string>
default: default
Available options:
default,
builtin
bindings
object[]