Kong Event Gateway Virtual Cluster Consume Policies API

Consume policies operate on Kafka messages as they are read from a Kafka cluster. Transformations may be applied at consume time, but they are applied once per Consumer. Where possible, transofmrations should be applied as a Produce policy

Operations 9

GET /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies List Consume Policies for Virtual Cluster #
POST /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies Create Consume Policy for Virtual Cluster #
GET /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId} Get a Consume Policy for Virtual Cluster #
PUT /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId} Update Consume Policy for Virtual Cluster #
PATCH /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId} Patch Consume Policy for Virtual Cluster #
DELETE /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId} Delete Consume Policy for Virtual Cluster #
POST /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId}/move Move Consume Policy #
GET /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policy-chain Get Consume Policy Chain #
PUT /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policy-chain Update Consume Policy Chain #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kong-event-gateway-virtual-cluster-consume-policies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kong-event-gateway-virtual-cluster-consume-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Konnect API - Go SDK Event Gateway Virtual Cluster Consume Policies API
  version: 3.14.0
  description: The Konnect platform API
  contact:
    name: Kong Inc
    url: https://konghq.com
    email: support@konghq.com
  x-extensions-note: "This API uses the `x-expression` vendor extension to indicate that a string property is a DSL expression.\nSupported types:\n\n\n  - `boolean`: An expression evaluates to boolean. For example, `context.topic.name == 'my-topic'`\n  - `string`: A template string expression that evaluates to a string or a literal string value. For example,\n    `${context.topic.name.substring(0, context.topic.name.length-4)}` or `my-literal-value`\n\nAdditionally, `x-sensitive` flag indicates that a field contains sensitive information. When the value\nof the field is provided in plain text, it's encrypted at rest and it's never returned in API responses.\nWhen the value is an expression, the expression itself is stored and returned in API responses.\n\n`x-min-runtime-version` indicates the minimum Event Gateway runtime version required to use a certain policy or\npolicy feature. The runtime version can be configured at the Event Gateway entity level. It must be a string\ncontaining a semantic version in the `MAJOR.MINOR` format, e.g., `\"1.1\"`.\n"
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  x-oas-source: kong/platform-api@
  x-oas-source-link: https://github.com/Kong/platform-api/commit/
servers:
- url: https://global.api.konghq.com
- url: https://us.api.konghq.com
- url: https://eu.api.konghq.com
- url: https://au.api.konghq.com
security:
- personalAccessToken: []
- systemAccountAccessToken: []
- konnectAccessToken: []
- serviceAccessToken: []
tags:
- name: Event Gateway Virtual Cluster Consume Policies
  description: 'Consume policies operate on Kafka messages as they are read from a Kafka cluster.


    Transformations may be applied at consume time, but they are applied once per Consumer. Where possible, transofmrations should be applied as a Produce policy

    '
