{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-finspace-environment.json",
  "title": "AWSFinSpaceEnvironmentProperties",
  "description": "An example resource schema demonstrating some basic constructs and validation rules.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-finspace-environment.json",
    "sourceSha256": "711dcd796a8d226b3be037e44da618790fd2a221d261fb616581d3c90cdf5bc3"
  },
  "type": "object",
  "properties": {
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]{1,255}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the Environment"
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9. ]{1,1000}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Description of the Environment"
    },
    "KmsKeyId": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z-0-9-:\\/]*{1,1000}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "KMS key used to encrypt customer data within FinSpace Environment infrastructure"
    },
    "FederationMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "LOCAL",
            "FEDERATED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Federation mode used with the Environment"
    },
    "FederationParameters": {
      "$ref": "#/$defs/FederationParameters"
    },
    "SuperuserParameters": {
      "$ref": "#/$defs/SuperuserParameters"
    },
    "DataBundles": {
      "description": "ARNs of FinSpace Data Bundles to install",
      "type": "array",
      "uniqueItems": false,
      "items": {
        "$ref": "#/$defs/DataBundleArn"
      }
    },
    "Tags": {
      "description": "An array of key-value pairs to apply to this resource.",
      "type": "array",
      "uniqueItems": false,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::FinSpace::Environment",
  "deprecatedProperties": [
    "/properties/DataBundles"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "FederationParameters": {
      "description": "Additional parameters to identify Federation mode",
      "type": "object",
      "properties": {
        "SamlMetadataURL": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^https?://[-a-zA-Z0-9+&amp;@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&amp;@#/%=~_|]{1,1000}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "SAML metadata URL to link with the Environment"
        },
        "FederationProviderName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "[^_\\p{Z}][\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}][^_\\p{Z}]+",
              "minLength": 1,
              "maxLength": 32
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Federation provider name to link with the Environment"
        },
        "SamlMetadataDocument": {
          "oneOf": [
            {
              "type": "string",
              "pattern": ".*",
              "minLength": 1000,
              "maxLength": 10000000
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "SAML metadata document to link the federation provider to the Environment"
        },
        "ApplicationCallBackURL": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^https?://[-a-zA-Z0-9+&amp;@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&amp;@#/%=~_|]{1,1000}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "SAML metadata URL to link with the Environment"
        },
        "FederationURN": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "SAML metadata URL to link with the Environment"
        },
        "AttributeMap": {
          "description": "Attribute map for SAML configuration",
          "type": "array",
          "uniqueItems": false,
          "insertionOrder": false,
          "items": {
            "type": "object",
            "properties": {
              "Key": {
                "type": "string",
                "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
                "minLength": 1,
                "maxLength": 128
              },
              "Value": {
                "type": "string",
                "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
                "minLength": 0,
                "maxLength": 256
              }
            },
            "additionalProperties": false
          }
        }
      },
      "title": "AWSFinSpaceEnvironmentFederationParametersDefinition",
      "additionalProperties": false
    },
    "SuperuserParameters": {
      "description": "Parameters of the first Superuser for the FinSpace Environment",
      "type": "object",
      "properties": {
        "FirstName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9]{1,50}$",
              "minLength": 1,
              "maxLength": 50
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "First name"
        },
        "LastName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9]{1,50}$",
              "minLength": 1,
              "maxLength": 50
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Last name"
        },
        "EmailAddress": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+[.]+[A-Za-z]+",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Email address"
        }
      },
      "title": "AWSFinSpaceEnvironmentSuperuserParametersDefinition",
      "additionalProperties": false
    },
    "DataBundleArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws:finspace:[A-Za-z0-9_/.-]{0,63}:\\d*:data-bundle/[0-9A-Za-z_-]{1,128}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSFinSpaceEnvironmentDataBundleArnDefinition"
    },
    "Tag": {
      "description": "A list of all tags for a resource.",
      "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"
            }
          ],
          "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        },
        "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"
            }
          ],
          "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSFinSpaceEnvironmentTagDefinition",
      "additionalProperties": false
    }
  },
  "required": [
    "Name"
  ],
  "readOnlyProperties": [
    "/properties/EnvironmentId",
    "/properties/Status",
    "/properties/SageMakerStudioDomainUrl",
    "/properties/EnvironmentArn",
    "/properties/EnvironmentUrl",
    "/properties/AwsAccountId",
    "/properties/DedicatedServiceAccountId"
  ],
  "writeOnlyProperties": [
    "/properties/SuperuserParameters",
    "/properties/FederationParameters/AttributeMap",
    "/properties/Tags"
  ],
  "createOnlyProperties": [
    "/properties/KmsKeyId",
    "/properties/SuperuserParameters",
    "/properties/FederationParameters",
    "/properties/DataBundles",
    "/properties/Tags"
  ],
  "primaryIdentifier": [
    "/properties/EnvironmentId"
  ]
}
