{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-healthlake-fhirdatastore.json",
  "title": "AWSHealthLakeFHIRDatastoreProperties",
  "description": "HealthLake FHIR Datastore. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-healthlake-fhirdatastore.json",
    "sourceSha256": "841a4fdfdbcdbd2fffb592f4eb8e4af3d353787fcdc75f6e951a2f16f6f3152a"
  },
  "type": "object",
  "properties": {
    "DatastoreName": {
      "$ref": "#/$defs/DatastoreName"
    },
    "DatastoreTypeVersion": {
      "$ref": "#/$defs/DatastoreTypeVersion"
    },
    "PreloadDataConfig": {
      "$ref": "#/$defs/PreloadDataConfig"
    },
    "SseConfiguration": {
      "$ref": "#/$defs/SseConfiguration"
    },
    "Tags": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::HealthLake::FHIRDatastore",
  "createOnlyProperties": [
    "/properties/DatastoreName",
    "/properties/DatastoreTypeVersion",
    "/properties/PreloadDataConfig",
    "/properties/SseConfiguration",
    "/properties/KmsEncryptionConfig"
  ],
  "documentationUrl": "https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html",
  "additionalProperties": false,
  "primaryIdentifier": [
    "/properties/DatastoreId"
  ],
  "$defs": {
    "CreatedAt": {
      "description": "The time that a Data Store was created.",
      "type": "object",
      "properties": {
        "Seconds": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Seconds since epoch."
        },
        "Nanos": {
          "description": "Nanoseconds.",
          "type": "integer"
        }
      },
      "required": [
        "Seconds",
        "Nanos"
      ],
      "title": "AWSHealthLakeFHIRDatastoreCreatedAtDefinition",
      "additionalProperties": false
    },
    "DatastoreArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:healthlake:[a-zA-Z0-9-]+:[0-9]{12}:datastore/.+?"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The Amazon Resource Name used in the creation of the Data Store.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreArnDefinition"
    },
    "DatastoreEndpoint": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 10000
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The AWS endpoint for the Data Store. Each Data Store will have it's own endpoint with Data Store ID in the endpoint URL.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreEndpointDefinition"
    },
    "DatastoreId": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 32
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The AWS-generated ID number for the Data Store.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreIdDefinition"
    },
    "DatastoreName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The user-generated name for the Data Store.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreNameDefinition"
    },
    "DatastoreStatus": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CREATING",
            "ACTIVE",
            "DELETING",
            "DELETED"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The status of the Data Store. Possible statuses are 'CREATING', 'ACTIVE', 'DELETING', or 'DELETED'.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreStatusDefinition"
    },
    "DatastoreTypeVersion": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "R4"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The FHIR version. Only R4 version data is supported.",
      "title": "AWSHealthLakeFHIRDatastoreDatastoreTypeVersionDefinition"
    },
    "PreloadDataConfig": {
      "description": "The preloaded data configuration for the Data Store. Only data preloaded from Synthea is supported.",
      "type": "object",
      "properties": {
        "PreloadDataType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "SYNTHEA"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of preloaded data. Only Synthea preloaded data is supported."
        }
      },
      "required": [
        "PreloadDataType"
      ],
      "title": "AWSHealthLakeFHIRDatastorePreloadDataConfigDefinition",
      "additionalProperties": false
    },
    "SseConfiguration": {
      "description": "The server-side encryption key configuration for a customer provided encryption key.",
      "type": "object",
      "properties": {
        "KmsEncryptionConfig": {
          "$ref": "#/$defs/KmsEncryptionConfig"
        }
      },
      "required": [
        "KmsEncryptionConfig"
      ],
      "title": "AWSHealthLakeFHIRDatastoreSseConfigurationDefinition",
      "additionalProperties": false
    },
    "KmsEncryptionConfig": {
      "description": "The customer-managed-key (CMK) used when creating a Data Store. If a customer owned key is not specified, an AWS owned key will be used for encryption.",
      "type": "object",
      "properties": {
        "CmkType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "CUSTOMER_MANAGED_KMS_KEY",
                "AWS_OWNED_KMS_KEY"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The type of customer-managed-key (CMK) used for encryption. The two types of supported CMKs are customer owned CMKs and AWS owned CMKs."
        },
        "KmsKeyId": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 400,
              "pattern": "(arn:aws((-us-gov)|(-iso)|(-iso-b)|(-cn))?:kms:)?([a-z]{2}-[a-z]+(-[a-z]+)?-\\d:)?(\\d{12}:)?(((key/)?[a-zA-Z0-9-_]+)|(alias/[a-zA-Z0-9:/_-]+))"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The KMS encryption key id/alias used to encrypt the Data Store contents at rest."
        }
      },
      "required": [
        "CmkType"
      ],
      "title": "AWSHealthLakeFHIRDatastoreKmsEncryptionConfigDefinition",
      "additionalProperties": false
    },
    "Tag": {
      "description": "A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are both required, but tag values can be empty (null) strings.",
      "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 of the tag."
        },
        "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 of the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ],
      "title": "AWSHealthLakeFHIRDatastoreTagDefinition",
      "additionalProperties": false
    }
  },
  "taggable": true,
  "required": [
    "DatastoreTypeVersion"
  ],
  "readOnlyProperties": [
    "/properties/CreatedAt",
    "/properties/DatastoreArn",
    "/properties/DatastoreEndpoint",
    "/properties/DatastoreId",
    "/properties/DatastoreStatus"
  ]
}
