Create Consume Policy for Virtual Cluster
Changed onCreates a new consume policy associated with the specified Event Gateway virtual cluster.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
The UUID of your Gateway.
The ID of the Virtual Cluster.
Query parameters
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.
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
Converts an already schema-validated record value into a different serialization format before it is returned to the consumer.
Note this policy can only be used as a child of a EventGatewayConsumeSchemaValidationPolicy policy.
Requires a minimum runtime version of 1.3.
The type name of the policy.
A unique user-defined name of the policy.
A human-readable description of the policy.
Whether the policy is enabled.
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
The configuration of the policy.
A string containing the boolean expression that determines whether the policy is applied.
When the policy is applied as a child policy of schema_validation, the expression can also reference record.value fields.
The unique identifier of the parent schema validation policy.
Example request
{
"labels": {
"env": "test"
},
"config": {
"schema_source": {
"subject": "context.topic.name + '-value'",
"version": "'latest'"
}
},
"condition": "record.value.content.foo.bar == \"a-value\""
}Response
Created
A policy associated with an Event Gateway.
The type name of the policy.
A unique user-defined name of the policy.
A human-readable description of the policy.
Whether the policy is enabled.
Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
The unique identifier of the policy.
The configuration of the policy.
An ISO-8601 timestamp representation of entity creation date.
The unique identifier of the parent policy, if any.
An ISO-8601 timestamp representation of entity update date.
A string containing the boolean expression that determines whether the policy is applied.
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