paths:
  /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies:
    parameters:
    - $ref: '#/components/parameters/gatewayId'
    - $ref: '#/components/parameters/virtualClusterId'
    get:
      operationId: list-event-gateway-virtual-cluster-consume-policies
      summary: List Consume Policies for Virtual Cluster
      description: Returns a list of consume policies associated with the specified Event Gateway virtual cluster.
      parameters:
      - $ref: '#/components/parameters/EventGatewayPolicyListFilter'
      responses:
        '200':
          $ref: '#/components/responses/ListConsumePoliciesResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
    post:
      x-speakeasy-entity-operation:
        terraform-resource: EventGatewayVirtualClusterConsumePolicy#create
        terraform-datasource: null
      operationId: create-event-gateway-virtual-cluster-consume-policy
      summary: Create Consume Policy for Virtual Cluster
      description: Creates a new consume policy associated with the specified Event Gateway virtual cluster.
      parameters:
      - $ref: '#/components/parameters/EventGatewayPolicyBefore'
      - $ref: '#/components/parameters/EventGatewayPolicyAfter'
      requestBody:
        $ref: '#/components/requestBodies/CreateEventGatewayConsumePolicyRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventGatewayPolicy'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
  /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId}:
    parameters:
    - $ref: '#/components/parameters/gatewayId'
    - $ref: '#/components/parameters/virtualClusterId'
    - name: policyId
      in: path
      description: The UUID of the policy.
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      x-speakeasy-match: id
    get:
      x-speakeasy-entity-operation:
        terraform-resource: EventGatewayVirtualClusterConsumePolicy#read
        terraform-datasource: null
      operationId: get-event-gateway-virtual-cluster-consume-policy
      summary: Get a Consume Policy for Virtual Cluster
      description: Returns information about a specific consume policy associated with the Event Gateway virtual cluster.
      responses:
        '200':
          description: A single consume policy object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventGatewayPolicy'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
    put:
      x-speakeasy-entity-operation:
        terraform-resource: EventGatewayVirtualClusterConsumePolicy#update
        terraform-datasource: null
      operationId: update-event-gateway-virtual-cluster-consume-policy
      summary: Update Consume Policy for Virtual Cluster
      description: Updates an existing consume policy associated with the specified Event Gateway virtual cluster.
      requestBody:
        $ref: '#/components/requestBodies/UpdateEventGatewayConsumePolicyRequest'
      responses:
        '200':
          description: Updated consume policy object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventGatewayPolicy'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
    patch:
      operationId: patch-event-gateway-virtual-cluster-consume-policy
      summary: Patch Consume Policy for Virtual Cluster
      description: Updates an existing consume policy associated with the specified Event Gateway virtual cluster.
      requestBody:
        $ref: '#/components/requestBodies/PatchEventGatewayPolicyRequest'
      responses:
        '200':
          description: Updated consume policy object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventGatewayPolicy'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
    delete:
      x-speakeasy-entity-operation:
        terraform-resource: EventGatewayVirtualClusterConsumePolicy#delete
        terraform-datasource: null
      operationId: delete-event-gateway-virtual-cluster-consume-policy
      summary: Delete Consume Policy for Virtual Cluster
      description: Deletes a specific consume policy associated with the Event Gateway virtual cluster.
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
  /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policies/{policyId}/move:
    parameters:
    - $ref: '#/components/parameters/gatewayId'
    - $ref: '#/components/parameters/virtualClusterId'
    - $ref: '#/components/parameters/policyId'
    post:
      operationId: move-event-gateway-virtual-cluster-consume-policy
      summary: Move Consume Policy
      description: 'Moves the position of a specific consume policy relative to the chain associated with the Event Gateway virtual

        cluster.

        If a policy is defined under a parent policy, it moves the position relative to the sibling policies under the

        same parent.

        '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveEventGatewayPolicy'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
  /v1/event-gateways/{gatewayId}/virtual-clusters/{virtualClusterId}/consume-policy-chain:
    parameters:
    - $ref: '#/components/parameters/gatewayId'
    - $ref: '#/components/parameters/virtualClusterId'
    get:
      operationId: get-event-gateway-virtual-cluster-consume-policy-chain
      summary: Get Consume Policy Chain
      description: 'Get the consume policy chain for a virtual cluster composed of all the ids of the consume policies in order of execution.

        '
      responses:
        '200':
          $ref: '#/components/responses/EventGatewayPolicyChainResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
    put:
      operationId: update-event-gateway-virtual-cluster-consume-policy-chain
      summary: Update Consume Policy Chain
      description: Update the consume policy chain for a virtual cluster by providing an ordered list of consume policy ids.
      requestBody:
        $ref: '#/components/requestBodies/UpdateEventGatewayPolicyChainRequest'
      responses:
        '200':
          $ref: '#/components/responses/EventGatewayPolicyChainResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      tags:
      - Event Gateway Virtual Cluster Consume Policies
