{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-mwaa-environment.json",
  "title": "AWSMWAAEnvironmentProperties",
  "description": "Resource schema for AWS::MWAA::Environment. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mwaa.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-mwaa-environment.json",
    "sourceSha256": "34f463dc3e4458aae7b1682fef80bdf69bb39f858935fd4d21ea9910cd6bb1a6"
  },
  "type": "object",
  "properties": {
    "Name": {
      "$ref": "#/$defs/EnvironmentName"
    },
    "ExecutionRoleArn": {
      "$ref": "#/$defs/ExecutionRoleArn"
    },
    "KmsKey": {
      "$ref": "#/$defs/KmsKey"
    },
    "AirflowVersion": {
      "$ref": "#/$defs/AirflowVersion"
    },
    "SourceBucketArn": {
      "$ref": "#/$defs/S3BucketArn"
    },
    "DagS3Path": {
      "$ref": "#/$defs/RelativePath"
    },
    "PluginsS3Path": {
      "$ref": "#/$defs/RelativePath"
    },
    "PluginsS3ObjectVersion": {
      "$ref": "#/$defs/S3ObjectVersion"
    },
    "RequirementsS3Path": {
      "$ref": "#/$defs/RelativePath"
    },
    "RequirementsS3ObjectVersion": {
      "$ref": "#/$defs/S3ObjectVersion"
    },
    "StartupScriptS3Path": {
      "$ref": "#/$defs/RelativePath"
    },
    "StartupScriptS3ObjectVersion": {
      "$ref": "#/$defs/S3ObjectVersion"
    },
    "AirflowConfigurationOptions": {
      "type": "object",
      "description": "Key/value pairs representing Airflow configuration variables.\n    Keys are prefixed by their section:\n\n    [core]\n    dags_folder={AIRFLOW_HOME}/dags\n\n    Would be represented as\n\n    \"core.dags_folder\": \"{AIRFLOW_HOME}/dags\""
    },
    "EnvironmentClass": {
      "$ref": "#/$defs/EnvironmentClass"
    },
    "MaxWorkers": {
      "$ref": "#/$defs/MaxWorkers"
    },
    "MinWorkers": {
      "$ref": "#/$defs/MinWorkers"
    },
    "Schedulers": {
      "$ref": "#/$defs/Schedulers"
    },
    "NetworkConfiguration": {
      "$ref": "#/$defs/NetworkConfiguration"
    },
    "LoggingConfiguration": {
      "$ref": "#/$defs/LoggingConfiguration"
    },
    "WeeklyMaintenanceWindowStart": {
      "$ref": "#/$defs/WeeklyMaintenanceWindowStart"
    },
    "Tags": {
      "type": "object",
      "description": "A map of tags for the environment."
    },
    "WebserverAccessMode": {
      "$ref": "#/$defs/WebserverAccessMode"
    }
  },
  "typeName": "AWS::MWAA::Environment",
  "primaryIdentifier": [
    "/properties/Name"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-mwaa.git",
  "additionalProperties": false,
  "taggable": true,
  "$defs": {
    "EnvironmentName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "^[a-zA-Z][0-9a-zA-Z\\-_]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Customer-defined identifier for the environment, unique per customer region.",
      "title": "AWSMWAAEnvironmentEnvironmentNameDefinition"
    },
    "EnvironmentStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CREATING",
            "CREATE_FAILED",
            "AVAILABLE",
            "UPDATING",
            "DELETING",
            "DELETED",
            "UPDATE_FAILED",
            "UNAVAILABLE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The status of the environment.",
      "title": "AWSMWAAEnvironmentEnvironmentStatusDefinition"
    },
    "UpdateStatus": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "enum": [
            "SUCCESS",
            "PENDING",
            "FAILED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentUpdateStatusDefinition"
    },
    "UpdateError": {
      "type": "object",
      "description": "The error associated with an update request.",
      "title": "AWSMWAAEnvironmentUpdateErrorDefinition",
      "properties": {
        "ErrorCode": {
          "$ref": "#/$defs/ErrorCode"
        },
        "ErrorMessage": {
          "$ref": "#/$defs/ErrorMessage"
        }
      },
      "additionalProperties": false
    },
    "AirflowArn": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "minLength": 1,
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:airflow:[a-z0-9\\-]+:\\d{12}:environment/\\w+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentAirflowArnDefinition"
    },
    "EnvironmentArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:airflow:[a-z0-9\\-]+:\\d{12}:environment/\\w+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "ARN for the MWAA environment.",
      "title": "AWSMWAAEnvironmentEnvironmentArnDefinition"
    },
    "S3BucketArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:s3:::[a-z0-9.\\-]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "ARN for the AWS S3 bucket to use as the source of DAGs and plugins for the environment.",
      "title": "AWSMWAAEnvironmentS3BucketArnDefinition"
    },
    "CreatedAt": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "When the environment resource was created.",
      "title": "AWSMWAAEnvironmentCreatedAtDefinition"
    },
    "UpdateCreatedAt": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "When the update request was created.",
      "title": "AWSMWAAEnvironmentUpdateCreatedAtDefinition"
    },
    "WebserverUrl": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^https://.+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Url endpoint for the environment's Airflow UI.",
      "title": "AWSMWAAEnvironmentWebserverUrlDefinition"
    },
    "ExecutionRoleArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "IAM role to be used by tasks.",
      "title": "AWSMWAAEnvironmentExecutionRoleArnDefinition"
    },
    "ServiceRoleArn": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "IAM role to be used by MWAA to perform AWS API calls on behalf of the customer.",
      "title": "AWSMWAAEnvironmentServiceRoleArnDefinition"
    },
    "KmsKey": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1224,
          "pattern": "^(((arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\\d:\\d+:)?key\\/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|(arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):kms:[a-z]{2}-[a-z]+-\\d:\\d+:)?alias/.+)$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for MWAA data encryption.\n\n    You can specify the CMK using any of the following:\n\n    Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab.\n\n    Key alias. For example, alias/ExampleAlias.\n\n    Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.\n\n    Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.\n\n    AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.",
      "title": "AWSMWAAEnvironmentKmsKeyDefinition"
    },
    "AirflowVersion": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 32,
          "pattern": "^[0-9a-z.]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Version of airflow to deploy to the environment.",
      "title": "AWSMWAAEnvironmentAirflowVersionDefinition"
    },
    "RelativePath": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": ".*"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Represents an S3 prefix relative to the root of an S3 bucket.",
      "title": "AWSMWAAEnvironmentRelativePathDefinition"
    },
    "ConfigKey": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "maxLength": 64,
          "pattern": "^[a-z]+([a-z._]*[a-z]+)?$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentConfigKeyDefinition"
    },
    "ConfigValue": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "maxLength": 256,
          "pattern": ".*"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentConfigValueDefinition"
    },
    "SecurityGroupId": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^sg-[a-zA-Z0-9\\-._]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentSecurityGroupIdDefinition"
    },
    "SubnetId": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "maxLength": 1024,
          "pattern": "^subnet-[a-zA-Z0-9\\-._]+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentSubnetIdDefinition"
    },
    "CloudWatchLogGroupArn": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "maxLength": 1224,
          "pattern": "^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b)(-[a-z]+)?:logs:[a-z0-9\\-]+:\\d{12}:log-group:\\w+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentCloudWatchLogGroupArnDefinition"
    },
    "LoggingEnabled": {
      "type": "boolean",
      "description": "",
      "title": "AWSMWAAEnvironmentLoggingEnabledDefinition"
    },
    "LoggingLevel": {
      "oneOf": [
        {
          "type": "string",
          "description": "",
          "enum": [
            "CRITICAL",
            "ERROR",
            "WARNING",
            "INFO",
            "DEBUG"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSMWAAEnvironmentLoggingLevelDefinition"
    },
    "EnvironmentClass": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Templated configuration for airflow processes and backing infrastructure.",
      "title": "AWSMWAAEnvironmentEnvironmentClassDefinition"
    },
    "MaxWorkers": {
      "type": "integer",
      "description": "Maximum worker compute units.",
      "minimum": 1,
      "title": "AWSMWAAEnvironmentMaxWorkersDefinition"
    },
    "MinWorkers": {
      "type": "integer",
      "description": "Minimum worker compute units.",
      "minimum": 1,
      "title": "AWSMWAAEnvironmentMinWorkersDefinition"
    },
    "Schedulers": {
      "type": "integer",
      "description": "Scheduler compute units.",
      "minimum": 1,
      "title": "AWSMWAAEnvironmentSchedulersDefinition"
    },
    "NetworkConfiguration": {
      "type": "object",
      "description": "Configures the network resources of the environment.",
      "title": "AWSMWAAEnvironmentNetworkConfigurationDefinition",
      "properties": {
        "SubnetIds": {
          "type": "array",
          "insertionOrder": true,
          "description": "A list of subnets to use for the environment. These must be private subnets, in the same VPC, in two different availability zones.",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "$ref": "#/$defs/SubnetId"
          }
        },
        "SecurityGroupIds": {
          "type": "array",
          "insertionOrder": true,
          "description": "A list of security groups to use for the environment.",
          "minItems": 1,
          "maxItems": 5,
          "items": {
            "$ref": "#/$defs/SecurityGroupId"
          }
        }
      },
      "additionalProperties": false
    },
    "LoggingConfiguration": {
      "type": "object",
      "description": "Logging configuration for the environment.",
      "title": "AWSMWAAEnvironmentLoggingConfigurationDefinition",
      "properties": {
        "DagProcessingLogs": {
          "$ref": "#/$defs/ModuleLoggingConfiguration"
        },
        "SchedulerLogs": {
          "$ref": "#/$defs/ModuleLoggingConfiguration"
        },
        "WebserverLogs": {
          "$ref": "#/$defs/ModuleLoggingConfiguration"
        },
        "WorkerLogs": {
          "$ref": "#/$defs/ModuleLoggingConfiguration"
        },
        "TaskLogs": {
          "$ref": "#/$defs/ModuleLoggingConfiguration"
        }
      },
      "additionalProperties": false
    },
    "LoggingConfigurationInput": {
      "type": "object",
      "description": "Configures logging for the environment.",
      "title": "AWSMWAAEnvironmentLoggingConfigurationInputDefinition",
      "properties": {
        "DagProcessingLogs": {
          "$ref": "#/$defs/ModuleLoggingConfigurationInput"
        },
        "SchedulerLogs": {
          "$ref": "#/$defs/ModuleLoggingConfigurationInput"
        },
        "WebserverLogs": {
          "$ref": "#/$defs/ModuleLoggingConfigurationInput"
        },
        "WorkerLogs": {
          "$ref": "#/$defs/ModuleLoggingConfigurationInput"
        },
        "TaskLogs": {
          "$ref": "#/$defs/ModuleLoggingConfigurationInput"
        }
      },
      "additionalProperties": false
    },
    "ModuleLoggingConfiguration": {
      "type": "object",
      "description": "Logging configuration for a specific airflow component.",
      "title": "AWSMWAAEnvironmentModuleLoggingConfigurationDefinition",
      "properties": {
        "Enabled": {
          "$ref": "#/$defs/LoggingEnabled"
        },
        "LogLevel": {
          "$ref": "#/$defs/LoggingLevel"
        },
        "CloudWatchLogGroupArn": {
          "$ref": "#/$defs/CloudWatchLogGroupArn"
        }
      },
      "additionalProperties": false
    },
    "ModuleLoggingConfigurationInput": {
      "type": "object",
      "description": "Configures airflow component logging for the environment.",
      "title": "AWSMWAAEnvironmentModuleLoggingConfigurationInputDefinition",
      "properties": {
        "Enabled": {
          "$ref": "#/$defs/LoggingEnabled"
        },
        "LogLevel": {
          "$ref": "#/$defs/LoggingLevel"
        }
      },
      "additionalProperties": false
    },
    "LastUpdate": {
      "type": "object",
      "description": "Details about the last update performed on the environment.",
      "title": "AWSMWAAEnvironmentLastUpdateDefinition",
      "properties": {
        "Status": {
          "$ref": "#/$defs/UpdateStatus"
        },
        "CreatedAt": {
          "$ref": "#/$defs/UpdateCreatedAt"
        },
        "Error": {
          "$ref": "#/$defs/UpdateError"
        }
      },
      "additionalProperties": false
    },
    "ErrorCode": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The error code associated with an error.",
      "title": "AWSMWAAEnvironmentErrorCodeDefinition"
    },
    "ErrorMessage": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "pattern": "^.+$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Error message describing a failed operation.",
      "title": "AWSMWAAEnvironmentErrorMessageDefinition"
    },
    "S3ObjectVersion": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 1024
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Represents an version ID for an S3 object.",
      "title": "AWSMWAAEnvironmentS3ObjectVersionDefinition"
    },
    "WeeklyMaintenanceWindowStart": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 9,
          "pattern": "(MON|TUE|WED|THU|FRI|SAT|SUN):([01]\\d|2[0-3]):(00|30)"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Start time for the weekly maintenance window.",
      "title": "AWSMWAAEnvironmentWeeklyMaintenanceWindowStartDefinition"
    },
    "WebserverAccessMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PRIVATE_ONLY",
            "PUBLIC_ONLY"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Choice for mode of webserver access including over public internet or via private VPC endpoint.",
      "title": "AWSMWAAEnvironmentWebserverAccessModeDefinition"
    }
  },
  "required": [
    "Name"
  ],
  "createOnlyProperties": [
    "/properties/Name",
    "/properties/KmsKey",
    "/properties/NetworkConfiguration/SubnetIds"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/WebserverUrl",
    "/properties/LoggingConfiguration/DagProcessingLogs/CloudWatchLogGroupArn",
    "/properties/LoggingConfiguration/SchedulerLogs/CloudWatchLogGroupArn",
    "/properties/LoggingConfiguration/WebserverLogs/CloudWatchLogGroupArn",
    "/properties/LoggingConfiguration/WorkerLogs/CloudWatchLogGroupArn",
    "/properties/LoggingConfiguration/TaskLogs/CloudWatchLogGroupArn"
  ]
}
