{
 "additionalProperties": false,
 "conditionalCreateOnlyProperties": [
  "/properties/EncryptionAtRestOptions/Enabled",
  "/properties/EncryptionAtRestOptions/KmsKeyId",
  "/properties/AdvancedSecurityOptions/Enabled"
 ],
 "createOnlyProperties": [
  "/properties/DomainName"
 ],
 "definitions": {
  "AIMLOptions": {
   "additionalProperties": false,
   "properties": {
    "S3VectorsEngine": {
     "$ref": "#/definitions/S3VectorsEngine"
    },
    "ServerlessVectorAcceleration": {
     "$ref": "#/definitions/ServerlessVectorAcceleration"
    }
   },
   "type": "object"
  },
  "AdvancedSecurityOptionsInput": {
   "additionalProperties": false,
   "properties": {
    "AnonymousAuthDisableDate": {
     "type": "string"
    },
    "AnonymousAuthEnabled": {
     "type": "boolean"
    },
    "Enabled": {
     "type": "boolean"
    },
    "IAMFederationOptions": {
     "$ref": "#/definitions/IAMFederationOptions"
    },
    "InternalUserDatabaseEnabled": {
     "type": "boolean"
    },
    "JWTOptions": {
     "$ref": "#/definitions/JWTOptions"
    },
    "MasterUserOptions": {
     "$ref": "#/definitions/MasterUserOptions"
    },
    "SAMLOptions": {
     "$ref": "#/definitions/SAMLOptions"
    }
   },
   "type": "object"
  },
  "ClusterConfig": {
   "additionalProperties": false,
   "properties": {
    "ColdStorageOptions": {
     "$ref": "#/definitions/ColdStorageOptions"
    },
    "DedicatedMasterCount": {
     "type": "integer"
    },
    "DedicatedMasterEnabled": {
     "type": "boolean"
    },
    "DedicatedMasterType": {
     "type": "string"
    },
    "InstanceCount": {
     "type": "integer"
    },
    "InstanceType": {
     "type": "string"
    },
    "MultiAZWithStandbyEnabled": {
     "type": "boolean"
    },
    "NodeOptions": {
     "items": {
      "$ref": "#/definitions/NodeOption"
     },
     "type": "array"
    },
    "WarmCount": {
     "type": "integer"
    },
    "WarmEnabled": {
     "type": "boolean"
    },
    "WarmType": {
     "type": "string"
    },
    "ZoneAwarenessConfig": {
     "$ref": "#/definitions/ZoneAwarenessConfig"
    },
    "ZoneAwarenessEnabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "CognitoOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "IdentityPoolId": {
     "type": "string"
    },
    "RoleArn": {
     "format": "AWS::IAM::Role.Arn",
     "type": "string"
    },
    "UserPoolId": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "ColdStorageOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "DomainEndpointOptions": {
   "additionalProperties": false,
   "properties": {
    "CustomEndpoint": {
     "type": "string"
    },
    "CustomEndpointCertificateArn": {
     "type": "string"
    },
    "CustomEndpointEnabled": {
     "type": "boolean"
    },
    "EnforceHTTPS": {
     "type": "boolean"
    },
    "TLSSecurityPolicy": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "EBSOptions": {
   "additionalProperties": false,
   "properties": {
    "EBSEnabled": {
     "type": "boolean"
    },
    "Iops": {
     "type": "integer"
    },
    "Throughput": {
     "type": "integer"
    },
    "VolumeSize": {
     "type": "integer"
    },
    "VolumeType": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "EncryptionAtRestOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "KmsKeyId": {
     "anyOf": [
      {
       "format": "AWS::KMS::Key.Arn"
      },
      {
       "format": "AWS::KMS::Key.Id"
      },
      {
       "format": "AWS::KMS::Alias.AliasName"
      }
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "IAMFederationOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "RolesKey": {
     "type": "string"
    },
    "SubjectKey": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "IdentityCenterOptions": {
   "additionalProperties": false,
   "properties": {
    "EnabledAPIAccess": {
     "type": "boolean"
    },
    "IdentityCenterApplicationARN": {
     "type": "string"
    },
    "IdentityCenterInstanceARN": {
     "type": "string"
    },
    "IdentityStoreId": {
     "type": "string"
    },
    "RolesKey": {
     "$ref": "#/definitions/RolesKeyIdcType"
    },
    "SubjectKey": {
     "$ref": "#/definitions/SubjectKeyIdcType"
    }
   },
   "type": "object"
  },
  "Idp": {
   "additionalProperties": false,
   "properties": {
    "EntityId": {
     "type": "string"
    },
    "MetadataContent": {
     "maxLength": 1048576,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "MetadataContent",
    "EntityId"
   ],
   "type": "object"
  },
  "JWTOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "PublicKey": {
     "type": "string"
    },
    "RolesKey": {
     "type": "string"
    },
    "SubjectKey": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "LogPublishingOption": {
   "additionalProperties": false,
   "properties": {
    "CloudWatchLogsLogGroupArn": {
     "type": "string"
    },
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "MasterUserOptions": {
   "additionalProperties": false,
   "properties": {
    "MasterUserARN": {
     "type": "string"
    },
    "MasterUserName": {
     "type": "string"
    },
    "MasterUserPassword": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "NodeConfig": {
   "additionalProperties": false,
   "properties": {
    "Count": {
     "type": "integer"
    },
    "Enabled": {
     "type": "boolean"
    },
    "Type": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "NodeOption": {
   "additionalProperties": false,
   "properties": {
    "NodeConfig": {
     "$ref": "#/definitions/NodeConfig"
    },
    "NodeType": {
     "enum": [
      "coordinator"
     ],
     "type": "string"
    }
   },
   "type": "object"
  },
  "NodeToNodeEncryptionOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "OffPeakWindow": {
   "additionalProperties": false,
   "properties": {
    "WindowStartTime": {
     "$ref": "#/definitions/WindowStartTime"
    }
   },
   "type": "object"
  },
  "OffPeakWindowOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "OffPeakWindow": {
     "$ref": "#/definitions/OffPeakWindow"
    }
   },
   "type": "object"
  },
  "RolesKeyIdcType": {
   "enum": [
    "GroupName",
    "GroupId"
   ],
   "type": "string"
  },
  "S3VectorsEngine": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "required": [
    "Enabled"
   ],
   "type": "object"
  },
  "SAMLOptions": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    },
    "Idp": {
     "$ref": "#/definitions/Idp"
    },
    "MasterBackendRole": {
     "type": "string"
    },
    "MasterUserName": {
     "type": "string"
    },
    "RolesKey": {
     "type": "string"
    },
    "SessionTimeoutMinutes": {
     "type": "integer"
    },
    "SubjectKey": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "ServerlessVectorAcceleration": {
   "additionalProperties": false,
   "properties": {
    "Enabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "ServiceSoftwareOptions": {
   "additionalProperties": false,
   "properties": {
    "AutomatedUpdateDate": {
     "type": "string"
    },
    "Cancellable": {
     "type": "boolean"
    },
    "CurrentVersion": {
     "type": "string"
    },
    "Description": {
     "type": "string"
    },
    "NewVersion": {
     "type": "string"
    },
    "OptionalDeployment": {
     "type": "boolean"
    },
    "UpdateAvailable": {
     "type": "boolean"
    },
    "UpdateStatus": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "SnapshotOptions": {
   "additionalProperties": false,
   "properties": {
    "AutomatedSnapshotStartHour": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "SoftwareUpdateOptions": {
   "additionalProperties": false,
   "properties": {
    "AutoSoftwareUpdateEnabled": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "SubjectKeyIdcType": {
   "enum": [
    "UserName",
    "UserId",
    "Email"
   ],
   "type": "string"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 0,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  },
  "VPCOptions": {
   "additionalProperties": false,
   "properties": {
    "SecurityGroupIds": {
     "format": "AWS::EC2::SecurityGroup.Ids",
     "items": {
      "format": "AWS::EC2::SecurityGroup.Id",
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    },
    "SubnetIds": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": true
    }
   },
   "type": "object"
  },
  "WindowStartTime": {
   "additionalProperties": false,
   "properties": {
    "Hours": {
     "maximum": 23,
     "minimum": 0,
     "type": "integer"
    },
    "Minutes": {
     "maximum": 59,
     "minimum": 0,
     "type": "integer"
    }
   },
   "required": [
    "Hours",
    "Minutes"
   ],
   "type": "object"
  },
  "ZoneAwarenessConfig": {
   "additionalProperties": false,
   "properties": {
    "AvailabilityZoneCount": {
     "type": "integer"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/DomainName"
 ],
 "properties": {
  "AIMLOptions": {
   "$ref": "#/definitions/AIMLOptions"
  },
  "AccessPolicies": {
   "format": "json",
   "type": [
    "object",
    "string"
   ]
  },
  "AdvancedOptions": {
   "additionalProperties": false,
   "patternProperties": {
    "[a-zA-Z0-9]+": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "AdvancedSecurityOptions": {
   "$ref": "#/definitions/AdvancedSecurityOptionsInput"
  },
  "Arn": {
   "type": "string"
  },
  "ClusterConfig": {
   "$ref": "#/definitions/ClusterConfig"
  },
  "CognitoOptions": {
   "$ref": "#/definitions/CognitoOptions"
  },
  "DomainArn": {
   "type": "string"
  },
  "DomainEndpoint": {
   "type": "string"
  },
  "DomainEndpointOptions": {
   "$ref": "#/definitions/DomainEndpointOptions"
  },
  "DomainEndpointV2": {
   "type": "string"
  },
  "DomainEndpoints": {
   "additionalProperties": false,
   "patternProperties": {
    "^.*$": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "DomainName": {
   "type": "string"
  },
  "EBSOptions": {
   "$ref": "#/definitions/EBSOptions"
  },
  "EncryptionAtRestOptions": {
   "$ref": "#/definitions/EncryptionAtRestOptions"
  },
  "EngineVersion": {
   "type": "string"
  },
  "IPAddressType": {
   "type": "string"
  },
  "Id": {
   "type": "string"
  },
  "IdentityCenterOptions": {
   "$ref": "#/definitions/IdentityCenterOptions"
  },
  "LogPublishingOptions": {
   "additionalProperties": false,
   "patternProperties": {
    "[a-zA-Z0-9]+": {
     "$ref": "#/definitions/LogPublishingOption"
    }
   },
   "type": "object"
  },
  "NodeToNodeEncryptionOptions": {
   "$ref": "#/definitions/NodeToNodeEncryptionOptions"
  },
  "OffPeakWindowOptions": {
   "$ref": "#/definitions/OffPeakWindowOptions"
  },
  "ServiceSoftwareOptions": {
   "$ref": "#/definitions/ServiceSoftwareOptions"
  },
  "SkipShardMigrationWait": {
   "type": "boolean"
  },
  "SnapshotOptions": {
   "$ref": "#/definitions/SnapshotOptions"
  },
  "SoftwareUpdateOptions": {
   "$ref": "#/definitions/SoftwareUpdateOptions"
  },
  "Tags": {
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": true
  },
  "VPCOptions": {
   "$ref": "#/definitions/VPCOptions"
  }
 },
 "propertyTransform": {
  "/properties/EncryptionAtRestOptions/KmsKeyId": "$split(EncryptionAtRestOptions.KmsKeyId, \"/\")[-1] $OR EncryptionAtRestOptions.KmsKeyId"
 },
 "readOnlyProperties": [
  "/properties/Id",
  "/properties/Arn",
  "/properties/DomainArn",
  "/properties/DomainEndpoint",
  "/properties/DomainEndpointV2",
  "/properties/DomainEndpoints",
  "/properties/ServiceSoftwareOptions",
  "/properties/AdvancedSecurityOptions/AnonymousAuthDisableDate",
  "/properties/IdentityCenterOptions/IdentityCenterApplicationARN",
  "/properties/IdentityCenterOptions/IdentityStoreId"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::OpenSearchService::Domain",
 "writeOnlyProperties": [
  "/properties/AdvancedSecurityOptions/MasterUserOptions",
  "/properties/AdvancedSecurityOptions/SAMLOptions/MasterUserName",
  "/properties/AdvancedSecurityOptions/SAMLOptions/MasterBackendRole",
  "/properties/AdvancedSecurityOptions/JWTOptions/PublicKey"
 ]
}