components:
  schemas:
    EventGatewayModifyHeaderSetAction:
      description: An action that sets a header key and value.
      type: object
      properties:
        op:
          type: string
          const: set
        key:
          description: The key of the header to set.
          type: string
        value:
          description: The value of the header to set.
          type: string
      required:
      - op
      - key
      - value
    BadRequestError:
      allOf:
      - $ref: '#/components/schemas/BaseError'
      - type: object
        required:
        - invalid_parameters
        properties:
          invalid_parameters:
            $ref: '#/components/schemas/InvalidParameters'
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: 'The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an integer.

            '
          type: integer
          readOnly: true
        title:
          description: 'A short, human-readable summary of the problem. It should not

            change between occurences of a problem, except for localization.

            Should be provided as "Sentence case" for direct use in the UI.

            '
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: 'Used to return the correlation ID back to the user, in the format

            kong:trace:<correlation_id>. This helps us find the relevant logs

            when a customer reports an issue.

            '
          type: string
          readOnly: true
        detail:
          description: 'A human readable explanation specific to this occurence of the problem.

            This field may contain request/entity data to help the user understand

            what went wrong. Enclose variable values in square brackets. Should be

            provided as "Sentence case" for direct use in the UI.

            '
          type: string
          readOnly: true
      required:
      - status
      - title
      - instance
      - detail
      title: Error
    InvalidParameterMinimumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
          - min_length
          - min_digits
          - min_lowercase
          - min_uppercase
          - min_symbols
          - min_items
          - min
          nullable: false
          readOnly: true
          x-speakeasy-unknown-values: allow
        minimum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must have at least 8 characters
          readOnly: true
      additionalProperties: false
      required:
      - field
      - reason
      - rule
      - minimum
    UpdatedAt:
      description: An ISO-8601 timestamp representation of entity update date.
      type: string
      format: date-time
      example: '2022-11-04T20:10:06.927Z'
      readOnly: true
      x-speakeasy-param-suppress-computed-diff: true
    CreatedAt:
      description: An ISO-8601 timestamp representation of entity creation date.
      type: string
      format: date-time
      example: '2022-11-04T20:10:06.927Z'
      readOnly: true
      x-speakeasy-param-suppress-computed-diff: true
    DecryptionRecordPart:
      description: '* key - decrypt the record key

        * value - decrypt the record value

        '
      type: string
      enum:
      - key
      - value
      x-speakeasy-unknown-values: allow
    EncryptionFailureMode:
      description: 'Describes how to handle failing encryption or decryption.

        Use `error` if the record should be rejected if encryption or decryption fails.

        Use `passthrough` to ignore encryption or decryption failure and continue proxying the record.

        '
      type: string
      enum:
      - error
      - passthrough
      x-speakeasy-unknown-values: allow
    EventGatewayPolicy:
      description: A policy associated with an Event Gateway.
      type: object
      properties:
        type:
          description: The type name of the policy.
          type: string
          maxLength: 255
          minLength: 1
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          x-unicode-pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          default: ''
          maxLength: 512
        enabled:
          description: Whether the policy is enabled.
          type: boolean
          default: true
        labels:
          $ref: '#/components/schemas/Labels'
        id:
          description: The unique identifier of the policy.
          type: string
          format: uuid
        config:
          description: The configuration of the policy.
          type: object
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        parent_policy_id:
          description: The unique identifier of the parent policy, if any.
          type: string
          format: uuid
          nullable: true
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        condition:
          description: A string containing the boolean expression that determines whether the policy is applied.
          type: string
          default: ''
          maxLength: 1000
          x-expression:
            type: boolean
            fields: []
      required:
      - type
      - id
      - created_at
      - updated_at
    SchemaValidationType:
      description: 'How to validate the schema and parse the record.

        * confluent_schema_registry - validates against confluent schema registry.

        * json - simple JSON parsing without the schema.

        '
      type: string
      enum:
      - confluent_schema_registry
      - json
      x-speakeasy-unknown-values: allow
    EventGatewayDecryptPolicyConfig:
      description: The configuration of the decrypt policy.
      type: object
      properties:
        failure_mode:
          $ref: '#/components/schemas/EncryptionFailureMode'
        key_sources:
          description: Describes how to find a symmetric key for decryption.
          type: array
          items:
            $ref: '#/components/schemas/EventGatewayKeySource'
          minItems: 1
        part_of_record:
          description: Describes the parts of a record to decrypt.
          type: array
          items:
            $ref: '#/components/schemas/DecryptionRecordPart'
          minItems: 1
      required:
      - failure_mode
      - key_sources
      - part_of_record
    EventGatewayStaticKeySource:
      description: 'A key source that uses static symmetric keys.

        '
      type: object
      properties:
        type:
          type: string
          const: static
      additionalProperties: false
      required:
      - type
    UnauthorizedError:
      allOf:
      - $ref: '#/components/schemas/BaseError'
      - type: object
        properties:
          status:
            example: 401
          title:
            example: Unauthorized
          type:
            example: https://httpstatuses.com/401
          instance:
            example: kong:trace:1234567890
          detail:
            example: Invalid credentials
    NotFoundError:
      allOf:
      - $ref: '#/components/schemas/BaseError'
      - type: object
        properties:
          status:
            example: 404
          title:
            example: Not Found
          type:
            example: https://httpstatuses.com/404
          instance:
            example: kong:trace:1234567890
          detail:
            example: Not found
    EventGatewayModifyHeadersPolicy:
      description: A policy that modifies headers for requests.
      type: object
      properties:
        type:
          description: The type name of the policy.
          type: string
          const: modify_headers
          maxLength: 255
          minLength: 1
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          x-unicode-pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          default: ''
          maxLength: 512
        enabled:
          description: Whether the policy is enabled.
          type: boolean
          default: true
        labels:
          $ref: '#/components/schemas/Labels'
        config:
          description: The configuration of the modify headers policy.
          type: object
          properties:
            actions:
              description: Actions are run in sequential order and act on individual headers.
              type: array
              items:
                $ref: '#/components/schemas/EventGatewayModifyHeaderAction'
              minItems: 1
        condition:
          description: '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.

            '
          type: string
          example: record.value.content.foo.bar == "a-value"
          default: ''
          maxLength: 1000
          x-expression:
            type: boolean
            fields:
            - name: context.auth.principal.name
              type: string
              description: Name of authenticated principal. Username in case of PLAIN/SCRAM, `sub` claim in case of OAUTHBEARER.
            - name: context.auth.type
              type: string
              description: 'The matched authentication type from a virtual cluster: anonymous, sasl_plain, sasl_scram_sha256, sasl_scram_sha512, sasl_oauth_bearer.

                '
            - name: context.topic.name
              type: string
              description: The name of the topic.
            - name: record.headers
              type: object
              description: An associative array of header key value pairs.
            - name: record.value.validated
              type: boolean
              description: Indicates whether the record value was successfully validated.
            - name: record.value.content
              type: object
              description: The content of the record value.
      required:
      - type
      - config
      title: Modify Headers
    EventGatewayModifyHeaderRemoveAction:
      description: An action that removes a header by key.
      type: object
      properties:
        op:
          type: string
          const: remove
        key:
          description: The key of the header to remove.
          type: string
      required:
      - op
      - key
    ConsumeFailureMode:
      description: 'Describes how to handle a failure in a policy applied to consumed records.

        * `error` - the batch is not delivered to the client. Use sparingly: erroring on a batch causes clients to get stuck on the problematic offset and requires manual intervention to skip it.

        * `skip` - the record is not delivered to the client.

        * `passthrough` - passes the record to the client even though policy execution failed.

        * `mark` - passes the record to the client but marks it with a `kong/policy-failure-<id>` header whose value is the reason for the policy failure (truncated to 512 characters).

        '
      type: string
      enum:
      - error
      - skip
      - passthrough
      - mark
      x-speakeasy-unknown-values: allow
    EventGatewayParsedRecordDecryptFieldsPolicy:
      description: 'Decrypts fields of parsed Kafka records using AES_256_GCM. Keys are therefore 256 bits long.


        Note this policy can only be used as a child of a `EventGatewayConsumeSchemaValidationPolicy` policy.

        '
      type: object
      properties:
        type:
          description: The type name of the policy.
          type: string
          const: decrypt_fields
          maxLength: 255
          minLength: 1
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          x-unicode-pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          default: ''
          maxLength: 512
        enabled:
          description: Whether the policy is enabled.
          type: boolean
          default: true
        labels:
          $ref: '#/components/schemas/Labels'
        config:
          description: The configuration of the policy.
          type: object
          $ref: '#/components/schemas/EventGatewayParsedRecordDecryptFieldsConfig'
        condition:
          description: '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.

            '
          type: string
          example: record.value.content.foo.bar == "a-value"
          default: ''
          maxLength: 1000
          x-expression:
            type: boolean
            fields:
            - name: context.auth.principal.name
              type: string
              description: Name of authenticated principal. Username in case of PLAIN/SCRAM, `sub` claim in case of OAUTHBEARER.
            - name: context.auth.type
              type: string
              description: 'The matched authentication type from a virtual cluster: anonymous, sasl_plain, sasl_scram_sha256, sasl_scram_sha512, sasl_oauth_bearer.

                '
            - name: context.topic.name
              type: string
              description: The name of the topic.
            - name: record.headers
              type: object
              description: An associative array of header key value pairs.
            - name: record.value.validated
              type: boolean
              description: Indicates whether the record value was successfully validated.
            - name: record.value.content
              type: object
              description: The content of the record value.
      required:
      - type
      - config
      title: Decrypt Parsed Record Fields
    InvalidParameterMaximumLength:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          description: invalid parameters rules
          type: string
          enum:
          - max_length
          - max_items
          - max
          nullable: false
          readOnly: true
          x-speakeasy-unknown-values: allow
        maximum:
          type: integer
          example: 8
        source:
          type: string
          example: body
        reason:
          type: string
          example: must not have more than 8 characters
          readOnly: true
      additionalProperties: false
      required:
      - field
      - reason
      - rule
      - maximum
    InvalidParameterStandard:
      type: object
      properties:
        field:
          type: string
          example: name
          readOnly: true
        rule:
          $ref: '#/components/schemas/InvalidRules'
        source:
          type: string
          example: body
        reason:
          type: string
          example: is a required field
          readOnly: true
      additionalProperties: false
      required:
      - field
      - reason
    EventGatewayPolicyPatch:
      description: The schema of the policy to patch it.
      properties:
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          minLength: 1
          nullable: true
          pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          maxLength: 512
          nullable: true
        enabled:
          description: Whether the policy is enabled.
          type: boolean
        condition:
          description: A string containing the boolean expression that determines whether the policy is applied.
          type: string
          example: context.topic.name.endsWith('my_suffix')
          maxLength: 1000
          nullable: true
          x-expression:
            type: boolean
        labels:
          $ref: '#/components/schemas/Labels'
    MoveEventGatewayPolicy:
      description: Defines the position of a policy relative to the policy chain.
      type: object
      properties:
        index:
          description: The position of the policy relative to the policy chain.
          type: integer
          example: 2
          minimum: 0
      required:
      - index
    EventGatewayKeySource:
      description: 'A key source that describes how to find a symmetric key for encryption or decryption.

        It can be an AWS KMS key source that uses a KMS to find a symmetric key,

        or a static key source that uses a static symmetric key provided as secrets.

        '
      discriminator:
        propertyName: type
        mapping:
          aws: '#/components/schemas/EventGatewayAWSKeySource'
          static: '#/components/schemas/EventGatewayStaticKeySource'
      oneOf:
      - $ref: '#/components/schemas/EventGatewayAWSKeySource'
      - $ref: '#/components/schemas/EventGatewayStaticKeySource'
    EventGatewayConsumePolicyUpdate:
      description: The typed schema of the consume policy to modify it.
      discriminator:
        propertyName: type
        mapping:
          modify_headers: '#/components/schemas/EventGatewayModifyHeadersPolicy'
          schema_validation: '#/components/schemas/EventGatewayConsumeSchemaValidationPolicy'
          decrypt: '#/components/schemas/EventGatewayDecryptPolicy'
          skip_record: '#/components/schemas/EventGatewaySkipRecordPolicy'
          decrypt_fields: '#/components/schemas/EventGatewayParsedRecordDecryptFieldsPolicy'
      oneOf:
      - $ref: '#/components/schemas/EventGatewayModifyHeadersPolicy'
      - $ref: '#/components/schemas/EventGatewayConsumeSchemaValidationPolicy'
      - $ref: '#/components/schemas/EventGatewayDecryptPolicy'
      - $ref: '#/components/schemas/EventGatewaySkipRecordPolicy'
      - $ref: '#/components/schemas/EventGatewayParsedRecordDecryptFieldsPolicy'
    EventGatewayParsedRecordDecryptFieldsPolicyCreate:
      description: 'Decrypts fields of parsed Kafka records using AES_256_GCM. Keys are therefore 256 bits long.


        Note this policy can only be used as a child of a `EventGatewayConsumeSchemaValidationPolicy` policy.

        '
      type: object
      properties:
        type:
          description: The type name of the policy.
          type: string
          const: decrypt_fields
          maxLength: 255
          minLength: 1
        name:
          description: A unique user-defined name of the policy.
          type: string
          maxLength: 255
          x-unicode-pattern: ^[\p{L}\p{N}][\p{L}\p{N} _\-\.:/+']*[\p{L}\p{N}]$
        description:
          description: A human-readable description of the policy.
          type: string
          default: ''
          maxLength: 512
        enabled:
          description: Whether the policy is enabled.
          type: boolean
          default: true
        labels:
          $ref: '#/components/schemas/Labels'
        config:
          description: The configuration of the policy.
          type: object
          $ref: '#/components/schemas/EventGatewayParsedRecordDecryptFieldsConfig'
        condition:
          description: '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.

            '
          type: string
          example: record.value.content.foo.bar == "a-value"
          default: ''
          maxLength: 1000
          x-expression:
            type: boolean
            fields:
            - name: context.auth.principal.name
              type: string
              description: Name of authenticated principal. Username in case of PLAIN/SCRAM, `sub` claim in case of OAUTHBEARER.
            - name: context.auth.type
              type: string
              description: 'The matched authentication type from a virtual cluster: anonymous, sasl_plain, sasl_scram_sha256, sasl_scram_sha512, sasl_oauth_bearer.

                '
            - name: context.topic.name
              type: string
              description: The name of the topic.
            - name: record.headers
              type: object
              description: An associative array of header key value pairs.
            - name: record.value.validated
              type: boolean
              description: Indicates whether the record value was successfully validated.
            - name: record.value.content
              type: object
              description: The content of the record value.
        parent_policy_id:
          description: The unique identifier of the parent schema validation policy.
          type: string
          format: uuid
      required:
      - type
      - config
      - parent_policy_id
      title: Decrypt Parsed Record Fields
    InvalidParameterChoiceItem:
      type: object
      properties:
        field:
          type: stri

# --- truncated at 32 KB (61 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kong/refs/heads/main/openapi/kong-event-gateway-virtual-cluster-consume-policies-api-openapi.yml