---
title: "EventGatewayEncryptConfig"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-for-event-gateways-1/versions/f4366232-3186-4be9-93bd-be3e4b16fb19/schemas/EventGatewayEncryptConfig"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-for-event-gateways-1/versions/f4366232-3186-4be9-93bd-be3e4b16fb19.md

# EventGatewayEncryptConfig

The configuration of the encrypt policy.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Control Planes Configuration for Event Gateways
  version: 1.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    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
    EncryptionRecordPart:
      description: |
        * key - encrypt the record key
        * value - encrypt the record value
      type: string
      enum:
        - key
        - value
    EncryptionKey:
      description: |
        The key to use for encryption.
      discriminator:
        propertyName: type
        mapping:
          aws: "#/components/schemas/EncryptionKeyAWS"
          static: "#/components/schemas/EncryptionKeyStatic"
      oneOf:
        - $ref: "#/components/schemas/EncryptionKeyAWS"
        - $ref: "#/components/schemas/EncryptionKeyStatic"
    EncryptionKeyAWS:
      description: |
        The AWS KMS key to use for encryption.
      type: object
      properties:
        type:
          type: string
          enum:
            - aws
          x-terraform-transform-const: true
        arn:
          description: The AWS KMS key ARN.
          type: string
          maxLength: 2048
          minLength: 10
          pattern: ^arn:aws:kms:.+
      example:
        type: aws
        arn: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
      required:
        - type
        - arn
    EncryptionKeyStatic:
      description: |
        A static encryption key.
      type: object
      properties:
        type:
          type: string
          enum:
            - static
          x-terraform-transform-const: true
        key:
          $ref: "#/components/schemas/EncryptionKeyStaticReference"
      required:
        - type
        - key
    EncryptionKeyStaticReference:
      description: |
        A static encryption key reference, either by ID or by value.
      anyOf:
        - $ref: "#/components/schemas/EncryptionKeyStaticReferenceById"
        - $ref: "#/components/schemas/EncryptionKeyStaticReferenceByName"
      x-terraform-preferred: "#/components/schemas/EncryptionKeyStaticReferenceById"
    EncryptionKeyStaticReferenceById:
      description: A static encryption key reference by ID.
      type: object
      properties:
        id:
          description: The ID of the static key defined in the key source.
          type: string
          format: uuid
          minLength: 1
      required:
        - id
    EncryptionKeyStaticReferenceByName:
      description: A static encryption key reference by name.
      type: object
      properties:
        name:
          description: The name of the static key defined in the key source.
          type: string
          maxLength: 255
          minLength: 1
      required:
        - name
    EventGatewayEncryptConfig:
      description: The configuration of the encrypt policy.
      type: object
      properties:
        failure_mode:
          $ref: "#/components/schemas/EncryptionFailureMode"
        part_of_record:
          description: Describes the parts of a record to encrypt.
          type: array
          items:
            $ref: "#/components/schemas/EncryptionRecordPart"
          minItems: 1
        encryption_key:
          $ref: "#/components/schemas/EncryptionKey"
      required:
        - failure_mode
        - part_of_record
        - encryption_key
```
