Fences the cluster with the saved settings. Brokers abort open
transactions in scope after they apply the fence, instead of waiting
for them to time out. Does nothing if the cluster is already fencing or
fenced. To fence with other settings, save them with
UpdateClusterFenceSettings first. Poll GetClusterFenceStatus until
it reports CLUSTER_FENCE_STATE_FENCED.
POST
/redpanda.core.admin.v2.ClusterFenceService/Fence
curl \
--request POST 'http://localhost:9644/redpanda.core.admin.v2.ClusterFenceService/Fence' \
--header "Content-Type: application/json" \
--header "Connect-Protocol-Version: 1" \
--header "Connect-Timeout-Ms: 42.0" \
--data '{
"expectedRevision": 42
}'
Request examples
# Headers
Connect-Protocol-Version: 1
Connect-Timeout-Ms: 42.0
# Payload
{
"expectedRevision": 42
}
Response examples (200)
{
"fence": {
"revision": 42,
"settings": {
"readPolicy": {
"allowAllReads": true,
"exemptPrincipals": [
"string"
]
},
"scope": {
"allResources": {}
}
},
"state": "CLUSTER_FENCE_STATE_UNSPECIFIED",
"stateChangedAt": "2023-01-15T01:30:15.01Z"
}
}
Response examples (default)
{
"code": "not_found",
"details": [
{
"debug": {},
"type": "string",
"value": "@file"
}
],
"message": "string"
}