{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-timestream-table.json",
  "title": "AWSTimestreamTableProperties",
  "description": "The AWS::Timestream::Table resource creates a Timestream Table.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-timestream.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-timestream-table.json",
    "sourceSha256": "cb9155060fb7ad82c642d41999fa049bcfc618c3f460cce75d866e217643cffa"
  },
  "type": "object",
  "properties": {
    "DatabaseName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_.-]{3,256}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name for the database which the table to be created belongs to."
    },
    "TableName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_.-]{3,256}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name for the table. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the table name."
    },
    "RetentionProperties": {
      "description": "The retention duration of the memory store and the magnetic store.",
      "type": "object",
      "properties": {
        "MemoryStoreRetentionPeriodInHours": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The duration for which data must be stored in the memory store."
        },
        "MagneticStoreRetentionPeriodInDays": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The duration for which data must be stored in the magnetic store."
        }
      },
      "additionalProperties": false
    },
    "MagneticStoreWriteProperties": {
      "description": "The properties that determine whether magnetic store writes are enabled.",
      "type": "object",
      "properties": {
        "EnableMagneticStoreWrites": {
          "description": "Boolean flag indicating whether magnetic store writes are enabled.",
          "type": "boolean"
        },
        "MagneticStoreRejectedDataLocation": {
          "description": "Location to store information about records that were asynchronously rejected during magnetic store writes.",
          "type": "object",
          "properties": {
            "S3Configuration": {
              "description": "S3 configuration for location to store rejections from magnetic store writes",
              "type": "object",
              "properties": {
                "BucketName": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "The bucket name used to store the data."
                },
                "ObjectKeyPrefix": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "String used to prefix all data in the bucket."
                },
                "EncryptionOption": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "Either SSE_KMS or SSE_S3."
                },
                "KmsKeyId": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                    }
                  ],
                  "description": "Must be provided if SSE_KMS is specified as the encryption option"
                }
              },
              "required": [
                "EncryptionOption",
                "BucketName"
              ],
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "EnableMagneticStoreWrites"
      ],
      "additionalProperties": false
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "maxItems": 200,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::Timestream::Table",
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/Name"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-timestream.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/DatabaseName",
    "/properties/TableName"
  ],
  "$defs": {
    "Tag": {
      "description": "You can use the Resource Tags property to apply tags to resources, which can help you identify and categorize those resources.",
      "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"
            }
          ]
        }
      },
      "title": "AWSTimestreamTableTagDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "DatabaseName"
  ],
  "primaryIdentifier": [
    "/properties/DatabaseName",
    "/properties/TableName"
  ]
}
