{
  "description": "Function is the Schema for the Functions 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": "FunctionSpec defines the desired state of Function.",
      "properties": {
        "architectures": {
          "description": "The instruction set architecture that the function supports. Enter a string\narray with one of the valid values (arm64 or x86_64). The default value is\nx86_64.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "code": {
          "description": "The code for the function.",
          "properties": {
            "imageURI": {
              "type": "string"
            },
            "s3Bucket": {
              "type": "string"
            },
            "s3BucketRef": {
              "description": "Reference field for S3Bucket",
              "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
            },
            "s3Key": {
              "type": "string"
            },
            "s3ObjectVersion": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            },
            "zipFile": {
              "format": "byte",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "codeSigningConfigARN": {
          "description": "To enable code signing for this function, specify the ARN of a code-signing\nconfiguration. A code-signing configuration includes a set of signing profiles,\nwhich define the trusted publishers for this function.\n\nRegex Pattern: `^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:code-signing-config:csc-[a-z0-9]{17}$`",
          "type": "string"
        },
        "deadLetterConfig": {
          "description": "A dead-letter queue configuration that specifies the queue or topic where\nLambda sends asynchronous events when they fail processing. For more information,\nsee Dead-letter queues (https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq).",
          "properties": {
            "targetARN": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "description": {
          "description": "A description of the function.",
          "type": "string"
        },
        "environment": {
          "description": "Environment variables that are accessible from function code during execution.",
          "properties": {
            "variables": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "ephemeralStorage": {
          "description": "The size of the function's /tmp directory in MB. The default value is 512,\nbut can be any whole number between 512 and 10,240 MB. For more information,\nsee Configuring ephemeral storage (console) (https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage).",
          "properties": {
            "size": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "fileSystemConfigs": {
          "description": "Connection settings for an Amazon EFS file system.",
          "items": {
            "description": "Details about the connection between a Lambda function and an Amazon EFS\nfile system (https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html).",
            "properties": {
              "arn": {
                "type": "string"
              },
              "localMountPath": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "functionEventInvokeConfig": {
          "description": "Configures options for asynchronous invocation on a function.\n\n- DestinationConfig\nA destination for events after they have been sent to a function for processing.\n\nTypes of Destinations:\nFunction - The Amazon Resource Name (ARN) of a Lambda function.\nQueue - The ARN of a standard SQS queue.\nTopic - The ARN of a standard SNS topic.\nEvent Bus - The ARN of an Amazon EventBridge event bus.\n\n- MaximumEventAgeInSeconds\nThe maximum age of a request that Lambda sends to a function for processing.\n\n- MaximumRetryAttempts\nThe maximum number of times to retry when the function returns an error.",
          "properties": {
            "destinationConfig": {
              "description": "A configuration object that specifies the destination of an event after Lambda\nprocesses 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": "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
            },
            "functionName": {
              "type": "string"
            },
            "maximumEventAgeInSeconds": {
              "format": "int64",
              "type": "integer"
            },
            "maximumRetryAttempts": {
              "format": "int64",
              "type": "integer"
            },
            "qualifier": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "handler": {
          "description": "The name of the method within your code that Lambda calls to run your function.\nHandler is required if the deployment package is a .zip file archive. The\nformat includes the file name. It can also include namespaces and other qualifiers,\ndepending on the runtime. For more information, see Lambda programming model\n(https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html).\n\nRegex Pattern: `^[^\\s]+$`",
          "type": "string"
        },
        "imageConfig": {
          "description": "Container image configuration values (https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms)\nthat override the values in the container image Dockerfile.",
          "properties": {
            "command": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "entryPoint": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "workingDirectory": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "kmsKeyARN": {
          "description": "The ARN of the Key Management Service (KMS) customer managed key that's used\nto encrypt the following resources:\n\n  - The function's environment variables (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption).\n\n  - The function's Lambda SnapStart (https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html)\n    snapshots.\n\n  - When used with SourceKMSKeyArn, the unzipped version of the .zip deployment\n    package that's used for function invocations. For more information, see\n    Specifying a customer managed key for Lambda (https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption).\n\n  - The optimized version of the container image that's used for function\n    invocations. Note that this is not the same key that's used to protect\n    your container image in the Amazon Elastic Container Registry (Amazon\n    ECR). For more information, see Function lifecycle (https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle).\n\nIf you don't provide a customer managed key, Lambda uses an Amazon Web Services\nowned key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk)\nor an Amazon Web Services managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).\n\nRegex Pattern: `^(arn:(aws[a-zA-Z-]*)?:[a-z0-9-.]+:.*)|()$`",
          "type": "string"
        },
        "kmsKeyRef": {
          "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
        },
        "layers": {
          "description": "A list of function layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)\nto add to the function's execution environment. Specify each layer by its\nARN, including the version.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "loggingConfig": {
          "description": "The function's Amazon CloudWatch Logs configuration settings.",
          "properties": {
            "applicationLogLevel": {
              "type": "string"
            },
            "logFormat": {
              "type": "string"
            },
            "logGroup": {
              "type": "string"
            },
            "systemLogLevel": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "memorySize": {
          "description": "The amount of memory available to the function (https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console)\nat runtime. Increasing the function memory also increases its CPU allocation.\nThe default value is 128 MB. The value can be any multiple of 1 MB.",
          "format": "int64",
          "type": "integer"
        },
        "name": {
          "description": "The name or ARN of the Lambda function.\n\nName formats\n\n  - Function name \u2013 my-function.\n\n  - Function ARN \u2013 arn:aws:lambda:us-west-2:123456789012:function:my-function.\n\n  - Partial ARN \u2013 123456789012:function:my-function.\n\nThe length constraint applies only to the full ARN. If you specify only the\nfunction name, it is 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"
        },
        "packageType": {
          "description": "The type of deployment package. Set to Image for container image and set\nto Zip for .zip file archive.",
          "type": "string"
        },
        "publish": {
          "description": "Set to true to publish the first version of the function during creation.",
          "type": "boolean"
        },
        "reservedConcurrentExecutions": {
          "description": "The number of simultaneous executions to reserve for the function.",
          "format": "int64",
          "type": "integer"
        },
        "role": {
          "description": "The Amazon Resource Name (ARN) of the function's execution role.\n\nRegex Pattern: `^arn:(aws[a-zA-Z-]*)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$`",
          "type": "string"
        },
        "roleRef": {
          "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
        },
        "runtime": {
          "description": "The identifier of the function's runtime (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).\nRuntime is required if the deployment package is a .zip file archive. Specifying\na runtime results in an error if you're deploying a function using a container\nimage.\n\nThe following list includes deprecated runtimes. Lambda blocks creating new\nfunctions and updating existing functions shortly after each runtime is deprecated.\nFor more information, see Runtime use after deprecation (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels).\n\nFor a list of all currently supported runtimes, see Supported runtimes (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported).",
          "type": "string"
        },
        "snapStart": {
          "description": "The function's SnapStart (https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html)\nsetting.",
          "properties": {
            "applyOn": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "A list of tags (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html)\nto apply to the function.",
          "type": "object"
        },
        "timeout": {
          "description": "The amount of time (in seconds) that Lambda allows a function to run before\nstopping it. The default is 3 seconds. The maximum allowed value is 900 seconds.\nFor more information, see Lambda execution environment (https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html).",
          "format": "int64",
          "type": "integer"
        },
        "tracingConfig": {
          "description": "Set Mode to Active to sample and trace a subset of incoming requests with\nX-Ray (https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html).",
          "properties": {
            "mode": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "vpcConfig": {
          "description": "For network connectivity to Amazon Web Services resources in a VPC, specify\na list of security groups and subnets in the VPC. When you connect a function\nto a VPC, it can access resources and the internet only through that VPC.\nFor more information, see Configuring a Lambda function to access resources\nin a VPC (https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).",
          "properties": {
            "securityGroupIDs": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "securityGroupRefs": {
              "description": "Reference field for SecurityGroupIDs",
              "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"
            },
            "subnetIDs": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "subnetRefs": {
              "description": "Reference field for SubnetIDs",
              "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"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "name"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "FunctionStatus defines the observed state of Function",
      "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
        },
        "codeSHA256": {
          "description": "The SHA256 hash of the function's deployment package.",
          "type": "string"
        },
        "codeSize": {
          "description": "The size of the function's deployment package, in bytes.",
          "format": "int64",
          "type": "integer"
        },
        "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"
        },
        "imageConfigResponse": {
          "description": "The function's image configuration values.",
          "properties": {
            "error": {
              "description": "Error response to GetFunctionConfiguration.",
              "properties": {
                "errorCode": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "imageConfig": {
              "description": "Configuration values that override the container image Dockerfile settings.\nFor more information, see Container image settings (https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms).",
              "properties": {
                "command": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "entryPoint": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "workingDirectory": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "lastModified": {
          "description": "The date and time that the function was last updated, in ISO-8601 format\n(https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD).",
          "type": "string"
        },
        "lastUpdateStatus": {
          "description": "The status of the last update that was performed on the function. This is\nfirst set to Successful after function creation completes.",
          "type": "string"
        },
        "lastUpdateStatusReason": {
          "description": "The reason for the last update that was performed on the function.",
          "type": "string"
        },
        "lastUpdateStatusReasonCode": {
          "description": "The reason code for the last update that was performed on the function.",
          "type": "string"
        },
        "layerStatuses": {
          "description": "The function's layers (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).",
          "items": {
            "description": "An Lambda layer (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).",
            "properties": {
              "arn": {
                "type": "string"
              },
              "codeSize": {
                "format": "int64",
                "type": "integer"
              },
              "signingJobARN": {
                "type": "string"
              },
              "signingProfileVersionARN": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "masterARN": {
          "description": "For Lambda@Edge functions, the ARN of the main 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"
        },
        "revisionID": {
          "description": "The latest updated revision of the function or alias.",
          "type": "string"
        },
        "signingJobARN": {
          "description": "The ARN of the signing job.\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"
        },
        "signingProfileVersionARN": {
          "description": "The ARN of the signing profile version.\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"
        },
        "state": {
          "description": "The current state of the function. When the state is Inactive, you can reactivate\nthe function by invoking it.",
          "type": "string"
        },
        "stateReason": {
          "description": "The reason for the function's current state.",
          "type": "string"
        },
        "stateReasonCode": {
          "description": "The reason code for the function's current state. When the code is Creating,\nyou can't invoke or modify the function.",
          "type": "string"
        },
        "version": {
          "description": "The version of the Lambda function.\n\nRegex Pattern: `^(\\$LATEST|[0-9]+)$`",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
