{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-redshiftserverless-namespace.json",
  "title": "AWSRedshiftServerlessNamespaceProperties",
  "description": "Definition of AWS::RedshiftServerless::Namespace Resource Type. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-redshift-serverless>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-redshiftserverless-namespace.json",
    "sourceSha256": "b1569d24c7ef22925b377205716bb71efebc310476ac382deeabd39e345c2b79"
  },
  "type": "object",
  "properties": {
    "AdminUserPassword": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 8,
          "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[^\\x00-\\x20\\x22\\x27\\x2f\\x40\\x5c\\x7f-\\uffff]+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The password associated with the admin user for the namespace that is being created. Password must be at least 8 characters in length, should be any printable ASCII character. Must contain at least one lowercase letter, one uppercase letter and one decimal digit."
    },
    "Tags": {
      "description": "The list of tags for the namespace.",
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "maxItems": 200,
      "minItems": 0
    },
    "FinalSnapshotName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "[a-z][a-z0-9]*(-[a-z0-9]+)*",
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the namespace the source snapshot was created from. Please specify the name if needed before deleting namespace"
    },
    "FinalSnapshotRetentionPeriod": {
      "description": "The number of days to retain automated snapshot in the destination region after they are copied from the source region. If the value is -1, the manual snapshot is retained indefinitely. The value must be either -1 or an integer between 1 and 3,653.",
      "type": "integer"
    }
  },
  "typeName": "AWS::RedshiftServerless::Namespace",
  "$defs": {
    "LogExport": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "useractivitylog",
            "userlog",
            "connectionlog"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSRedshiftServerlessNamespaceLogExportDefinition"
    },
    "Namespace": {
      "type": "object",
      "properties": {
        "NamespaceArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "NamespaceId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "NamespaceName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 64,
              "minLength": 3,
              "pattern": "^[a-z0-9-]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "AdminUsername": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DbName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "[a-zA-Z][a-zA-Z_0-9+.@-]*"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "KmsKeyId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DefaultIamRoleArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "IamRoles": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "type": "string",
            "maxLength": 512,
            "minLength": 0
          }
        },
        "LogExports": {
          "type": "array",
          "insertionOrder": false,
          "items": {
            "$ref": "#/$defs/LogExport"
          },
          "maxItems": 16,
          "minItems": 0
        },
        "Status": {
          "$ref": "#/$defs/NamespaceStatus"
        },
        "CreationDate": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSRedshiftServerlessNamespaceNamespaceDefinition",
      "additionalProperties": false
    },
    "NamespaceStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "AVAILABLE",
            "MODIFYING",
            "DELETING"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSRedshiftServerlessNamespaceNamespaceStatusDefinition"
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256,
              "minLength": 0
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSRedshiftServerlessNamespaceTagDefinition",
      "additionalProperties": false
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-redshift-serverless",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/NamespaceName"
  ],
  "tagging": {
    "taggable": false
  },
  "required": [
    "NamespaceName"
  ],
  "readOnlyProperties": [
    "/properties/Namespace",
    "/properties/Namespace/NamespaceArn",
    "/properties/Namespace/NamespaceId",
    "/properties/Namespace/NamespaceName",
    "/properties/Namespace/AdminUsername",
    "/properties/Namespace/DbName",
    "/properties/Namespace/KmsKeyId",
    "/properties/Namespace/DefaultIamRoleArn",
    "/properties/Namespace/IamRoles",
    "/properties/Namespace/LogExports",
    "/properties/Namespace/Status",
    "/properties/Namespace/CreationDate"
  ],
  "writeOnlyProperties": [
    "/properties/AdminUserPassword",
    "/properties/FinalSnapshotName",
    "/properties/FinalSnapshotRetentionPeriod",
    "/properties/Tags",
    "/properties/Tags/*/Key",
    "/properties/Tags/*/Value"
  ],
  "createOnlyProperties": [
    "/properties/NamespaceName",
    "/properties/Tags"
  ]
}
