{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-connect-instance.json",
  "title": "AWSConnectInstanceProperties",
  "description": "Resource Type definition for AWS::Connect::Instance. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-connect-instance.json",
    "sourceSha256": "651b07f0f43ab712008b4f3826ac5660591885eca7ca1a6ee7468147e13bba0e"
  },
  "type": "object",
  "properties": {
    "IdentityManagementType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "SAML",
            "CONNECT_MANAGED",
            "EXISTING_DIRECTORY"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specifies the type of directory integration for new instance."
    },
    "InstanceAlias": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^(?!d-)([0-9a-zA-Z]+)([-]*[0-9a-zA-Z])*$",
          "minLength": 1,
          "maxLength": 62
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Alias of the new directory created as part of new instance creation."
    },
    "DirectoryId": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^d-[0-9a-f]{10}$",
          "minLength": 12,
          "maxLength": 12
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Existing directoryId user wants to map to the new Connect instance."
    },
    "Attributes": {
      "description": "The attributes for the instance.",
      "$ref": "#/$defs/Attributes"
    }
  },
  "typeName": "AWS::Connect::Instance",
  "primaryIdentifier": [
    "/properties/Arn"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-connect",
  "additionalProperties": false,
  "writeOnlyProperties": [
    "/properties/DirectoryId"
  ],
  "tagging": {
    "taggable": false,
    "tagOnCreate": false,
    "tagUpdatable": false,
    "cloudFormationSystemTags": false
  },
  "$defs": {
    "InboundCalls": {
      "description": "Mandatory element which enables inbound calls on new instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceInboundCallsDefinition"
    },
    "OutboundCalls": {
      "description": "Mandatory element which enables outbound calls on new instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceOutboundCallsDefinition"
    },
    "ContactflowLogs": {
      "description": "Boolean flag which enables CONTACTFLOW_LOGS on an instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceContactflowLogsDefinition"
    },
    "ContactLens": {
      "description": "Boolean flag which enables CONTACT_LENS on an instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceContactLensDefinition"
    },
    "AutoResolveBestVoices": {
      "description": "Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceAutoResolveBestVoicesDefinition"
    },
    "UseCustomTTSVoices": {
      "description": "Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceUseCustomTTSVoicesDefinition"
    },
    "EarlyMedia": {
      "description": "Boolean flag which enables EARLY_MEDIA on an instance.",
      "type": "boolean",
      "title": "AWSConnectInstanceEarlyMediaDefinition"
    },
    "Attributes": {
      "type": "object",
      "title": "AWSConnectInstanceAttributesDefinition",
      "properties": {
        "InboundCalls": {
          "$ref": "#/$defs/InboundCalls"
        },
        "OutboundCalls": {
          "$ref": "#/$defs/OutboundCalls"
        },
        "ContactflowLogs": {
          "$ref": "#/$defs/ContactflowLogs"
        },
        "ContactLens": {
          "$ref": "#/$defs/ContactLens"
        },
        "AutoResolveBestVoices": {
          "$ref": "#/$defs/AutoResolveBestVoices"
        },
        "UseCustomTTSVoices": {
          "$ref": "#/$defs/UseCustomTTSVoices"
        },
        "EarlyMedia": {
          "$ref": "#/$defs/EarlyMedia"
        }
      },
      "required": [
        "InboundCalls",
        "OutboundCalls"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "IdentityManagementType",
    "Attributes"
  ],
  "readOnlyProperties": [
    "/properties/Id",
    "/properties/Arn",
    "/properties/ServiceRole",
    "/properties/CreatedTime",
    "/properties/InstanceStatus"
  ],
  "createOnlyProperties": [
    "/properties/DirectoryId",
    "/properties/InstanceAlias",
    "/properties/IdentityManagementType"
  ]
}
