{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-sagemaker-domain.json",
  "title": "AWSSageMakerDomainProperties",
  "description": "Resource Type definition for AWS::SageMaker::Domain. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-sagemaker-domain.json",
    "sourceSha256": "64a65a6bbc0b8ac743f2d59825197ae91f9a0838486ec2f99610fe0b0e700b77"
  },
  "type": "object",
  "properties": {
    "AppNetworkAccessType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "PublicInternetOnly",
            "VpcOnly"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specifies the VPC used for non-EFS traffic. The default value is PublicInternetOnly."
    },
    "AuthMode": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SSO",
            "IAM"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The mode of authentication that members use to access the domain."
    },
    "DefaultUserSettings": {
      "$ref": "#/$defs/UserSettings",
      "description": "The default user settings."
    },
    "DefaultSpaceSettings": {
      "$ref": "#/$defs/DefaultSpaceSettings",
      "description": "The default space settings."
    },
    "DomainName": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 63,
          "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A name for the domain."
    },
    "KmsKeyId": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 2048,
          "pattern": ".*"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "SageMaker uses AWS KMS to encrypt the EFS volume attached to the domain with an AWS managed customer master key (CMK) by default."
    },
    "SubnetIds": {
      "type": "array",
      "description": "The VPC subnets that Studio uses for communication.",
      "uniqueItems": false,
      "insertionOrder": false,
      "minItems": 1,
      "maxItems": 16,
      "items": {
        "type": "string",
        "maxLength": 32,
        "pattern": "[-0-9a-zA-Z]+"
      }
    },
    "Tags": {
      "type": "array",
      "description": "A list of tags to apply to the user profile.",
      "uniqueItems": false,
      "insertionOrder": false,
      "minItems": 0,
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "VpcId": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 32,
          "pattern": "[-0-9a-zA-Z]+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ID of the Amazon Virtual Private Cloud (VPC) that Studio uses for communication."
    },
    "DomainSettings": {
      "$ref": "#/$defs/DomainSettings"
    },
    "AppSecurityGroupManagement": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "Service",
            "Customer"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The entity that creates and manages the required security groups for inter-app communication in VPCOnly mode. Required when CreateDomain.AppNetworkAccessType is VPCOnly and DomainSettings.RStudioServerProDomainSettings.DomainExecutionRoleArn is provided."
    }
  },
  "typeName": "AWS::SageMaker::Domain",
  "readOnlyProperties": [
    "/properties/DomainArn",
    "/properties/Url",
    "/properties/DomainId",
    "/properties/HomeEfsFileSystemId",
    "/properties/SecurityGroupIdForDomainBoundary",
    "/properties/SingleSignOnManagedApplicationInstanceId"
  ],
  "$defs": {
    "UserSettings": {
      "type": "object",
      "description": "A collection of settings that apply to users of Amazon SageMaker Studio. These settings are specified when the CreateUserProfile API is called, and as DefaultUserSettings when the CreateDomain API is called.",
      "title": "AWSSageMakerDomainUserSettingsDefinition",
      "properties": {
        "ExecutionRole": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 20,
              "maxLength": 2048,
              "pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The execution role for the user."
        },
        "JupyterServerAppSettings": {
          "$ref": "#/$defs/JupyterServerAppSettings",
          "description": "The Jupyter server's app settings."
        },
        "KernelGatewayAppSettings": {
          "$ref": "#/$defs/KernelGatewayAppSettings",
          "description": "The kernel gateway app settings."
        },
        "RStudioServerProAppSettings": {
          "$ref": "#/$defs/RStudioServerProAppSettings"
        },
        "RSessionAppSettings": {
          "$ref": "#/$defs/RSessionAppSettings"
        },
        "SecurityGroups": {
          "type": "array",
          "description": "The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.",
          "uniqueItems": false,
          "insertionOrder": false,
          "minItems": 0,
          "maxItems": 5,
          "items": {
            "type": "string",
            "maxLength": 32,
            "pattern": "[-0-9a-zA-Z]+"
          }
        },
        "SharingSettings": {
          "$ref": "#/$defs/SharingSettings",
          "description": "The sharing settings."
        }
      },
      "required": [
        "ExecutionRole"
      ],
      "additionalProperties": false
    },
    "DefaultSpaceSettings": {
      "type": "object",
      "description": "A collection of settings that apply to spaces of Amazon SageMaker Studio. These settings are specified when the Create/Update Domain API is called.",
      "title": "AWSSageMakerDomainDefaultSpaceSettingsDefinition",
      "properties": {
        "ExecutionRole": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 20,
              "maxLength": 2048,
              "pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The execution role for the space."
        },
        "JupyterServerAppSettings": {
          "$ref": "#/$defs/JupyterServerAppSettings",
          "description": "The Jupyter server's app settings."
        },
        "KernelGatewayAppSettings": {
          "$ref": "#/$defs/KernelGatewayAppSettings",
          "description": "The kernel gateway app settings."
        },
        "SecurityGroups": {
          "type": "array",
          "description": "The security groups for the Amazon Virtual Private Cloud (VPC) that Studio uses for communication.",
          "uniqueItems": false,
          "insertionOrder": false,
          "minItems": 0,
          "maxItems": 5,
          "items": {
            "type": "string",
            "maxLength": 32,
            "pattern": "[-0-9a-zA-Z]+"
          }
        }
      },
      "required": [
        "ExecutionRole"
      ],
      "additionalProperties": false
    },
    "JupyterServerAppSettings": {
      "type": "object",
      "description": "The JupyterServer app settings.",
      "title": "AWSSageMakerDomainJupyterServerAppSettingsDefinition",
      "properties": {
        "DefaultResourceSpec": {
          "$ref": "#/$defs/ResourceSpec"
        }
      },
      "additionalProperties": false
    },
    "ResourceSpec": {
      "type": "object",
      "title": "AWSSageMakerDomainResourceSpecDefinition",
      "properties": {
        "InstanceType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "system",
                "ml.t3.micro",
                "ml.t3.small",
                "ml.t3.medium",
                "ml.t3.large",
                "ml.t3.xlarge",
                "ml.t3.2xlarge",
                "ml.m5.large",
                "ml.m5.xlarge",
                "ml.m5.2xlarge",
                "ml.m5.4xlarge",
                "ml.m5.8xlarge",
                "ml.m5.12xlarge",
                "ml.m5.16xlarge",
                "ml.m5.24xlarge",
                "ml.c5.large",
                "ml.c5.xlarge",
                "ml.c5.2xlarge",
                "ml.c5.4xlarge",
                "ml.c5.9xlarge",
                "ml.c5.12xlarge",
                "ml.c5.18xlarge",
                "ml.c5.24xlarge",
                "ml.p3.2xlarge",
                "ml.p3.8xlarge",
                "ml.p3.16xlarge",
                "ml.g4dn.xlarge",
                "ml.g4dn.2xlarge",
                "ml.g4dn.4xlarge",
                "ml.g4dn.8xlarge",
                "ml.g4dn.12xlarge",
                "ml.g4dn.16xlarge",
                "ml.r5.large",
                "ml.r5.xlarge",
                "ml.r5.2xlarge",
                "ml.r5.4xlarge",
                "ml.r5.8xlarge",
                "ml.r5.12xlarge",
                "ml.r5.16xlarge",
                "ml.r5.24xlarge",
                "ml.p3dn.24xlarge",
                "ml.m5d.large",
                "ml.m5d.xlarge",
                "ml.m5d.2xlarge",
                "ml.m5d.4xlarge",
                "ml.m5d.8xlarge",
                "ml.m5d.12xlarge",
                "ml.m5d.16xlarge",
                "ml.m5d.24xlarge",
                "ml.g5.xlarge",
                "ml.g5.2xlarge",
                "ml.g5.4xlarge",
                "ml.g5.8xlarge",
                "ml.g5.12xlarge",
                "ml.g5.16xlarge",
                "ml.g5.24xlarge",
                "ml.g5.48xlarge",
                "ml.p4d.24xlarge",
                "ml.p4de.24xlarge",
                "ml.geospatial.interactive"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The instance type that the image version runs on."
        },
        "SageMakerImageArn": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256,
              "pattern": "^arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:image/[a-z0-9]([-.]?[a-z0-9])*$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the SageMaker image that the image version belongs to."
        },
        "SageMakerImageVersionArn": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256,
              "pattern": "^arn:aws(-[\\w]+)*:sagemaker:.+:[0-9]{12}:image-version/[a-z0-9]([-.]?[a-z0-9])*/[0-9]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the image version created on the instance."
        },
        "LifecycleConfigArn": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 256,
              "pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:studio-lifecycle-config/.*"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Amazon Resource Name (ARN) of the Lifecycle Configuration to attach to the Resource."
        }
      },
      "additionalProperties": false
    },
    "KernelGatewayAppSettings": {
      "type": "object",
      "description": "The kernel gateway app settings.",
      "title": "AWSSageMakerDomainKernelGatewayAppSettingsDefinition",
      "properties": {
        "CustomImages": {
          "type": "array",
          "description": "A list of custom SageMaker images that are configured to run as a KernelGateway app.",
          "uniqueItems": false,
          "insertionOrder": false,
          "minItems": 0,
          "maxItems": 30,
          "items": {
            "$ref": "#/$defs/CustomImage"
          }
        },
        "DefaultResourceSpec": {
          "$ref": "#/$defs/ResourceSpec",
          "description": "The default instance type and the Amazon Resource Name (ARN) of the default SageMaker image used by the KernelGateway app."
        }
      },
      "additionalProperties": false
    },
    "CustomImage": {
      "type": "object",
      "description": "A custom SageMaker image.",
      "title": "AWSSageMakerDomainCustomImageDefinition",
      "properties": {
        "AppImageConfigName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 63,
              "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The Name of the AppImageConfig."
        },
        "ImageName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 63,
              "pattern": "^[a-zA-Z0-9]([-.]?[a-zA-Z0-9]){0,62}$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the CustomImage. Must be unique to your account."
        },
        "ImageVersionNumber": {
          "type": "integer",
          "description": "The version number of the CustomImage.",
          "minimum": 0
        }
      },
      "required": [
        "AppImageConfigName",
        "ImageName"
      ],
      "additionalProperties": false
    },
    "SharingSettings": {
      "type": "object",
      "description": "Specifies options when sharing an Amazon SageMaker Studio notebook. These settings are specified as part of DefaultUserSettings when the CreateDomain API is called, and as part of UserSettings when the CreateUserProfile API is called.",
      "title": "AWSSageMakerDomainSharingSettingsDefinition",
      "properties": {
        "NotebookOutputOption": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "Allowed",
                "Disabled"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Whether to include the notebook cell output when sharing the notebook. The default is Disabled."
        },
        "S3KmsKeyId": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 2048,
              "pattern": ".*"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "When NotebookOutputOption is Allowed, the AWS Key Management Service (KMS) encryption key ID used to encrypt the notebook cell output in the Amazon S3 bucket."
        },
        "S3OutputPath": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 1024,
              "pattern": "^(https|s3)://([^/]+)/?(.*)$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "When NotebookOutputOption is Allowed, the Amazon S3 bucket used to store the shared notebook snapshots."
        }
      },
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSSageMakerDomainTagDefinition",
      "properties": {
        "Value": {
          "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"
            }
          ]
        },
        "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"
            }
          ]
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "DomainSettings": {
      "type": "object",
      "description": "A collection of Domain settings.",
      "title": "AWSSageMakerDomainDomainSettingsDefinition",
      "properties": {
        "SecurityGroupIds": {
          "type": "array",
          "description": "The security groups for the Amazon Virtual Private Cloud that the Domain uses for communication between Domain-level apps and user apps.",
          "uniqueItems": false,
          "insertionOrder": false,
          "minItems": 1,
          "maxItems": 3,
          "items": {
            "type": "string",
            "maxLength": 32,
            "pattern": "[-0-9a-zA-Z]+"
          }
        },
        "RStudioServerProDomainSettings": {
          "$ref": "#/$defs/RStudioServerProDomainSettings"
        }
      },
      "additionalProperties": false
    },
    "RStudioServerProDomainSettings": {
      "type": "object",
      "description": "A collection of settings that update the current configuration for the RStudioServerPro Domain-level app.",
      "title": "AWSSageMakerDomainRStudioServerProDomainSettingsDefinition",
      "properties": {
        "DomainExecutionRoleArn": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 20,
              "maxLength": 2048,
              "pattern": "^arn:aws[a-z\\-]*:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The ARN of the execution role for the RStudioServerPro Domain-level app."
        },
        "RStudioConnectUrl": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(https:|http:|www\\.)\\S*"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A URL pointing to an RStudio Connect server."
        },
        "RStudioPackageManagerUrl": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(https:|http:|www\\.)\\S*"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A URL pointing to an RStudio Package Manager server."
        },
        "DefaultResourceSpec": {
          "$ref": "#/$defs/ResourceSpec"
        }
      },
      "required": [
        "DomainExecutionRoleArn"
      ],
      "additionalProperties": false
    },
    "RSessionAppSettings": {
      "type": "object",
      "description": "A collection of settings that apply to an RSessionGateway app.",
      "title": "AWSSageMakerDomainRSessionAppSettingsDefinition",
      "properties": {
        "CustomImages": {
          "type": "array",
          "description": "A list of custom SageMaker images that are configured to run as a KernelGateway app.",
          "insertionOrder": false,
          "uniqueItems": false,
          "minItems": 0,
          "maxItems": 30,
          "items": {
            "$ref": "#/$defs/CustomImage"
          }
        },
        "DefaultResourceSpec": {
          "$ref": "#/$defs/ResourceSpec"
        }
      },
      "additionalProperties": false
    },
    "RStudioServerProAppSettings": {
      "type": "object",
      "description": "A collection of settings that configure user interaction with the RStudioServerPro app.",
      "title": "AWSSageMakerDomainRStudioServerProAppSettingsDefinition",
      "properties": {
        "AccessStatus": {
          "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": "Indicates whether the current user has access to the RStudioServerPro app."
        },
        "UserGroup": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "R_STUDIO_ADMIN",
                "R_STUDIO_USER"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The level of permissions that the user has within the RStudioServerPro app. This value defaults to User. The Admin value allows the user access to the RStudio Administrative Dashboard."
        }
      },
      "additionalProperties": false
    }
  },
  "primaryIdentifier": [
    "/properties/DomainId"
  ],
  "additionalProperties": false,
  "required": [
    "AuthMode",
    "DefaultUserSettings",
    "DomainName",
    "SubnetIds",
    "VpcId"
  ],
  "createOnlyProperties": [
    "/properties/AppNetworkAccessType",
    "/properties/AuthMode",
    "/properties/DomainName",
    "/properties/DomainSettings/RStudioServerProDomainSettings/DefaultResourceSpec",
    "/properties/KmsKeyId",
    "/properties/SubnetIds",
    "/properties/VpcId",
    "/properties/Tags"
  ],
  "writeOnlyProperties": [
    "/properties/Tags"
  ]
}
