{
  "description": "The AtlasPrivateEndpoint custom resource definition (CRD) defines a desired [Private Endpoint](https://www.mongodb.com/docs/atlas/security-private-endpoint/#std-label-private-endpoint-overview) configuration for an Atlas project.\nIt allows a private connection between your cloud provider and Atlas that doesn't send information through a public network.\n\nYou can use private endpoints to create a unidirectional connection to Atlas clusters from your virtual network.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "AtlasPrivateEndpointSpec is the specification of the desired configuration of a project private endpoint",
      "properties": {
        "awsConfiguration": {
          "description": "AWSConfiguration is the specific AWS settings for the private endpoint.",
          "items": {
            "description": "AWSPrivateEndpointConfiguration holds the AWS configuration done on customer network.",
            "properties": {
              "id": {
                "description": "ID that identifies the private endpoint's network interface that someone added to this private endpoint service.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "id"
          ],
          "x-kubernetes-list-type": "map"
        },
        "azureConfiguration": {
          "description": "AzureConfiguration is the specific Azure settings for the private endpoint.",
          "items": {
            "description": "AzurePrivateEndpointConfiguration holds the Azure configuration done on customer network.",
            "properties": {
              "id": {
                "description": "ID that identifies the private endpoint's network interface that someone added to this private endpoint service.",
                "type": "string"
              },
              "ipAddress": {
                "description": "IP address of the private endpoint in your Azure VNet that someone added to this private endpoint service.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "ipAddress"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "id"
          ],
          "x-kubernetes-list-type": "map"
        },
        "connectionSecret": {
          "description": "Name of the secret containing Atlas API private and public keys.",
          "properties": {
            "name": {
              "description": "Name of the resource being referred to\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "externalProjectRef": {
          "description": "externalProjectRef holds the parent Atlas project ID.\nMutually exclusive with the \"projectRef\" field.",
          "properties": {
            "id": {
              "description": "ID is the Atlas project ID.",
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "gcpConfiguration": {
          "description": "GCPConfiguration is the specific Google Cloud settings for the private endpoint.",
          "items": {
            "description": "GCPPrivateEndpointConfiguration holds the GCP configuration done on customer network.",
            "properties": {
              "endpoints": {
                "description": "Endpoints is the list of individual private endpoints that comprise this endpoint group.",
                "items": {
                  "description": "GCPPrivateEndpoint holds the GCP forwarding rules configured on customer network.",
                  "properties": {
                    "ipAddress": {
                      "description": "IP address to which this Google Cloud consumer forwarding rule resolves.",
                      "type": "string"
                    },
                    "name": {
                      "description": "Name that identifies the Google Cloud consumer forwarding rule that you created.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "ipAddress",
                    "name"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              },
              "groupName": {
                "description": "GroupName is the label that identifies a set of endpoints.",
                "type": "string"
              },
              "projectId": {
                "description": "ProjectID that identifies the Google Cloud project in which you created the endpoints.",
                "type": "string"
              }
            },
            "required": [
              "endpoints",
              "groupName",
              "projectId"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "groupName"
          ],
          "x-kubernetes-list-type": "map"
        },
        "projectRef": {
          "description": "projectRef is a reference to the parent AtlasProject resource.\nMutually exclusive with the \"externalProjectRef\" field.",
          "properties": {
            "name": {
              "description": "Name of the Kubernetes Resource",
              "type": "string"
            },
            "namespace": {
              "description": "Namespace of the Kubernetes Resource",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "provider": {
          "description": "Name of the cloud service provider for which you want to create the private endpoint service.",
          "enum": [
            "AWS",
            "GCP",
            "AZURE"
          ],
          "type": "string"
        },
        "region": {
          "description": "Region of the chosen cloud provider in which you want to create the private endpoint service.",
          "type": "string"
        }
      },
      "required": [
        "provider",
        "region"
      ],
      "type": "object",
      "x-kubernetes-validations": [
        {
          "message": "must define only one project reference through externalProjectRef or projectRef",
          "rule": "(has(self.externalProjectRef) && !has(self.projectRef)) || (!has(self.externalProjectRef) && has(self.projectRef))"
        },
        {
          "message": "must define a local connection secret when referencing an external project",
          "rule": "(has(self.externalProjectRef) && has(self.connectionSecret)) || !has(self.externalProjectRef)"
        }
      ],
      "additionalProperties": false
    },
    "status": {
      "description": "AtlasPrivateEndpointStatus is the most recent observed status of the AtlasPrivateEndpoint cluster. Read-only.",
      "properties": {
        "conditions": {
          "description": "Conditions is the list of statuses showing the current state of the Atlas Custom Resource",
          "items": {
            "description": "Condition describes the state of an Atlas Custom Resource at a certain point.",
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.\nRepresented in ISO 8601 format.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A message providing 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 of Atlas Custom Resource condition.",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "endpoints": {
          "description": "Endpoints are the status of the endpoints connected to the service",
          "items": {
            "description": "EndpointInterfaceStatus is the most recent observed status the interfaces attached to the configured service. Read-only.",
            "properties": {
              "ID": {
                "description": "ID is the external identifier set on the specification to configure the interface",
                "type": "string"
              },
              "InterfaceStatus": {
                "description": "InterfaceStatus is the state of the private endpoint interface",
                "type": "string"
              },
              "connectionName": {
                "description": "ConnectionName is the label that Atlas generates that identifies the Azure private endpoint connection",
                "type": "string"
              },
              "error": {
                "description": "Error is the description of the failure occurred when configuring the private endpoint",
                "type": "string"
              },
              "gcpForwardingRules": {
                "description": "GCPForwardingRules is the status of the customer GCP private endpoint(forwarding rules)",
                "items": {
                  "description": "GCPForwardingRule is the most recent observed status the GCP forwarding rules configured for an interface. Read-only.",
                  "properties": {
                    "name": {
                      "description": "Human-readable label that identifies the Google Cloud consumer forwarding rule that you created.",
                      "type": "string"
                    },
                    "status": {
                      "description": "State of the MongoDB Atlas endpoint group.",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "error": {
          "description": "Error is the description of the failure occurred when configuring the private endpoint",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration indicates the generation of the resource specification of which the Atlas Operator is aware.\nThe Atlas Operator updates this field to the value of 'metadata.generation' as soon as it starts reconciliation of the resource.",
          "format": "int64",
          "type": "integer"
        },
        "resourceId": {
          "description": "ResourceID is the root-relative path that identifies of the Atlas Azure Private Link Service",
          "type": "string"
        },
        "serviceAttachmentNames": {
          "description": "ServiceAttachmentNames is the list of URLs that identifies endpoints that Atlas can use to access one service across the private connection",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "serviceId": {
          "description": "ServiceID is the unique identifier of the private endpoint service in Atlas",
          "type": "string"
        },
        "serviceName": {
          "description": "ServiceName is the unique identifier of the Amazon Web Services (AWS) PrivateLink endpoint service or Azure Private Link Service managed by Atlas",
          "type": "string"
        },
        "serviceStatus": {
          "description": "ServiceStatus is the state of the private endpoint service",
          "type": "string"
        }
      },
      "required": [
        "conditions"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
