Update cluster metadata, namespace scope, and run permission policy
curl --request PATCH \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId} \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"name": "payments-prod-eks",
"namespaceInclude": [
"payments",
"shared"
],
"namespaceExclude": [
"sandbox"
],
"permissionModeOverride": null
}
'const options = {
method: 'PATCH',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'payments-prod-eks',
namespaceInclude: ['payments', 'shared'],
namespaceExclude: ['sandbox'],
permissionModeOverride: null
})
};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"name": "<string>",
"status": "<string>",
"connectionStatus": "<string>",
"latestSnapshot": {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
},
"summary": {},
"permissions": {},
"agentAccessMode": "read_only",
"namespaceInclude": [
"<string>"
],
"namespaceExclude": [
"<string>"
],
"permissionMode": "read_only",
"permissionModeOverride": "read_only",
"permissionModeSource": "cluster_override",
"writeConfirmationPolicy": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Targets and inventory
Update cluster metadata, namespace scope, and run permission policy
Update cluster metadata, namespace scope, and run permission policy
curl --request PATCH \
--url https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId} \
--header 'Content-Type: application/json' \
--cookie acornops_cp_session= \
--data '
{
"name": "payments-prod-eks",
"namespaceInclude": [
"payments",
"shared"
],
"namespaceExclude": [
"sandbox"
],
"permissionModeOverride": null
}
'const options = {
method: 'PATCH',
headers: {cookie: 'acornops_cp_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'payments-prod-eks',
namespaceInclude: ['payments', 'shared'],
namespaceExclude: ['sandbox'],
permissionModeOverride: null
})
};
fetch('https://api.acornops.dev/api/v1/workspaces/{workspaceId}/kubernetes-clusters/{clusterId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetType": "kubernetes",
"name": "<string>",
"status": "<string>",
"connectionStatus": "<string>",
"latestSnapshot": {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
},
"summary": {},
"permissions": {},
"agentAccessMode": "read_only",
"namespaceInclude": [
"<string>"
],
"namespaceExclude": [
"<string>"
],
"permissionMode": "read_only",
"permissionModeOverride": "read_only",
"permissionModeSource": "cluster_override",
"writeConfirmationPolicy": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Authorizations
Path Parameters
Example:
"4b930d98-add9-4924-ab26-3c16d96ec373"
Example:
"5b006e4c-509c-458a-9f02-5aafbdc01ade"
Body
application/json
Example:
"payments-prod-eks"
Example:
["payments", "shared"]
Example:
["sandbox"]
Per-cluster run permission override. Use null to inherit the deployment default.
Available options:
read_only, ask_before_changes, auto_allowed_changes, null Example:
"ask_before_changes"
Deprecated compatibility alias. true maps to ask_before_changes; false maps to auto_allowed_changes.
Example:
true
Response
Cluster updated.
Available options:
kubernetes, virtual_machine Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
read_only, read_write, unknown Available options:
read_only, ask_before_changes, auto_allowed_changes Available options:
read_only, ask_before_changes, auto_allowed_changes, null Available options:
cluster_override, deployment_default