{
  "description": "Domain is the Schema for the Domains API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "DomainSpec defines the desired state of Domain.",
      "properties": {
        "accessPolicies": {
          "description": "IAM access policy as a JSON-formatted string.",
          "type": "string"
        },
        "advancedOptions": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Option to allow references to indices in an HTTP request body. Must be false when configuring access to individual sub-resources. By default, the value is true. See Advanced cluster parameters (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) for more information.",
          "type": "object"
        },
        "advancedSecurityOptions": {
          "description": "Specifies advanced security options.",
          "properties": {
            "anonymousAuthEnabled": {
              "type": "boolean"
            },
            "enabled": {
              "type": "boolean"
            },
            "internalUserDatabaseEnabled": {
              "type": "boolean"
            },
            "masterUserOptions": {
              "description": "Credentials for the master user: username and password, ARN, or both.",
              "properties": {
                "masterUserARN": {
                  "description": "The Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html) in Using AWS Identity and Access Management for more information.",
                  "type": "string"
                },
                "masterUserName": {
                  "type": "string"
                },
                "masterUserPassword": {
                  "description": "SecretKeyReference combines a k8s corev1.SecretReference with a specific key within the referred-to Secret",
                  "properties": {
                    "key": {
                      "description": "Key is the key within the secret",
                      "type": "string"
                    },
                    "name": {
                      "description": "name is unique within a namespace to reference a secret resource.",
                      "type": "string"
                    },
                    "namespace": {
                      "description": "namespace defines the space within which the secret name must be unique.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "key"
                  ],
                  "type": "object",
                  "x-kubernetes-map-type": "atomic",
                  "additionalProperties": false
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "sAMLOptions": {
              "description": "The SAML application configuration for the domain.",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "idp": {
                  "description": "The SAML identity povider's information.",
                  "properties": {
                    "entityID": {
                      "type": "string"
                    },
                    "metadataContent": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "masterBackendRole": {
                  "type": "string"
                },
                "masterUserName": {
                  "type": "string"
                },
                "rolesKey": {
                  "type": "string"
                },
                "sessionTimeoutMinutes": {
                  "format": "int64",
                  "type": "integer"
                },
                "subjectKey": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "autoTuneOptions": {
          "description": "Specifies Auto-Tune options.",
          "properties": {
            "desiredState": {
              "description": "The Auto-Tune desired state. Valid values are ENABLED and DISABLED.",
              "type": "string"
            },
            "maintenanceSchedules": {
              "items": {
                "description": "Specifies the Auto-Tune maintenance schedule. See Auto-Tune for Amazon OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) for more information.",
                "properties": {
                  "cronExpressionForRecurrence": {
                    "type": "string"
                  },
                  "duration": {
                    "description": "The maintenance schedule duration: duration value and duration unit. See Auto-Tune for Amazon OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) for more information.",
                    "properties": {
                      "unit": {
                        "description": "The unit of a maintenance schedule duration. Valid value is HOUR. See Auto-Tune for Amazon OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) for more information.",
                        "type": "string"
                      },
                      "value": {
                        "description": "Integer to specify the value of a maintenance schedule duration. See Auto-Tune for Amazon OpenSearch Service (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) for more information.",
                        "format": "int64",
                        "type": "integer"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "startAt": {
                    "format": "date-time",
                    "type": "string"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "clusterConfig": {
          "description": "Configuration options for a domain. Specifies the instance type and number of instances in the domain.",
          "properties": {
            "coldStorageOptions": {
              "description": "Specifies the configuration for cold storage options such as enabled",
              "properties": {
                "enabled": {
                  "type": "boolean"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "dedicatedMasterCount": {
              "format": "int64",
              "type": "integer"
            },
            "dedicatedMasterEnabled": {
              "type": "boolean"
            },
            "dedicatedMasterType": {
              "type": "string"
            },
            "instanceCount": {
              "format": "int64",
              "type": "integer"
            },
            "instanceType": {
              "type": "string"
            },
            "warmCount": {
              "format": "int64",
              "type": "integer"
            },
            "warmEnabled": {
              "type": "boolean"
            },
            "warmType": {
              "type": "string"
            },
            "zoneAwarenessConfig": {
              "description": "The zone awareness configuration for the domain cluster, such as the number of availability zones.",
              "properties": {
                "availabilityZoneCount": {
                  "format": "int64",
                  "type": "integer"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "zoneAwarenessEnabled": {
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "cognitoOptions": {
          "description": "Options to specify the Cognito user and identity pools for OpenSearch Dashboards authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html).",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "identityPoolID": {
              "type": "string"
            },
            "roleARN": {
              "type": "string"
            },
            "userPoolID": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "domainEndpointOptions": {
          "description": "Options to specify configurations that will be applied to the domain endpoint.",
          "properties": {
            "customEndpoint": {
              "type": "string"
            },
            "customEndpointCertificateARN": {
              "description": "The Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html) in Using AWS Identity and Access Management for more information.",
              "type": "string"
            },
            "customEndpointEnabled": {
              "type": "boolean"
            },
            "enforceHTTPS": {
              "type": "boolean"
            },
            "tlsSecurityPolicy": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "ebsOptions": {
          "description": "Options to enable, disable, and specify the type and size of EBS storage volumes.",
          "properties": {
            "ebsEnabled": {
              "type": "boolean"
            },
            "iops": {
              "format": "int64",
              "type": "integer"
            },
            "throughput": {
              "format": "int64",
              "type": "integer"
            },
            "volumeSize": {
              "format": "int64",
              "type": "integer"
            },
            "volumeType": {
              "description": "The type of EBS volume, standard, gp2, gp3 or io1. See Configuring EBS-based Storage (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/opensearch-createupdatedomains.html#opensearch-createdomain-configure-ebs) for more information.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "encryptionAtRestOptions": {
          "description": "Options for encryption of data at rest.",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "kmsKeyID": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "engineVersion": {
          "description": "String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the Amazon OpenSearch Service domain. For example, \"OpenSearch_1.0\" or \"Elasticsearch_7.9\". For more information, see Creating and managing Amazon OpenSearch Service domains (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains).",
          "type": "string"
        },
        "logPublishingOptions": {
          "additionalProperties": {
            "description": "Log Publishing option that is set for a given domain. Attributes and their details: \n - CloudWatchLogsLogGroupArn: ARN of the Cloudwatch log group to publish logs to. \n - Enabled: Whether the log publishing for a given log type is enabled or not.",
            "properties": {
              "cloudWatchLogsLogGroupARN": {
                "description": "ARN of the Cloudwatch log group to publish logs to.",
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "description": "Map of LogType and LogPublishingOption, each containing options to publish a given type of OpenSearch log.",
          "type": "object"
        },
        "name": {
          "description": "The name of the Amazon OpenSearch Service domain you're creating. Domain names are unique across the domains owned by an account within an AWS region. Domain names must start with a lowercase letter and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).",
          "type": "string"
        },
        "nodeToNodeEncryptionOptions": {
          "description": "Node-to-node encryption options.",
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "tags": {
          "description": "A list of Tag added during domain creation.",
          "items": {
            "description": "A key value pair for a resource tag.",
            "properties": {
              "key": {
                "description": "A string of length from 1 to 128 characters that specifies the key for a tag. Tag keys must be unique for the domain to which they're attached.",
                "type": "string"
              },
              "value": {
                "description": "A string of length from 0 to 256 characters that specifies the value for a tag. Tag values can be null and don't have to be unique in a tag set.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "vpcOptions": {
          "description": "Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html).",
          "properties": {
            "securityGroupIDs": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "subnetIDs": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "name"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DomainStatus defines the observed state of Domain",
      "properties": {
        "ackResourceMetadata": {
          "description": "All CRs managed by ACK have a common `Status.ACKResourceMetadata` member that is used to contain resource sync state, account ownership, constructed ARN for the resource",
          "properties": {
            "arn": {
              "description": "ARN is the Amazon Resource Name for the resource. This is a globally-unique identifier and is set only by the ACK service controller once the controller has orchestrated the creation of the resource OR when it has verified that an \"adopted\" resource (a resource where the ARN annotation was set by the Kubernetes user on the CR) exists and matches the supplied CR's Spec field values. TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse https://github.com/aws/aws-controllers-k8s/issues/270",
              "type": "string"
            },
            "ownerAccountID": {
              "description": "OwnerAccountID is the AWS Account ID of the account that owns the backend AWS service API resource.",
              "type": "string"
            },
            "region": {
              "description": "Region is the AWS region in which the resource exists or will exist.",
              "type": "string"
            }
          },
          "required": [
            "ownerAccountID",
            "region"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "changeProgressDetails": {
          "description": "Specifies change details of the domain configuration change.",
          "properties": {
            "changeID": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "conditions": {
          "description": "All CRS managed by ACK have a common `Status.Conditions` member that contains a collection of `ackv1alpha1.Condition` objects that describe the various terminal states of the CR and its backend AWS service API resource",
          "items": {
            "description": "Condition is the common struct used by all CRDs managed by ACK service controllers to indicate terminal states  of the CR and its backend AWS service API resource",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the Condition",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "created": {
          "description": "The domain creation status. True if the creation of a domain is complete. False if domain creation is still in progress.",
          "type": "boolean"
        },
        "deleted": {
          "description": "The domain deletion status. True if a delete request has been received for the domain but resource cleanup is still in progress. False if the domain has not been deleted. Once domain deletion is complete, the status of the domain is no longer returned.",
          "type": "boolean"
        },
        "domainID": {
          "description": "The unique identifier for the specified domain.",
          "type": "string"
        },
        "endpoint": {
          "description": "The domain endpoint that you use to submit index and search requests.",
          "type": "string"
        },
        "endpoints": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Map containing the domain endpoints used to submit index and search requests. Example key, value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'.",
          "type": "object"
        },
        "processing": {
          "description": "The status of the domain configuration. True if Amazon OpenSearch Service is processing configuration changes. False if the configuration is active.",
          "type": "boolean"
        },
        "serviceSoftwareOptions": {
          "description": "The current status of the domain's service software.",
          "properties": {
            "automatedUpdateDate": {
              "format": "date-time",
              "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",
          "additionalProperties": false
        },
        "snapshotOptions": {
          "description": "The status of the SnapshotOptions.",
          "properties": {
            "automatedSnapshotStartHour": {
              "format": "int64",
              "type": "integer"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "upgradeProcessing": {
          "description": "The status of a domain version upgrade. True if Amazon OpenSearch Service is undergoing a version upgrade. False if the configuration is active.",
          "type": "boolean"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
