import requests
url = "https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id}"
payload = {
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": True
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 1,
region: '<string>',
data_boundary: '<string>',
local_only: true
})
};
fetch('https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id} \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": true
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"data_boundary": "<string>",
"local_only": true,
"revision": 2,
"source": "organisation_declared",
"updated_at": "2023-11-07T05:31:56Z"
}Declare cluster service placement policy (browser session)
Requires the applications rollout flag and live membership intersected with token scopes. Cluster policy reads require clusters.read and writes clusters.write. Consumer reads require applications.read and clusters.read; binding requires applications.deploy, clusters.operate and clusters.read. Locations are organisation declarations, not independently verified. No service deployment is executed. Updates require the current revision; zero creates only. Browser mutations require CSRF.
import requests
url = "https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id}"
payload = {
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": True
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_revision: 1,
region: '<string>',
data_boundary: '<string>',
local_only: true
})
};
fetch('https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/service-admission/cluster-policies/{cluster_id} \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"expected_revision": 1,
"region": "<string>",
"data_boundary": "<string>",
"local_only": true
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"data_boundary": "<string>",
"local_only": true,
"revision": 2,
"source": "organisation_declared",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Path Parameters
Body
x >= 0Physical cloud region of the placement, for example eu-north-1. It locates infrastructure; it is not the data-location promise, which is data_boundary. unspecified is reserved for the open default and refused with 422.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$Boundary the data is permitted to stay within, for example eu. Sharing a service across clusters is decided by this boundary, never by the physical region. unspecified is reserved for the open default and refused with 422.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$Response
Success
Physical cloud region of the placement, for example eu-north-1. It locates infrastructure; it is not the data-location promise, which is data_boundary.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$Boundary the data is permitted to stay within, for example eu. Sharing a service across clusters is decided by this boundary, never by the physical region.
1 - 63^[a-z][a-z0-9]*(-[a-z0-9]+)*$x >= 1organisation_declared for an administrator's declaration; default for the open default a cluster without one is admitted under (region and data_boundary unspecified, local_only false, revision 1). The settings read answers only declarations.
organisation_declared, default When the declaration was last saved; null for the default.