Event Gateway Virtual Cluster Produce Policies

Produce policies operate on Kafka messages before they are written to the Kafka cluster.

Where possible, apply transformations to the data using produce policies rather than consume policies for maximum efficiency.

List Produce Policies for Virtual Cluster

Returns a list of produce policies associated with the specified Event Gateway virtual cluster.

get

Query Parameters

filterobject

Filter policies returned in the response.

Show Child Parameters

Path Parameters

gatewayIdstring(uuid)required

The UUID of your Gateway.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

virtualClusterIdstring(uuid)required

The ID of the Virtual Cluster.

Response

application/json

A paginated list response for a collection of produce policies associated with an Event Gateway virtual cluster.

A policy associated with an Event Gateway.

typestringrequired

The type name of the policy.

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

idstring(uuid)required

The unique identifier of the policy.

configobject

The configuration of the policy.

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

parent_policy_idstring | null(uuid)

The unique identifier of the parent policy, if any.

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

conditionstring

A string containing the boolean expression that determines whether the policy is applied.

Default:

<= 1000 characters

get/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/produce-policies
 
application/json

Create Produce Policy for Virtual Cluster

Creates a new produce policy associated with the specified Event Gateway virtual cluster.

post

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.

Path Parameters

gatewayIdstring(uuid)required

The UUID of your Gateway.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

virtualClusterIdstring(uuid)required

The ID of the Virtual Cluster.

Body

application/json

The request schema for creating a produce policy.

EventGatewayProducePolicyCreate

EventGatewayProducePolicyCreate

The typed schema of the produce policy to modify it.

One Of
typestringrequired

The type name of the policy.

Allowed values:modify_headers

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

configobjectrequired

The configuration of the modify headers policy.

Show Child Parameters
conditionstring

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.

Default:

<= 1000 characters

Example:record.value.content.foo.bar == "a-value"

parent_policy_idstring(uuid)

The unique identifier of the parent schema validation policy, if any.

Response

application/json

Created

EventGatewayPolicy

A policy associated with an Event Gateway.

typestringrequired

The type name of the policy.

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

idstring(uuid)required

The unique identifier of the policy.

configobject

The configuration of the policy.

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

parent_policy_idstring | null(uuid)

The unique identifier of the parent policy, if any.

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

conditionstring

A string containing the boolean expression that determines whether the policy is applied.

Default:

<= 1000 characters

post/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/produce-policies

Body

{}
 
application/json

Get a Produce Policy for Virtual Cluster

Returns information about a specific produce policy associated with the Event Gateway virtual cluster.

get

Path Parameters

gatewayIdstring(uuid)required

The UUID of your Gateway.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

virtualClusterIdstring(uuid)required

The ID of the Virtual Cluster.

policyIdstring(uuid)required

The UUID of the policy.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Response

application/json

A single produce policy object.

EventGatewayPolicy

A policy associated with an Event Gateway.

typestringrequired

The type name of the policy.

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

idstring(uuid)required

The unique identifier of the policy.

configobject

The configuration of the policy.

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

parent_policy_idstring | null(uuid)

The unique identifier of the parent policy, if any.

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

conditionstring

A string containing the boolean expression that determines whether the policy is applied.

Default:

<= 1000 characters

get/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/produce-policies/{policyId}
 
application/json

Update Produce Policy for Virtual Cluster

Updates an existing produce policy associated with the specified Event Gateway virtual cluster.

put

Path Parameters

gatewayIdstring(uuid)required

The UUID of your Gateway.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

virtualClusterIdstring(uuid)required

The ID of the Virtual Cluster.

policyIdstring(uuid)required

The UUID of the policy.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

Body

application/json

The request schema for updating a produce policy.

EventGatewayProducePolicyUpdate

EventGatewayProducePolicyUpdate

The typed schema of the produce policy to modify it.

One Of
typestringrequired

The type name of the policy.

Allowed values:schema_validation

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

configOne Of
objectrequired

The configuration of the policy.

EventGatewayProduceSchemaValidationPolicySchemaRegistryConfigobject

The configuration of the produce schema validation policy when using a schema registry.

Show Child Parameters
conditionstring

A string containing the boolean expression that determines whether the policy is applied.

Default:

<= 1000 characters

Example:context.topic.name.endsWith("my_suffix") && record.headers["x-flag"] == "a-value"

Response

application/json

Updated produce policy object.

EventGatewayPolicy

A policy associated with an Event Gateway.

typestringrequired

The type name of the policy.

>= 1 characters<= 255 characters

namestring

A unique user-defined name of the policy.

<= 255 characters

descriptionstring

A human-readable description of the policy.

Default:

<= 512 characters

enabledboolean

Whether the policy is enabled.

Default:true

labelsobject

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 “_”.

Example:{"env":"test"}

idstring(uuid)required

The unique identifier of the policy.

configobject

The configuration of the policy.

created_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity creation date.

Example:2022-11-04T20:10:06.927Z

parent_policy_idstring | null(uuid)

The unique identifier of the parent policy, if any.

updated_atstring(date-time)requiredread-only

An ISO-8601 timestamp representation of entity update date.

Example:2022-11-04T20:10:06.927Z

conditionstring

A string containing the boolean expression that determines whether the policy is applied.

Default:

<= 1000 characters

put/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/produce-policies/{policyId}

Body

{}
 
application/json