Event Gateway Virtual Cluster Policies
Create Cluster Policy for Virtual Cluster
Creates a new cluster-level policy associated with the specified Event Gateway virtual cluster.
post/v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/cluster-policies
Query parameters
beforestring uuid
Determines the id of the existing policy the new policy should be inserted before. Either 'before' or 'after' can be provided, when both are omitted the new policy is added to the end of the chain. When both are provided, the request fails with a 400 Bad Request.
afterstring uuid
Determines the id of the existing policy the new policy should be inserted after. Either 'before' or 'after' can be provided, when both are omitted the new policy is added to the end of the chain. When both are provided, the request fails with a 400 Bad Request.
Request body
Example request
{
"labels": {
"env": "test"
},
"config": {
"rules": [
{
"resource_names": [
{
"match": "orders-*"
},
{
"match": "payments-*"
}
]
}
]
},
"condition": "context.auth.principal.name == \"this-user\""
}Response
Created
Example response
{
"labels": {
"env": "test"
},
"created_at": "2022-11-04T20:10:06.927Z",
"updated_at": "2022-11-04T20:10:06.927Z"
}