{
  "typeName" : "AWS::Lambda::EventSourceMapping",
  "description" : "The ``AWS::Lambda::EventSourceMapping`` resource creates a mapping between an event source and an LAMlong function. LAM reads items from the event source and triggers the function.\n For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source. \n  +   [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping) \n  +   [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping) \n  +   [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource) \n  +   [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping) \n  +   [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html) \n  +   [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) \n  +   [Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html)",
  "additionalProperties" : false,
  "properties" : {
    "Id" : {
      "description" : "",
      "type" : "string",
      "pattern" : "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
      "minLength" : 36,
      "maxLength" : 36
    },
    "BatchSize" : {
      "description" : "The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).\n  +  *Amazon Kinesis* – Default 100. Max 10,000.\n  +  *Amazon DynamoDB Streams* – Default 100. Max 10,000.\n  +  *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.\n  +  *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000.\n  +  *Self-managed Apache Kafka* – Default 100. Max 10,000.\n  +  *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000.\n  +  *DocumentDB* – Default 100. Max 10,000.",
      "type" : "integer",
      "minimum" : 1,
      "maximum" : 10000
    },
    "BisectBatchOnFunctionError" : {
      "description" : "(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.\n  When using ``BisectBatchOnFunctionError``, check the ``BatchSize`` parameter in the ``OnFailure`` destination message's metadata. The ``BatchSize`` could be greater than 1 since LAM consolidates failed messages metadata when writing to the ``OnFailure`` destination.",
      "type" : "boolean"
    },
    "DestinationConfig" : {
      "description" : "(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.",
      "$ref" : "#/definitions/DestinationConfig"
    },
    "Enabled" : {
      "description" : "When true, the event source mapping is active. When false, Lambda pauses polling and invocation.\n Default: True",
      "type" : "boolean"
    },
    "EventSourceArn" : {
      "description" : "The Amazon Resource Name (ARN) of the event source.\n  +  *Amazon Kinesis* – The ARN of the data stream or a stream consumer.\n  +  *Amazon DynamoDB Streams* – The ARN of the stream.\n  +  *Amazon Simple Queue Service* – The ARN of the queue.\n  +  *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).\n  +  *Amazon MQ* – The ARN of the broker.\n  +  *Amazon DocumentDB* – The ARN of the DocumentDB change stream.",
      "type" : "string",
      "pattern" : "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)",
      "minLength" : 12,
      "maxLength" : 1024
    },
    "EventSourceMappingArn" : {
      "description" : "",
      "type" : "string",
      "pattern" : "arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1}:\\d{12}:event-source-mapping:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}",
      "minLength" : 85,
      "maxLength" : 120
    },
    "FilterCriteria" : {
      "description" : "An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).",
      "$ref" : "#/definitions/FilterCriteria"
    },
    "KmsKeyArn" : {
      "description" : "The ARN of the KMSlong (KMS) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics).",
      "type" : "string",
      "pattern" : "(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()",
      "minLength" : 12,
      "maxLength" : 2048
    },
    "FunctionName" : {
      "description" : "The name or ARN of the Lambda function.\n  **Name formats**\n +  *Function name* – ``MyFunction``.\n  +  *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction``.\n  +  *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD``.\n  +  *Partial ARN* – ``123456789012:function:MyFunction``.\n  \n The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.",
      "type" : "string",
      "pattern" : "(arn:(aws[a-zA-Z-]*)?:lambda:)?((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\\$LATEST(\\.PUBLISHED)?|[a-zA-Z0-9-_]+))?",
      "minLength" : 1,
      "maxLength" : 140
    },
    "MaximumBatchingWindowInSeconds" : {
      "description" : "The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.\n *Default (, , event sources)*: 0\n *Default (, Kafka, , event sources)*: 500 ms\n *Related setting:* For SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.",
      "type" : "integer",
      "minimum" : 0,
      "maximum" : 300
    },
    "MaximumRecordAgeInSeconds" : {
      "description" : "(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.\n  The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed",
      "type" : "integer",
      "minimum" : -1,
      "maximum" : 604800
    },
    "MaximumRetryAttempts" : {
      "description" : "(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.",
      "type" : "integer",
      "minimum" : -1,
      "maximum" : 10000
    },
    "ParallelizationFactor" : {
      "description" : "(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.",
      "type" : "integer",
      "minimum" : 1,
      "maximum" : 10
    },
    "StartingPosition" : {
      "description" : "The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.\n  +  *LATEST* - Read only new records.\n  +  *TRIM_HORIZON* - Process all available records.\n  +  *AT_TIMESTAMP* - Specify a time from which to start reading records.",
      "type" : "string",
      "pattern" : "(LATEST|TRIM_HORIZON|AT_TIMESTAMP)+",
      "minLength" : 6,
      "maxLength" : 12
    },
    "StartingPositionTimestamp" : {
      "description" : "With ``StartingPosition`` set to ``AT_TIMESTAMP``, the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.",
      "type" : "number"
    },
    "Tags" : {
      "description" : "A list of tags to add to the event source mapping.\n  You must have the ``lambda:TagResource``, ``lambda:UntagResource``, and ``lambda:ListTags`` permissions for your [principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) to manage the CFN stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Topics" : {
      "description" : "The name of the Kafka topic.",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "type" : "string",
        "pattern" : "^[^.]([a-zA-Z0-9\\-_.]+)",
        "minLength" : 1,
        "maxLength" : 249
      },
      "minItems" : 1,
      "maxItems" : 1
    },
    "Queues" : {
      "description" : "(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "type" : "string",
        "pattern" : "[\\s\\S]*",
        "minLength" : 1,
        "maxLength" : 1000
      },
      "minItems" : 1,
      "maxItems" : 1
    },
    "SourceAccessConfigurations" : {
      "description" : "An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "$ref" : "#/definitions/SourceAccessConfiguration"
      },
      "minItems" : 1,
      "maxItems" : 22
    },
    "TumblingWindowInSeconds" : {
      "description" : "(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.",
      "type" : "integer",
      "minimum" : 0,
      "maximum" : 900
    },
    "FunctionResponseTypes" : {
      "description" : "(Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping.\n Valid Values: ``ReportBatchItemFailures``",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "type" : "string",
        "enum" : [ "ReportBatchItemFailures" ]
      },
      "minLength" : 0,
      "maxLength" : 1
    },
    "SelfManagedEventSource" : {
      "description" : "The self-managed Apache Kafka cluster for your event source.",
      "$ref" : "#/definitions/SelfManagedEventSource"
    },
    "AmazonManagedKafkaEventSourceConfig" : {
      "description" : "Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.",
      "$ref" : "#/definitions/AmazonManagedKafkaEventSourceConfig"
    },
    "SelfManagedKafkaEventSourceConfig" : {
      "description" : "Specific configuration settings for a self-managed Apache Kafka event source.",
      "$ref" : "#/definitions/SelfManagedKafkaEventSourceConfig"
    },
    "ScalingConfig" : {
      "description" : "This property is for Amazon SQS event sources only. You cannot use ``ProvisionedPollerConfig`` while using ``ScalingConfig``. These options are mutually exclusive. To remove the scaling configuration, pass an empty value.",
      "$ref" : "#/definitions/ScalingConfig"
    },
    "DocumentDBEventSourceConfig" : {
      "description" : "Specific configuration settings for a DocumentDB event source.",
      "$ref" : "#/definitions/DocumentDBEventSourceConfig"
    },
    "ProvisionedPollerConfig" : {
      "description" : "(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see [provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode).",
      "$ref" : "#/definitions/ProvisionedPollerConfig"
    },
    "MetricsConfig" : {
      "description" : "The metrics configuration for your event source. For more information, see [Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).",
      "$ref" : "#/definitions/MetricsConfig"
    },
    "LoggingConfig" : {
      "description" : "The function's Amazon CloudWatch Logs configuration settings.",
      "$ref" : "#/definitions/LoggingConfig"
    }
  },
  "definitions" : {
    "DestinationConfig" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "A configuration object that specifies the destination of an event after Lambda processes it. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).",
      "properties" : {
        "OnFailure" : {
          "description" : "The destination configuration for failed invocations.",
          "$ref" : "#/definitions/OnFailure"
        }
      }
    },
    "FilterCriteria" : {
      "type" : "object",
      "description" : "An object that contains the filters for an event source.",
      "additionalProperties" : false,
      "properties" : {
        "Filters" : {
          "description" : "A list of filters.",
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "$ref" : "#/definitions/Filter"
          },
          "minItems" : 1,
          "maxItems" : 20
        }
      }
    },
    "Filter" : {
      "type" : "object",
      "description" : "A structure within a ``FilterCriteria`` object that defines an event filtering pattern.",
      "additionalProperties" : false,
      "properties" : {
        "Pattern" : {
          "type" : "string",
          "description" : "A filter pattern. For more information on the syntax of a filter pattern, see [Filter rule syntax](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax).",
          "pattern" : ".*",
          "minLength" : 0,
          "maxLength" : 4096
        }
      }
    },
    "OnFailure" : {
      "type" : "object",
      "description" : "A destination for events that failed processing. For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).",
      "additionalProperties" : false,
      "properties" : {
        "Destination" : {
          "description" : "The Amazon Resource Name (ARN) of the destination resource.\n To retain records of unsuccessful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations), you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination.\n  Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending ``OnFailure`` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html).\n  To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html), [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html), [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination), you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.",
          "type" : "string",
          "pattern" : "^$|kafka://([^.]([a-zA-Z0-9\\-_.]{0,248}))|arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)",
          "minLength" : 12,
          "maxLength" : 1024
        }
      }
    },
    "SourceAccessConfiguration" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.",
      "properties" : {
        "Type" : {
          "description" : "The type of authentication protocol, VPC components, or virtual host for your event source. For example: ``\"Type\":\"SASL_SCRAM_512_AUTH\"``.\n  +  ``BASIC_AUTH`` – (Amazon MQ) The ASMlong secret that stores your broker credentials.\n  +  ``BASIC_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.\n  +  ``VPC_SUBNET`` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.\n  +  ``VPC_SECURITY_GROUP`` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.\n  +  ``SASL_SCRAM_256_AUTH`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.\n  +  ``SASL_SCRAM_512_AUTH`` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.\n  +  ``VIRTUAL_HOST`` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.\n  +  ``CLIENT_CERTIFICATE_TLS_AUTH`` – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.\n  +  ``SERVER_ROOT_CA_CERTIFICATE`` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.",
          "enum" : [ "BASIC_AUTH", "VPC_SUBNET", "VPC_SECURITY_GROUP", "SASL_SCRAM_512_AUTH", "SASL_SCRAM_256_AUTH", "VIRTUAL_HOST", "CLIENT_CERTIFICATE_TLS_AUTH", "SERVER_ROOT_CA_CERTIFICATE" ],
          "type" : "string"
        },
        "URI" : {
          "description" : "The value for your chosen configuration in ``Type``. For example: ``\"URI\": \"arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName\"``.",
          "type" : "string",
          "pattern" : "[a-zA-Z0-9-\\/*:_+=.@-]*",
          "minLength" : 1,
          "maxLength" : 200
        }
      }
    },
    "SelfManagedEventSource" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "The self-managed Apache Kafka cluster for your event source.",
      "properties" : {
        "Endpoints" : {
          "description" : "The list of bootstrap servers for your Kafka brokers in the following format: ``\"KafkaBootstrapServers\": [\"abc.xyz.com:xxxx\",\"abc2.xyz.com:xxxx\"]``.",
          "$ref" : "#/definitions/Endpoints"
        }
      }
    },
    "Endpoints" : {
      "type" : "object",
      "additionalProperties" : false,
      "description" : "The list of bootstrap servers for your Kafka brokers in the following format: ``\"KafkaBootstrapServers\": [\"abc.xyz.com:xxxx\",\"abc2.xyz.com:xxxx\"]``.",
      "properties" : {
        "KafkaBootstrapServers" : {
          "type" : "array",
          "description" : "The list of bootstrap servers for your Kafka brokers in the following format: ``\"KafkaBootstrapServers\": [\"abc.xyz.com:xxxx\",\"abc2.xyz.com:xxxx\"]``.",
          "uniqueItems" : true,
          "items" : {
            "type" : "string",
            "description" : "The URL of a Kafka server.",
            "pattern" : "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9]):[0-9]{1,5}",
            "minLength" : 1,
            "maxLength" : 300
          },
          "minItems" : 1,
          "maxItems" : 10
        }
      }
    },
    "ConsumerGroupId" : {
      "description" : "The identifier for the Kafka Consumer Group to join.",
      "type" : "string",
      "pattern" : "[a-zA-Z0-9-\\/*:_+=.@-]*",
      "minLength" : 1,
      "maxLength" : 200
    },
    "AmazonManagedKafkaEventSourceConfig" : {
      "description" : "Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ConsumerGroupId" : {
          "description" : "The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id).",
          "$ref" : "#/definitions/ConsumerGroupId"
        },
        "SchemaRegistryConfig" : {
          "description" : "Specific configuration settings for a Kafka schema registry.",
          "$ref" : "#/definitions/SchemaRegistryConfig"
        }
      }
    },
    "SelfManagedKafkaEventSourceConfig" : {
      "description" : "Specific configuration settings for a self-managed Apache Kafka event source.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "ConsumerGroupId" : {
          "description" : "The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka-process.html#services-smaa-topic-add).",
          "$ref" : "#/definitions/ConsumerGroupId"
        },
        "SchemaRegistryConfig" : {
          "description" : "Specific configuration settings for a Kafka schema registry.",
          "$ref" : "#/definitions/SchemaRegistryConfig"
        }
      }
    },
    "MaximumConcurrency" : {
      "description" : "The maximum number of concurrent functions that an event source can invoke.",
      "type" : "integer",
      "minimum" : 2,
      "maximum" : 1000
    },
    "ScalingConfig" : {
      "description" : "(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "MaximumConcurrency" : {
          "description" : "Limits the number of concurrent instances that the SQS event source can invoke.",
          "$ref" : "#/definitions/MaximumConcurrency"
        }
      }
    },
    "Tag" : {
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key for this tag.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for this tag.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key" ],
      "description" : "A [tag](https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to the event source mapping."
    },
    "DocumentDBEventSourceConfig" : {
      "description" : "Specific configuration settings for a DocumentDB event source.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "DatabaseName" : {
          "description" : "The name of the database to consume within the DocumentDB cluster.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 63
        },
        "CollectionName" : {
          "description" : "The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections.",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 57
        },
        "FullDocument" : {
          "description" : "Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes.",
          "type" : "string",
          "enum" : [ "UpdateLookup", "Default" ]
        }
      }
    },
    "ProvisionedPollerConfig" : {
      "description" : "The [provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode) configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers for your event source.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "MinimumPollers" : {
          "description" : "The minimum number of event pollers this event source can scale down to. For Amazon SQS events source mappings, default is 2, and minimum 2 required. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 1.",
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 200
        },
        "MaximumPollers" : {
          "description" : "The maximum number of event pollers this event source can scale up to. For Amazon SQS events source mappings, default is 200, and minimum value allowed is 2. For Amazon MSK and self-managed Apache Kafka event source mappings, default is 200, and minimum value allowed is 1.",
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 2000
        },
        "PollerGroupName" : {
          "description" : "",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 128
        }
      }
    },
    "SchemaRegistryConfig" : {
      "description" : "Specific configuration settings for a Kafka schema registry.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SchemaRegistryURI" : {
          "description" : "The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.\n  +  For GLU schema registries, use the ARN of the registry.\n  +  For Confluent schema registries, use the URL of the registry.",
          "type" : "string",
          "pattern" : "[a-zA-Z0-9-/*:_+=.@-]*",
          "minLength" : 1,
          "maxLength" : 10000
        },
        "EventRecordFormat" : {
          "description" : "The record format that Lambda delivers to your function after schema validation.\n  +  Choose ``JSON`` to have Lambda deliver the record to your function as a standard JSON object.\n  +  Choose ``SOURCE`` to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.",
          "enum" : [ "JSON", "SOURCE" ],
          "type" : "string"
        },
        "AccessConfigs" : {
          "description" : "An array of access configuration objects that tell Lambda how to authenticate with your schema registry.",
          "type" : "array",
          "uniqueItems" : true,
          "maxItems" : 2,
          "items" : {
            "$ref" : "#/definitions/SchemaRegistryAccessConfig"
          }
        },
        "SchemaValidationConfigs" : {
          "description" : "An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.",
          "type" : "array",
          "uniqueItems" : true,
          "minItems" : 1,
          "maxItems" : 2,
          "items" : {
            "$ref" : "#/definitions/SchemaValidationConfig"
          }
        }
      }
    },
    "SchemaRegistryAccessConfig" : {
      "description" : "Specific access configuration settings that tell Lambda how to authenticate with your schema registry.\n If you're working with an GLU schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.\n If you're working with a Confluent schema registry, choose the authentication method in the ``Type`` field, and provide the ASMlong secret ARN in the ``URI`` field.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Type" : {
          "description" : "The type of authentication Lambda uses to access your schema registry.",
          "type" : "string",
          "enum" : [ "BASIC_AUTH", "CLIENT_CERTIFICATE_TLS_AUTH", "SERVER_ROOT_CA_CERTIFICATE" ]
        },
        "URI" : {
          "description" : "The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.",
          "type" : "string",
          "pattern" : "arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)",
          "minLength" : 1,
          "maxLength" : 10000
        }
      }
    },
    "SchemaValidationConfig" : {
      "description" : "Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Attribute" : {
          "description" : "The attributes you want your schema registry to validate and filter for. If you selected ``JSON`` as the ``EventRecordFormat``, Lambda also deserializes the selected message attributes.",
          "type" : "string",
          "enum" : [ "KEY", "VALUE" ]
        }
      }
    },
    "MetricsConfig" : {
      "description" : "The metrics configuration for your event source. Use this configuration object to define which metrics you want your event source mapping to produce.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "Metrics" : {
          "description" : "The metrics you want your event source mapping to produce. Include ``EventCount`` to receive event source mapping metrics related to the number of events processed by your event source mapping. For more information about these metrics, see [Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics).",
          "type" : "array",
          "uniqueItems" : true,
          "items" : {
            "type" : "string",
            "enum" : [ "EventCount", "ErrorCount", "KafkaMetrics" ]
          },
          "minItems" : 0,
          "maxItems" : 3
        }
      }
    },
    "LoggingConfig" : {
      "description" : "The function's Amazon CloudWatch Logs configuration settings.",
      "type" : "object",
      "additionalProperties" : false,
      "properties" : {
        "SystemLogLevel" : {
          "description" : "Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where ``DEBUG`` is the highest level and ``WARN`` is the lowest.",
          "type" : "string",
          "enum" : [ "DEBUG", "INFO", "WARN" ]
        }
      }
    }
  },
  "required" : [ "FunctionName" ],
  "createOnlyProperties" : [ "/properties/EventSourceArn", "/properties/StartingPosition", "/properties/StartingPositionTimestamp", "/properties/SelfManagedEventSource" ],
  "readOnlyProperties" : [ "/properties/Id", "/properties/EventSourceMappingArn" ],
  "primaryIdentifier" : [ "/properties/Id" ],
  "propertyTransform" : {
    "/properties/StartingPositionTimestamp" : "StartingPositionTimestamp * 1000",
    "/properties/FunctionName" : "$split(FunctionName, \":\")[-1] $OR FunctionName $OR $join([\"((arn:.*:lambda:.*:[0-9]{12}:function)|([0-9]{12}:function)):\", $split(FunctionName, \":\")[-1]])"
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "lambda:CreateEventSourceMapping", "lambda:GetEventSourceMapping", "lambda:TagResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "delete" : {
      "permissions" : [ "lambda:DeleteEventSourceMapping", "lambda:GetEventSourceMapping", "kms:Decrypt" ]
    },
    "list" : {
      "permissions" : [ "lambda:ListEventSourceMappings" ]
    },
    "read" : {
      "permissions" : [ "lambda:GetEventSourceMapping", "lambda:ListTags", "kms:Decrypt" ]
    },
    "update" : {
      "permissions" : [ "lambda:UpdateEventSourceMapping", "lambda:GetEventSourceMapping", "lambda:TagResource", "lambda:UntagResource", "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ]
    }
  },
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "lambda:ListTags", "lambda:TagResource", "lambda:UntagResource" ]
  }
}