{
  "description": "EventSourceMapping is the Schema for the EventSourceMappings API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "EventSourceMappingSpec defines the desired state of EventSourceMapping.",
      "properties": {
        "amazonManagedKafkaEventSourceConfig": {
          "description": "Specific configuration settings for an Amazon Managed Streaming for Apache\nKafka (Amazon MSK) event source.",
          "properties": {
            "consumerGroupID": {
              "type": "string"
            },
            "schemaRegistryConfig": {
              "description": "Specific configuration settings for a Kafka schema registry.",
              "properties": {
                "accessConfigs": {
                  "items": {
                    "description": "Specific access configuration settings that tell Lambda how to authenticate\nwith your schema registry.\n\nIf you're working with an Glue schema registry, don't provide authentication\ndetails in this object. Instead, ensure that your execution role has the\nrequired permissions for Lambda to access your cluster.\n\nIf you're working with a Confluent schema registry, choose the authentication\nmethod in the Type field, and provide the Secrets Manager secret ARN in the\nURI field.",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "uri": {
                        "type": "string"
                      },
                      "uriRef": {
                        "description": "Reference field for URI",
                        "properties": {
                          "from": {
                            "description": "AWSResourceReference provides all the values necessary to reference another\nk8s resource for finding the identifier(Id/ARN/Name)",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "namespace": {
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "eventRecordFormat": {
                  "type": "string"
                },
                "schemaRegistryURI": {
                  "type": "string"
                },
                "schemaValidationConfigs": {
                  "items": {
                    "description": "Specific schema validation configuration settings that tell Lambda the message\nattributes you want to validate and filter using your schema registry.",
                    "properties": {
                      "attribute": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "batchSize": {
          "description": "The maximum number of records in each batch that Lambda pulls from your stream\nor queue and sends to your function. Lambda passes all of the records in\nthe batch to the function in a single call, up to the payload limit for synchronous\ninvocation (6 MB).\n\n  - Amazon Kinesis \u2013 Default 100. Max 10,000.\n\n  - Amazon DynamoDB Streams \u2013 Default 100. Max 10,000.\n\n  - Amazon Simple Queue Service \u2013 Default 10. For standard queues the\n    max is 10,000. For FIFO queues the max is 10.\n\n  - Amazon Managed Streaming for Apache Kafka \u2013 Default 100. Max 10,000.\n\n  - Self-managed Apache Kafka \u2013 Default 100. Max 10,000.\n\n  - Amazon MQ (ActiveMQ and RabbitMQ) \u2013 Default 100. Max 10,000.\n\n  - DocumentDB \u2013 Default 100. Max 10,000.",
          "format": "int64",
          "type": "integer"
        },
        "bisectBatchOnFunctionError": {
          "description": "(Kinesis and DynamoDB Streams only) If the function returns an error, split\nthe batch in two and retry.",
          "type": "boolean"
        },
        "destinationConfig": {
          "description": "(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration\nobject that specifies the destination of an event after Lambda processes\nit.",
          "properties": {
            "onFailure": {
              "description": "A destination for events that failed processing. For more information, see\nAdding a destination (https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations).",
              "properties": {
                "destination": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "onSuccess": {
              "description": "A destination for events that were processed successfully.\n\nTo retain records of successful asynchronous invocations (https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations),\nyou can configure an Amazon SNS topic, Amazon SQS queue, Lambda function,\nor Amazon EventBridge event bus as the destination.\n\nOnSuccess is not supported in CreateEventSourceMapping or UpdateEventSourceMapping\nrequests.",
              "properties": {
                "destination": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "enabled": {
          "description": "When true, the event source mapping is active. When false, Lambda pauses\npolling and invocation.\n\nDefault: True",
          "type": "boolean"
        },
        "eventSourceARN": {
          "description": "The Amazon Resource Name (ARN) of the event source.\n\n  - Amazon Kinesis \u2013 The ARN of the data stream or a stream consumer.\n\n  - Amazon DynamoDB Streams \u2013 The ARN of the stream.\n\n  - Amazon Simple Queue Service \u2013 The ARN of the queue.\n\n  - Amazon Managed Streaming for Apache Kafka \u2013 The ARN of the cluster\n    or the ARN of the VPC connection (for cross-account event source mappings\n    (https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).\n\n  - Amazon MQ \u2013 The ARN of the broker.\n\n  - Amazon DocumentDB \u2013 The ARN of the DocumentDB change stream.\n\nRegex Pattern: `^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9\\-])+:([a-z]{2}(-gov)?-[a-z]+-\\d{1})?:(\\d{12})?:(.*)$`",
          "type": "string"
        },
        "eventSourceRef": {
          "description": "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t  name: my-api",
          "properties": {
            "from": {
              "description": "AWSResourceReference provides all the values necessary to reference another\nk8s resource for finding the identifier(Id/ARN/Name)",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "filterCriteria": {
          "description": "An object that defines the filter criteria that determine whether Lambda\nshould process an event. For more information, see Lambda event filtering\n(https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).",
          "properties": {
            "filters": {
              "items": {
                "description": "A structure within a FilterCriteria object that defines an event filtering\npattern.",
                "properties": {
                  "pattern": {
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "functionName": {
          "description": "The name or ARN of the Lambda function.\n\nName formats\n\n  - Function name \u2013 MyFunction.\n\n  - Function ARN \u2013 arn:aws:lambda:us-west-2:123456789012:function:MyFunction.\n\n  - Version or Alias ARN \u2013 arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.\n\n  - Partial ARN \u2013 123456789012:function:MyFunction.\n\nThe length constraint applies only to the full ARN. If you specify only the\nfunction name, it's limited to 64 characters in length.\n\nRegex Pattern: `^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\\d{1}:)?(\\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\\$LATEST|[a-zA-Z0-9-_]+))?$`",
          "type": "string"
        },
        "functionRef": {
          "description": "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t  name: my-api",
          "properties": {
            "from": {
              "description": "AWSResourceReference provides all the values necessary to reference another\nk8s resource for finding the identifier(Id/ARN/Name)",
              "properties": {
                "name": {
                  "type": "string"
                },
                "namespace": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "functionResponseTypes": {
          "description": "(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type\nenums applied to the event source mapping.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "maximumBatchingWindowInSeconds": {
          "description": "The maximum amount of time, in seconds, that Lambda spends gathering records\nbefore invoking the function. You can configure MaximumBatchingWindowInSeconds\nto any value from 0 seconds to 300 seconds in increments of seconds.\n\nFor Kinesis, DynamoDB, and Amazon SQS event sources, the default batching\nwindow is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ,\nand DocumentDB event sources, the default batching window is 500 ms. Note\nthat because you can only change MaximumBatchingWindowInSeconds in increments\nof seconds, you cannot revert back to the 500 ms default batching window\nafter you have changed it. To restore the default batching window, you must\ncreate a new event source mapping.\n\nRelated setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when\nyou set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds\nto at least 1.",
          "format": "int64",
          "type": "integer"
        },
        "maximumRecordAgeInSeconds": {
          "description": "(Kinesis and DynamoDB Streams only) Discard records older than the specified\nage. The default value is infinite (-1).",
          "format": "int64",
          "type": "integer"
        },
        "maximumRetryAttempts": {
          "description": "(Kinesis and DynamoDB Streams only) Discard records after the specified number\nof retries. The default value is infinite (-1). When set to infinite (-1),\nfailed records are retried until the record expires.",
          "format": "int64",
          "type": "integer"
        },
        "parallelizationFactor": {
          "description": "(Kinesis and DynamoDB Streams only) The number of batches to process from\neach shard concurrently.",
          "format": "int64",
          "type": "integer"
        },
        "queueRefs": {
          "items": {
            "description": "AWSResourceReferenceWrapper provides a wrapper around *AWSResourceReference\ntype to provide more user friendly syntax for references using 'from' field\nEx:\nAPIIDRef:\n\n\tfrom:\n\t  name: my-api",
            "properties": {
              "from": {
                "description": "AWSResourceReference provides all the values necessary to reference another\nk8s resource for finding the identifier(Id/ARN/Name)",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "namespace": {
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "queues": {
          "description": "(MQ) The name of the Amazon MQ broker destination queue to consume.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scalingConfig": {
          "description": "(Amazon SQS only) The scaling configuration for the event source. For more\ninformation, see Configuring maximum concurrency for Amazon SQS event sources\n(https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).",
          "properties": {
            "maximumConcurrency": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "selfManagedEventSource": {
          "description": "The self-managed Apache Kafka cluster to receive records from.",
          "properties": {
            "endpoints": {
              "additionalProperties": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "type": "object"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "selfManagedKafkaEventSourceConfig": {
          "description": "Specific configuration settings for a self-managed Apache Kafka event source.",
          "properties": {
            "consumerGroupID": {
              "type": "string"
            },
            "schemaRegistryConfig": {
              "description": "Specific configuration settings for a Kafka schema registry.",
              "properties": {
                "accessConfigs": {
                  "items": {
                    "description": "Specific access configuration settings that tell Lambda how to authenticate\nwith your schema registry.\n\nIf you're working with an Glue schema registry, don't provide authentication\ndetails in this object. Instead, ensure that your execution role has the\nrequired permissions for Lambda to access your cluster.\n\nIf you're working with a Confluent schema registry, choose the authentication\nmethod in the Type field, and provide the Secrets Manager secret ARN in the\nURI field.",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "uri": {
                        "type": "string"
                      },
                      "uriRef": {
                        "description": "Reference field for URI",
                        "properties": {
                          "from": {
                            "description": "AWSResourceReference provides all the values necessary to reference another\nk8s resource for finding the identifier(Id/ARN/Name)",
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "namespace": {
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "eventRecordFormat": {
                  "type": "string"
                },
                "schemaRegistryURI": {
                  "type": "string"
                },
                "schemaValidationConfigs": {
                  "items": {
                    "description": "Specific schema validation configuration settings that tell Lambda the message\nattributes you want to validate and filter using your schema registry.",
                    "properties": {
                      "attribute": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "sourceAccessConfigurations": {
          "description": "An array of authentication protocols or VPC components required to secure\nyour event source.",
          "items": {
            "description": "To secure and define access to your event source, you can specify the authentication\nprotocol, VPC components, or virtual host.",
            "properties": {
              "type_": {
                "type": "string"
              },
              "uRI": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "startingPosition": {
          "description": "The position in a stream from which to start reading. Required for Amazon\nKinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported\nonly for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed\nApache Kafka.",
          "type": "string"
        },
        "startingPositionTimestamp": {
          "description": "With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.\nStartingPositionTimestamp cannot be in the future.",
          "format": "date-time",
          "type": "string"
        },
        "topics": {
          "description": "The name of the Kafka topic.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "tumblingWindowInSeconds": {
          "description": "(Kinesis and DynamoDB Streams only) The duration in seconds of a processing\nwindow for DynamoDB and Kinesis Streams event sources. A value of 0 seconds\nindicates no tumbling window.",
          "format": "int64",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "EventSourceMappingStatus defines the observed state of EventSourceMapping",
      "properties": {
        "ackResourceMetadata": {
          "description": "All CRs managed by ACK have a common `Status.ACKResourceMetadata` member\nthat is used to contain resource sync state, account ownership,\nconstructed ARN for the resource",
          "properties": {
            "arn": {
              "description": "ARN is the Amazon Resource Name for the resource. This is a\nglobally-unique identifier and is set only by the ACK service controller\nonce the controller has orchestrated the creation of the resource OR\nwhen it has verified that an \"adopted\" resource (a resource where the\nARN annotation was set by the Kubernetes user on the CR) exists and\nmatches the supplied CR's Spec field values.\nhttps://github.com/aws/aws-controllers-k8s/issues/270",
              "type": "string"
            },
            "ownerAccountID": {
              "description": "OwnerAccountID is the AWS Account ID of the account that owns the\nbackend AWS service API resource.",
              "type": "string"
            },
            "region": {
              "description": "Region is the AWS region in which the resource exists or will exist.",
              "type": "string"
            }
          },
          "required": [
            "ownerAccountID",
            "region"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "All CRs managed by ACK have a common `Status.Conditions` member that\ncontains a collection of `ackv1alpha1.Condition` objects that describe\nthe various terminal states of the CR and its backend AWS service API\nresource",
          "items": {
            "description": "Condition is the common struct used by all CRDs managed by ACK service\ncontrollers to indicate terminal states  of the CR and its backend AWS\nservice API resource",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the Condition",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "functionARN": {
          "description": "The ARN of the Lambda function.\n\nRegex Pattern: `^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$`",
          "type": "string"
        },
        "lastModified": {
          "description": "The date that the event source mapping was last updated or that its state\nchanged.",
          "format": "date-time",
          "type": "string"
        },
        "lastProcessingResult": {
          "description": "The result of the event source mapping's last processing attempt.",
          "type": "string"
        },
        "state": {
          "description": "The state of the event source mapping. It can be one of the following: Creating,\nEnabling, Enabled, Disabling, Disabled, Updating, or Deleting.",
          "type": "string"
        },
        "stateTransitionReason": {
          "description": "Indicates whether a user or Lambda made the last change to the event source\nmapping.",
          "type": "string"
        },
        "uuid": {
          "description": "The identifier of the event source mapping.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
