{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-athena-workgroup.json",
  "title": "AWSAthenaWorkGroupProperties",
  "description": "Resource schema for AWS::Athena::WorkGroup. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-athena.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-athena-workgroup.json",
    "sourceSha256": "9e90d1b6cfdf180efb022f5d68293111ec750850648389609dd2624ac95e2305"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "pattern": "[a-zA-Z0-9._-]{1,128}",
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The workGroup name."
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 0,
          "maxLength": 1024
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The workgroup description."
    },
    "Tags": {
      "description": "One or more tags, separated by commas, that you want to attach to the workgroup as you create it",
      "$ref": "#/$defs/Tags"
    },
    "WorkGroupConfiguration": {
      "description": "The workgroup configuration",
      "$ref": "#/$defs/WorkGroupConfiguration"
    },
    "WorkGroupConfigurationUpdates": {
      "description": "The workgroup configuration update object",
      "$ref": "#/$defs/WorkGroupConfigurationUpdates"
    },
    "State": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The state of the workgroup: ENABLED or DISABLED."
    },
    "RecursiveDeleteOption": {
      "description": "The option to delete the workgroup and its contents even if the workgroup contains any named queries.",
      "type": "boolean"
    }
  },
  "$comment": "Resource Schema for AWS::Athena::WorkGroup. Any changes made to SDK model for WorkGroup should be reflected here.",
  "typeName": "AWS::Athena::WorkGroup",
  "taggable": true,
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-athena.git",
  "additionalProperties": false,
  "$defs": {
    "Tags": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "title": "AWSAthenaWorkGroupTagsDefinition"
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSAthenaWorkGroupTagDefinition",
      "additionalProperties": false
    },
    "SelectedEngineVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including Auto. The default is Auto.",
      "title": "AWSAthenaWorkGroupSelectedEngineVersionDefinition"
    },
    "EffectiveEngineVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.",
      "title": "AWSAthenaWorkGroupEffectiveEngineVersionDefinition"
    },
    "EngineVersion": {
      "description": "The Athena engine version for running queries.",
      "type": "object",
      "properties": {
        "SelectedEngineVersion": {
          "$ref": "#/$defs/SelectedEngineVersion"
        },
        "EffectiveEngineVersion": {
          "$ref": "#/$defs/EffectiveEngineVersion"
        }
      },
      "title": "AWSAthenaWorkGroupEngineVersionDefinition",
      "additionalProperties": false
    },
    "BytesScannedCutoffPerQuery": {
      "description": "The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.",
      "type": "integer",
      "format": "int64",
      "minimum": 10000000,
      "title": "AWSAthenaWorkGroupBytesScannedCutoffPerQueryDefinition"
    },
    "EnforceWorkGroupConfiguration": {
      "description": "If set to \"true\", the settings for the workgroup override client-side settings. If set to \"false\", client-side settings are used",
      "type": "boolean",
      "title": "AWSAthenaWorkGroupEnforceWorkGroupConfigurationDefinition"
    },
    "PublishCloudWatchMetricsEnabled": {
      "description": "Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.",
      "type": "boolean",
      "title": "AWSAthenaWorkGroupPublishCloudWatchMetricsEnabledDefinition"
    },
    "RequesterPaysEnabled": {
      "description": "If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. ",
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRequesterPaysEnabledDefinition"
    },
    "OutputLocation": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration",
      "title": "AWSAthenaWorkGroupOutputLocationDefinition"
    },
    "KmsKey": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. ",
      "title": "AWSAthenaWorkGroupKmsKeyDefinition"
    },
    "EncryptionOption": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SSE_S3",
            "SSE_KMS",
            "CSE_KMS"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or client-side encryption with KMS-managed keys (CSE-KMS) is used.",
      "title": "AWSAthenaWorkGroupEncryptionOptionDefinition"
    },
    "RemoveBytesScannedCutoffPerQuery": {
      "description": "Indicates that the data usage control limit per query is removed.",
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveBytesScannedCutoffPerQueryDefinition"
    },
    "EncryptionConfiguration": {
      "description": "If query results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE-KMS or CSE-KMS) and key information.",
      "type": "object",
      "properties": {
        "EncryptionOption": {
          "$ref": "#/$defs/EncryptionOption"
        },
        "KmsKey": {
          "$ref": "#/$defs/KmsKey"
        }
      },
      "required": [
        "EncryptionOption"
      ],
      "title": "AWSAthenaWorkGroupEncryptionConfigurationDefinition",
      "additionalProperties": false
    },
    "RemoveEncryptionConfiguration": {
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveEncryptionConfigurationDefinition"
    },
    "AdditionalConfiguration": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Additional Configuration that are passed to Athena Spark Calculations running in this workgroup",
      "title": "AWSAthenaWorkGroupAdditionalConfigurationDefinition"
    },
    "ExecutionRole": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Execution Role ARN required to run Athena Spark Calculations",
      "title": "AWSAthenaWorkGroupExecutionRoleDefinition"
    },
    "RemoveOutputLocation": {
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveOutputLocationDefinition"
    },
    "ExpectedBucketOwner": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The AWS account ID of the owner of S3 bucket where query results are stored",
      "title": "AWSAthenaWorkGroupExpectedBucketOwnerDefinition"
    },
    "RemoveExpectedBucketOwner": {
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveExpectedBucketOwnerDefinition"
    },
    "S3AclOption": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "BUCKET_OWNER_FULL_CONTROL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is BUCKET_OWNER_FULL_CONTROL",
      "title": "AWSAthenaWorkGroupS3AclOptionDefinition"
    },
    "AclConfiguration": {
      "description": "Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results",
      "type": "object",
      "properties": {
        "S3AclOption": {
          "$ref": "#/$defs/S3AclOption"
        }
      },
      "required": [
        "S3AclOption"
      ],
      "title": "AWSAthenaWorkGroupAclConfigurationDefinition",
      "additionalProperties": false
    },
    "RemoveAclConfiguration": {
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveAclConfigurationDefinition"
    },
    "CustomerContentEncryptionConfiguration": {
      "description": "Indicates the KMS key for encrypting notebook content.",
      "type": "object",
      "properties": {
        "KmsKey": {
          "$ref": "#/$defs/KmsKey"
        }
      },
      "required": [
        "KmsKey"
      ],
      "title": "AWSAthenaWorkGroupCustomerContentEncryptionConfigurationDefinition",
      "additionalProperties": false
    },
    "RemoveCustomerContentEncryptionConfiguration": {
      "type": "boolean",
      "title": "AWSAthenaWorkGroupRemoveCustomerContentEncryptionConfigurationDefinition"
    },
    "ResultConfiguration": {
      "description": "The location in Amazon S3 where query results are stored and the encryption option, if any, used for query results. These are known as \"client-side settings\". If workgroup settings override client-side settings, then the query uses the workgroup settings.\n",
      "type": "object",
      "properties": {
        "EncryptionConfiguration": {
          "$ref": "#/$defs/EncryptionConfiguration"
        },
        "OutputLocation": {
          "$ref": "#/$defs/OutputLocation"
        },
        "ExpectedBucketOwner": {
          "$ref": "#/$defs/ExpectedBucketOwner"
        },
        "AclConfiguration": {
          "$ref": "#/$defs/AclConfiguration"
        }
      },
      "title": "AWSAthenaWorkGroupResultConfigurationDefinition",
      "additionalProperties": false
    },
    "ResultConfigurationUpdates": {
      "description": "The result configuration information about the queries in this workgroup that will be updated. Includes the updated results location and an updated option for encrypting query results. ",
      "type": "object",
      "properties": {
        "EncryptionConfiguration": {
          "$ref": "#/$defs/EncryptionConfiguration"
        },
        "OutputLocation": {
          "$ref": "#/$defs/OutputLocation"
        },
        "ExpectedBucketOwner": {
          "$ref": "#/$defs/ExpectedBucketOwner"
        },
        "AclConfiguration": {
          "$ref": "#/$defs/AclConfiguration"
        },
        "RemoveEncryptionConfiguration": {
          "$ref": "#/$defs/RemoveEncryptionConfiguration"
        },
        "RemoveOutputLocation": {
          "$ref": "#/$defs/RemoveOutputLocation"
        },
        "RemoveExpectedBucketOwner": {
          "$ref": "#/$defs/RemoveExpectedBucketOwner"
        },
        "RemoveAclConfiguration": {
          "$ref": "#/$defs/RemoveAclConfiguration"
        }
      },
      "title": "AWSAthenaWorkGroupResultConfigurationUpdatesDefinition",
      "additionalProperties": false
    },
    "WorkGroupConfiguration": {
      "type": "object",
      "properties": {
        "BytesScannedCutoffPerQuery": {
          "$ref": "#/$defs/BytesScannedCutoffPerQuery"
        },
        "EnforceWorkGroupConfiguration": {
          "$ref": "#/$defs/EnforceWorkGroupConfiguration"
        },
        "PublishCloudWatchMetricsEnabled": {
          "$ref": "#/$defs/PublishCloudWatchMetricsEnabled"
        },
        "RequesterPaysEnabled": {
          "$ref": "#/$defs/RequesterPaysEnabled"
        },
        "ResultConfiguration": {
          "$ref": "#/$defs/ResultConfiguration"
        },
        "EngineVersion": {
          "$ref": "#/$defs/EngineVersion"
        },
        "AdditionalConfiguration": {
          "$ref": "#/$defs/AdditionalConfiguration"
        },
        "ExecutionRole": {
          "$ref": "#/$defs/ExecutionRole"
        },
        "CustomerContentEncryptionConfiguration": {
          "$ref": "#/$defs/CustomerContentEncryptionConfiguration"
        }
      },
      "title": "AWSAthenaWorkGroupWorkGroupConfigurationDefinition",
      "additionalProperties": false
    },
    "WorkGroupConfigurationUpdates": {
      "type": "object",
      "description": "The configuration information that will be updated for this workgroup, which includes the location in Amazon S3 where query results are stored, the encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, whether the workgroup settings override the client-side settings, and the data usage limit for the amount of bytes scanned per query, if it is specified. ",
      "properties": {
        "BytesScannedCutoffPerQuery": {
          "$ref": "#/$defs/BytesScannedCutoffPerQuery"
        },
        "EnforceWorkGroupConfiguration": {
          "$ref": "#/$defs/EnforceWorkGroupConfiguration"
        },
        "PublishCloudWatchMetricsEnabled": {
          "$ref": "#/$defs/PublishCloudWatchMetricsEnabled"
        },
        "RequesterPaysEnabled": {
          "$ref": "#/$defs/RequesterPaysEnabled"
        },
        "ResultConfigurationUpdates": {
          "$ref": "#/$defs/ResultConfigurationUpdates"
        },
        "RemoveBytesScannedCutoffPerQuery": {
          "$ref": "#/$defs/RemoveBytesScannedCutoffPerQuery"
        },
        "EngineVersion": {
          "$ref": "#/$defs/EngineVersion"
        },
        "AdditionalConfiguration": {
          "$ref": "#/$defs/AdditionalConfiguration"
        },
        "ExecutionRole": {
          "$ref": "#/$defs/ExecutionRole"
        },
        "CustomerContentEncryptionConfiguration": {
          "$ref": "#/$defs/CustomerContentEncryptionConfiguration"
        },
        "RemoveCustomerContentEncryptionConfiguration": {
          "$ref": "#/$defs/RemoveCustomerContentEncryptionConfiguration"
        }
      },
      "title": "AWSAthenaWorkGroupWorkGroupConfigurationUpdatesDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "Name"
  ],
  "readOnlyProperties": [
    "/properties/CreationTime",
    "/properties/WorkGroupConfiguration/EngineVersion/EffectiveEngineVersion",
    "/properties/WorkGroupConfigurationUpdates/EngineVersion/EffectiveEngineVersion"
  ],
  "createOnlyProperties": [
    "/properties/Name"
  ],
  "deprecatedProperties": [
    "/properties/WorkGroupConfigurationUpdates"
  ],
  "writeOnlyProperties": [
    "/properties/WorkGroupConfigurationUpdates",
    "/properties/RecursiveDeleteOption",
    "/properties/WorkGroupConfiguration/AdditionalConfiguration"
  ],
  "primaryIdentifier": [
    "/properties/Name"
  ]
}
