{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-opensearchservice-domain.json",
  "title": "AWSOpenSearchServiceDomainProperties",
  "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-opensearchservice-domain.json",
    "sourceSha256": "ba416f31edd60c6195130f14734f68d81c51d4de01cb09e99c3006ed40ba1303"
  },
  "type": "object",
  "properties": {
    "ClusterConfig": {
      "$ref": "#/$defs/ClusterConfig"
    },
    "DomainName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "AccessPolicies": {
      "type": "object"
    },
    "EngineVersion": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "AdvancedOptions": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "[a-zA-Z0-9]+": {
          "type": "string"
        }
      }
    },
    "LogPublishingOptions": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        "[a-zA-Z0-9]+": {
          "$ref": "#/$defs/LogPublishingOption"
        }
      }
    },
    "SnapshotOptions": {
      "$ref": "#/$defs/SnapshotOptions"
    },
    "VPCOptions": {
      "$ref": "#/$defs/VPCOptions"
    },
    "NodeToNodeEncryptionOptions": {
      "$ref": "#/$defs/NodeToNodeEncryptionOptions"
    },
    "DomainEndpointOptions": {
      "$ref": "#/$defs/DomainEndpointOptions"
    },
    "CognitoOptions": {
      "$ref": "#/$defs/CognitoOptions"
    },
    "AdvancedSecurityOptions": {
      "$ref": "#/$defs/AdvancedSecurityOptionsInput"
    },
    "EBSOptions": {
      "$ref": "#/$defs/EBSOptions"
    },
    "EncryptionAtRestOptions": {
      "$ref": "#/$defs/EncryptionAtRestOptions"
    },
    "Tags": {
      "description": "An arbitrary set of tags (key-value pairs) for this Domain.",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "type": "array",
      "uniqueItems": true
    },
    "OffPeakWindowOptions": {
      "$ref": "#/$defs/OffPeakWindowOptions"
    },
    "SoftwareUpdateOptions": {
      "$ref": "#/$defs/SoftwareUpdateOptions"
    }
  },
  "typeName": "AWS::OpenSearchService::Domain",
  "primaryIdentifier": [
    "/properties/DomainName"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "writeOnlyProperties": [
    "/properties/AdvancedSecurityOptions/MasterUserOptions",
    "/properties/AdvancedSecurityOptions/SAMLOptions/MasterUserName",
    "/properties/AdvancedSecurityOptions/SAMLOptions/MasterBackendRole"
  ],
  "$defs": {
    "ZoneAwarenessConfig": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainZoneAwarenessConfigDefinition",
      "properties": {
        "AvailabilityZoneCount": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "ClusterConfig": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainClusterConfigDefinition",
      "properties": {
        "InstanceCount": {
          "type": "integer"
        },
        "WarmEnabled": {
          "type": "boolean"
        },
        "WarmCount": {
          "type": "integer"
        },
        "DedicatedMasterEnabled": {
          "type": "boolean"
        },
        "ZoneAwarenessConfig": {
          "$ref": "#/$defs/ZoneAwarenessConfig"
        },
        "DedicatedMasterCount": {
          "type": "integer"
        },
        "InstanceType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "WarmType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ZoneAwarenessEnabled": {
          "type": "boolean"
        },
        "DedicatedMasterType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MultiAZWithStandbyEnabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "LogPublishingOption": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainLogPublishingOptionDefinition",
      "properties": {
        "CloudWatchLogsLogGroupArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Enabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "SnapshotOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainSnapshotOptionsDefinition",
      "properties": {
        "AutomatedSnapshotStartHour": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "VPCOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainVPCOptionsDefinition",
      "properties": {
        "SecurityGroupIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "SubnetIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "NodeToNodeEncryptionOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainNodeToNodeEncryptionOptionsDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "DomainEndpointOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainDomainEndpointOptionsDefinition",
      "properties": {
        "CustomEndpointCertificateArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "CustomEndpointEnabled": {
          "type": "boolean"
        },
        "EnforceHTTPS": {
          "type": "boolean"
        },
        "CustomEndpoint": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "TLSSecurityPolicy": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "CognitoOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainCognitoOptionsDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "IdentityPoolId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "UserPoolId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "RoleArn": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "MasterUserOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainMasterUserOptionsDefinition",
      "properties": {
        "MasterUserPassword": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MasterUserName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MasterUserARN": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "Idp": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainIdpDefinition",
      "properties": {
        "MetadataContent": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 1048576,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "EntityId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "MetadataContent",
        "EntityId"
      ],
      "additionalProperties": false
    },
    "SAMLOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainSAMLOptionsDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "Idp": {
          "$ref": "#/$defs/Idp"
        },
        "MasterUserName": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "MasterBackendRole": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "SubjectKey": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "RolesKey": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "SessionTimeoutMinutes": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "AdvancedSecurityOptionsInput": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainAdvancedSecurityOptionsInputDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "MasterUserOptions": {
          "$ref": "#/$defs/MasterUserOptions"
        },
        "InternalUserDatabaseEnabled": {
          "type": "boolean"
        },
        "AnonymousAuthEnabled": {
          "type": "boolean"
        },
        "SAMLOptions": {
          "$ref": "#/$defs/SAMLOptions"
        },
        "AnonymousAuthDisableDate": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "EBSOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainEBSOptionsDefinition",
      "properties": {
        "EBSEnabled": {
          "type": "boolean"
        },
        "VolumeType": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Iops": {
          "type": "integer"
        },
        "VolumeSize": {
          "type": "integer"
        },
        "Throughput": {
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "EncryptionAtRestOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainEncryptionAtRestOptionsDefinition",
      "properties": {
        "KmsKeyId": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Enabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainTagDefinition",
      "properties": {
        "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 key of the tag."
        },
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 128
            },
            {
              "$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": [
        "Value",
        "Key"
      ],
      "additionalProperties": false
    },
    "ServiceSoftwareOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainServiceSoftwareOptionsDefinition",
      "properties": {
        "CurrentVersion": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "NewVersion": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "UpdateAvailable": {
          "type": "boolean"
        },
        "Cancellable": {
          "type": "boolean"
        },
        "UpdateStatus": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Description": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "AutomatedUpdateDate": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "OptionalDeployment": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "WindowStartTime": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainWindowStartTimeDefinition",
      "properties": {
        "Hours": {
          "type": "integer",
          "minimum": 0,
          "maximum": 23
        },
        "Minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 59
        }
      },
      "required": [
        "Hours",
        "Minutes"
      ],
      "additionalProperties": false
    },
    "OffPeakWindow": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainOffPeakWindowDefinition",
      "properties": {
        "WindowStartTime": {
          "$ref": "#/$defs/WindowStartTime"
        }
      },
      "additionalProperties": false
    },
    "OffPeakWindowOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainOffPeakWindowOptionsDefinition",
      "properties": {
        "Enabled": {
          "type": "boolean"
        },
        "OffPeakWindow": {
          "$ref": "#/$defs/OffPeakWindow"
        }
      },
      "additionalProperties": false
    },
    "SoftwareUpdateOptions": {
      "type": "object",
      "title": "AWSOpenSearchServiceDomainSoftwareUpdateOptionsDefinition",
      "properties": {
        "AutoSoftwareUpdateEnabled": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "createOnlyProperties": [
    "/properties/DomainName"
  ],
  "conditionalCreateOnlyProperties": [
    "/properties/EncryptionAtRestOptions/properties",
    "/properties/AdvancedSecurityOptions/properties/Enabled"
  ],
  "readOnlyProperties": [
    "/properties/Id",
    "/properties/Arn",
    "/properties/DomainArn",
    "/properties/DomainEndpoint",
    "/properties/DomainEndpoints",
    "/properties/ServiceSoftwareOptions",
    "/properties/AdvancedSecurityOptions/AnonymousAuthDisableDate"
  ]
}
