Event Gateway Virtual Cluster Policies
Update Cluster Policy for Virtual Cluster
Changed onUpdates an existing cluster-level policy associated with the specified Event Gateway virtual cluster.
put/v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/cluster-policies/{policyId}#RequestRuleValidator
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"labels": {
"env": "test"
},
"config": {
"requests": [
{
"type": "create_topics",
"rules": [
{
"description": "Enforce the topic naming convention and a partition limit.",
"rule": "context.topic.name.startsWith('team-a.') && context.topic.num_partitions <= 50",
"action": "reject"
}
]
}
]
},
"condition": "context.auth.principal.name == \"this-user\""
}Response
Updated cluster-level policy object.
Example response
{
"labels": {
"env": "test"
},
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}Changes
- info
endpoint added
- info