{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-cleanrooms-configuredtable.json",
  "title": "AWSCleanRoomsConfiguredTableProperties",
  "description": "Represents a table that can be associated with collaborations. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-cleanrooms-configuredtable.json",
    "sourceSha256": "2f5b3ccdeb67f4c94a591e788c11674afb4a275f0e7384d167dcd34c79876ac7"
  },
  "type": "object",
  "properties": {
    "Tags": {
      "description": "An arbitrary set of tags (key-value pairs) for this cleanrooms collaboration.",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "uniqueItems": true,
      "type": "array"
    },
    "AllowedColumns": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "type": "string",
        "maxLength": 128,
        "pattern": "^[a-z0-9_](([a-z0-9_ ]+-)*([a-z0-9_ ]+))?$"
      },
      "maxItems": 100,
      "minItems": 1
    },
    "AnalysisMethod": {
      "$ref": "#/$defs/AnalysisMethod"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 255,
          "pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t\\r\\n]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 100,
          "minLength": 1,
          "pattern": "^(?!\\s*$)[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDBFF-\\uDC00\\uDFFF\\t]*$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "AnalysisRules": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/AnalysisRule"
      },
      "maxItems": 1,
      "minItems": 1
    },
    "TableReference": {
      "$ref": "#/$defs/TableReference"
    }
  },
  "typeName": "AWS::CleanRooms::ConfiguredTable",
  "$defs": {
    "AnalysisRuleColumnName": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 127,
          "minLength": 1,
          "pattern": "^[a-z0-9_](([a-z0-9_ ]+-)*([a-z0-9_ ]+))?$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableAnalysisRuleColumnNameDefinition"
    },
    "AggregateColumn": {
      "type": "object",
      "properties": {
        "ColumnNames": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AnalysisRuleColumnName"
          },
          "minItems": 1
        },
        "Function": {
          "$ref": "#/$defs/AggregateFunctionName"
        }
      },
      "required": [
        "ColumnNames",
        "Function"
      ],
      "title": "AWSCleanRoomsConfiguredTableAggregateColumnDefinition",
      "additionalProperties": false
    },
    "AggregateFunctionName": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SUM",
            "SUM_DISTINCT",
            "COUNT",
            "COUNT_DISTINCT",
            "AVG"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableAggregateFunctionNameDefinition"
    },
    "AggregationConstraint": {
      "type": "object",
      "properties": {
        "ColumnName": {
          "$ref": "#/$defs/AnalysisRuleColumnName"
        },
        "Minimum": {
          "type": "number",
          "minimum": 2,
          "maximum": 100000
        },
        "Type": {
          "$ref": "#/$defs/AggregationType"
        }
      },
      "required": [
        "ColumnName",
        "Minimum",
        "Type"
      ],
      "title": "AWSCleanRoomsConfiguredTableAggregationConstraintDefinition",
      "additionalProperties": false
    },
    "AggregationType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "COUNT_DISTINCT"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableAggregationTypeDefinition"
    },
    "AnalysisMethod": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "DIRECT_QUERY"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableAnalysisMethodDefinition"
    },
    "JoinRequiredOption": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "QUERY_RUNNER"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableJoinRequiredOptionDefinition"
    },
    "ScalarFunctions": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "TRUNC",
            "ABS",
            "CEILING",
            "FLOOR",
            "LN",
            "LOG",
            "ROUND",
            "SQRT",
            "CAST",
            "LOWER",
            "RTRIM",
            "UPPER",
            "COALESCE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableScalarFunctionsDefinition"
    },
    "AnalysisRuleAggregation": {
      "type": "object",
      "properties": {
        "AggregateColumns": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AggregateColumn"
          },
          "minItems": 1
        },
        "JoinColumns": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AnalysisRuleColumnName"
          }
        },
        "JoinRequired": {
          "$ref": "#/$defs/JoinRequiredOption"
        },
        "DimensionColumns": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AnalysisRuleColumnName"
          }
        },
        "ScalarFunctions": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/ScalarFunctions"
          }
        },
        "OutputConstraints": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AggregationConstraint"
          },
          "minItems": 1
        }
      },
      "required": [
        "AggregateColumns",
        "JoinColumns",
        "DimensionColumns",
        "ScalarFunctions",
        "OutputConstraints"
      ],
      "title": "AWSCleanRoomsConfiguredTableAnalysisRuleAggregationDefinition",
      "additionalProperties": false
    },
    "AnalysisRuleList": {
      "type": "object",
      "properties": {
        "JoinColumns": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AnalysisRuleColumnName"
          },
          "minItems": 1
        },
        "ListColumns": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/AnalysisRuleColumnName"
          }
        }
      },
      "required": [
        "JoinColumns",
        "ListColumns"
      ],
      "title": "AWSCleanRoomsConfiguredTableAnalysisRuleListDefinition",
      "additionalProperties": false
    },
    "ConfiguredTableAnalysisRulePolicy": {
      "type": "object",
      "title": "V1",
      "properties": {
        "V1": {
          "$ref": "#/$defs/ConfiguredTableAnalysisRulePolicyV1"
        }
      },
      "required": [
        "V1"
      ],
      "additionalProperties": false
    },
    "ConfiguredTableAnalysisRulePolicyV1": {
      "oneOf": [
        {
          "type": "object",
          "title": "List",
          "properties": {
            "List": {
              "$ref": "#/$defs/AnalysisRuleList"
            }
          },
          "required": [
            "List"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "title": "Aggregation",
          "properties": {
            "Aggregation": {
              "$ref": "#/$defs/AnalysisRuleAggregation"
            }
          },
          "required": [
            "Aggregation"
          ],
          "additionalProperties": false
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableConfiguredTableAnalysisRulePolicyV1Definition"
    },
    "ConfiguredTableAnalysisRuleType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "AGGREGATION",
            "LIST"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSCleanRoomsConfiguredTableConfiguredTableAnalysisRuleTypeDefinition"
    },
    "GlueTableReference": {
      "type": "object",
      "properties": {
        "TableName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9_](([a-zA-Z0-9_ ]+-)*([a-zA-Z0-9_ ]+))?$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DatabaseName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9_](([a-zA-Z0-9_ ]+-)*([a-zA-Z0-9_ ]+))?$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "DatabaseName",
        "TableName"
      ],
      "title": "AWSCleanRoomsConfiguredTableGlueTableReferenceDefinition",
      "additionalProperties": false
    },
    "AnalysisRule": {
      "type": "object",
      "properties": {
        "Type": {
          "$ref": "#/$defs/ConfiguredTableAnalysisRuleType"
        },
        "Policy": {
          "$ref": "#/$defs/ConfiguredTableAnalysisRulePolicy"
        }
      },
      "required": [
        "Type",
        "Policy"
      ],
      "title": "AWSCleanRoomsConfiguredTableAnalysisRuleDefinition",
      "additionalProperties": false
    },
    "TableReference": {
      "type": "object",
      "title": "Glue",
      "properties": {
        "Glue": {
          "$ref": "#/$defs/GlueTableReference"
        }
      },
      "required": [
        "Glue"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSCleanRoomsConfiguredTableTagDefinition",
      "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": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "required": [
    "AllowedColumns",
    "AnalysisMethod",
    "Name",
    "TableReference"
  ],
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/ConfiguredTableIdentifier"
  ],
  "createOnlyProperties": [
    "/properties/AllowedColumns",
    "/properties/AnalysisMethod",
    "/properties/TableReference"
  ],
  "primaryIdentifier": [
    "/properties/ConfiguredTableIdentifier"
  ]
}
