{
  "openapi": "3.1.2",
  "info": {
    "title": "Elastic Cloud Connected API",
    "description": "This API enables you to use Elastic Cloud services in your ECE, ECK, or self-managed cluster without having to install\nand maintain their infrastructure yourself.\n\nYou can create, update, and manage Cloud Connected clusters and their services.\n\n## API principles\n\nThe Elastic Cloud Connected REST API is built following REST principles:\n\n* Resources (such as clusters) are represented as URIs.\n* Standard HTTP response codes and verbs are used (GET, POST, PUT, PATCH and DELETE).\n* API calls are stateless. Every request that you make happens in isolation from other calls and must include all the information necessary to fulfill the request.\n* JSON is the data interchange format.\n\n## OpenAPI Specification\n\nThe API is documented using the [OpenAPI Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification). The current supported version of the specification is 3.0.\nFor details, check the [API reference](https://www.elastic.co/docs/api/doc/elastic-cloud-connected/) or download the [OpenAPI Specification](https://www.elastic.co/docs/api/doc/elastic-cloud-connected.yaml).\nThis specification can be used to generate client SDKs, or on tools that support it, such as the [Swagger Editor](https://editor.swagger.io/).\n\n## Documentation source and versions\n\nThis documentation is derived from a private repository.\nIt is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n",
    "version": "0.1.0",
    "x-doc-license": {
      "name": "Attribution-NonCommercial-NoDerivatives 4.0 International",
      "url": "https://creativecommons.org/licenses/by-nc-nd/4.0/"
    },
    "x-feedbackLink": {
      "label": "Feedback",
      "url": "https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+"
    }
  },
  "servers": [
    {
      "url": "https://api.elastic-cloud.com"
    }
  ],
  "paths": {
    "/api/v1/cloud-connected/clusters": {
      "get": {
        "tags": [
          "clusters"
        ],
        "summary": "Get Cloud Connected clusters",
        "description": "Fetches a list of Cloud Connected clusters.",
        "operationId": "listClusters",
        "responses": {
          "200": {
            "description": "The Cloud Connected cluster list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "post": {
        "tags": [
          "clusters"
        ],
        "summary": "Create a Cloud Connected cluster.",
        "description": "Create a Cloud Connected cluster to onboard a self-managed cluster.",
        "operationId": "createCluster",
        "parameters": [
          {
            "name": "create_api_key",
            "in": "query",
            "description": "If true, the response will return an API Key with cloud-connected-admin permissions scoped to the cluster being created. This API Key will be revoked when the cluster is disconnected.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "description": "Configuration of the Cloud Connected cluster to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClusterRequest"
              },
              "example": {
                "name": "My observability cluster",
                "self_managed_cluster": {
                  "id": "abcdefghi12345678",
                  "name": "self-managed-cluster-id",
                  "version": "8.5.3"
                },
                "license": {
                  "type": "enterprise",
                  "uid": "1234567890abcdef1234567890abcdef"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The Cloud Connected cluster already existed.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterCreated"
                }
              }
            }
          },
          "201": {
            "description": "The created Cloud Connected cluster.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterCreated"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/api/v1/cloud-connected/clusters/{id}": {
      "get": {
        "tags": [
          "clusters"
        ],
        "summary": "Get a Cloud Connected cluster",
        "description": "Get a Cloud Connected cluster by its identifier.",
        "operationId": "getCluster",
        "responses": {
          "200": {
            "description": "The requested Cloud Connected cluster",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cluster"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "clusters"
        ],
        "summary": "Disconnect a Cloud Connected cluster",
        "description": "Disconnect a Cloud Connected cluster.\nWhen `If-Match` is provided, the request is only applied if the current ETag matches.\n",
        "operationId": "deleteCluster",
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cluster disconnection scheduled.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          }
        }
      },
      "patch": {
        "tags": [
          "clusters"
        ],
        "summary": "Update a Cloud Connected cluster",
        "description": "Partially update a Cloud Connected cluster.\nOnly fields included in the request body are modified.\nWhen `If-Match` is provided, the request is only applied if the current ETag matches.\n",
        "operationId": "patchCluster",
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The Cloud Connected cluster patch body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchClusterRequest"
              },
              "example": {
                "name": "Example cluster name"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The updated Cloud Connected cluster.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterPatched"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "412": {
            "$ref": "#/components/responses/PreconditionFailed"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the Cloud Connected cluster",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClusterID"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/clusters/{id}/apikey/_revoke-pending": {
      "post": {
        "tags": [
          "rotation of api keys"
        ],
        "summary": "Revoke previously rotated Cluster API Keys",
        "description": "Revoke API keys for this cluster that are pending revocation after a rotation operation.\nThe `_rotate` endpoint schedules revocation in 7 days; this endpoint revokes those pending keys immediately.\n",
        "operationId": "revokePendingClusterAPIKeys",
        "responses": {
          "200": {
            "description": "The previous API Key has been deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the Cloud Connected cluster",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClusterID"
          }
        },
        {
          "name": "If-Match",
          "in": "header",
          "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/clusters/{id}/apikey/_rotate": {
      "post": {
        "tags": [
          "rotation of api keys"
        ],
        "summary": "Rotate the Cloud Connected cluster API Key",
        "description": "Rotate the API key used to manage this Cloud Connected cluster.\nA new key is returned, and the previous key is revoked after 7 days or when `_revoke-pending` is called.\n",
        "operationId": "rotateClusterAPIKey",
        "responses": {
          "200": {
            "description": "The new API Key for the Cloud Connected service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClusterAPIKey"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the Cloud Connected cluster",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClusterID"
          }
        },
        {
          "name": "If-Match",
          "in": "header",
          "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/clusters/{id}/apikey/{service}/_revoke-pending": {
      "post": {
        "tags": [
          "rotation of api keys"
        ],
        "summary": "Revoke previously rotated service API Keys",
        "description": "Revoke API keys used for a Cloud Connected service that are pending revocation after a rotation operation.\nThe `_rotate` endpoint schedules revocation in 7 days; this endpoint revokes those pending keys immediately.\n",
        "operationId": "revokePendingServiceAPIKeys",
        "responses": {
          "200": {
            "description": "The previous API Key has been deleted."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the Cloud Connected cluster",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClusterID"
          }
        },
        {
          "name": "service",
          "in": "path",
          "description": "The name of the Cloud Connected service",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ServiceName"
          }
        },
        {
          "name": "If-Match",
          "in": "header",
          "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/clusters/{id}/apikey/{service}/_rotate": {
      "post": {
        "tags": [
          "rotation of api keys"
        ],
        "summary": "Rotate a Cloud Connected service API Key",
        "description": "Rotate the API key used by a Cloud Connected service for this cluster.\nA new key is returned, and the previous key is revoked after 7 days or when `_revoke-pending` is called.\n",
        "operationId": "rotateServiceAPIKey",
        "responses": {
          "200": {
            "description": "The new API Key for the Cloud Connected service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotatedServiceAPIKey"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the Cloud Connected cluster",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ClusterID"
          }
        },
        {
          "name": "service",
          "in": "path",
          "description": "The name of the Cloud Connected service",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/ServiceName"
          }
        },
        {
          "name": "If-Match",
          "in": "header",
          "description": "ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates",
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/organizations/{organization_id}/subscription": {
      "get": {
        "tags": [
          "organizations"
        ],
        "summary": "Get subscription state",
        "description": "Get the Cloud Connected subscription state for an organization.",
        "operationId": "getSubscription",
        "responses": {
          "200": {
            "description": "The subscription state for the organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "parameters": [
        {
          "name": "organization_id",
          "in": "path",
          "description": "The ID of the organization",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/OrganizationID"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/organizations/{organization_id}/terms-and-conditions": {
      "get": {
        "tags": [
          "organizations"
        ],
        "summary": "Get acceptance info of terms and conditions",
        "description": "Get terms and conditions acceptance information for an organization.",
        "operationId": "getTermsAndConditions",
        "responses": {
          "200": {
            "description": "The requested acceptance of terms and conditions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermsAndConditionsInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "parameters": [
        {
          "name": "organization_id",
          "in": "path",
          "description": "The ID of the organization",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/OrganizationID"
          }
        }
      ]
    },
    "/api/v1/cloud-connected/organizations/{organization_id}/terms-and-conditions/_accept": {
      "post": {
        "tags": [
          "organizations"
        ],
        "summary": "Accept terms and conditions",
        "description": "Accept Cloud Connected terms and conditions for an organization.",
        "operationId": "acceptTermsAndConditions",
        "responses": {
          "200": {
            "description": "Terms and Conditions were successfully accepted for an organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TermsAndConditionsInfo"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        }
      },
      "parameters": [
        {
          "name": "organization_id",
          "in": "path",
          "description": "The ID of the organization",
          "required": true,
          "schema": {
            "$ref": "#/components/schemas/OrganizationID"
          }
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "Cluster": {
        "required": [
          "id",
          "name",
          "metadata",
          "self_managed_cluster",
          "license",
          "services"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ClusterID"
          },
          "name": {
            "$ref": "#/components/schemas/ClusterName"
          },
          "metadata": {
            "$ref": "#/components/schemas/ClusterMetadata"
          },
          "self_managed_cluster": {
            "$ref": "#/components/schemas/SelfManagedCluster"
          },
          "license": {
            "$ref": "#/components/schemas/SelfManagedClusterLicense"
          },
          "services": {
            "$ref": "#/components/schemas/Services"
          }
        },
        "description": "A Cloud Connected Cluster."
      },
      "ClusterAPIKey": {
        "properties": {
          "key": {
            "type": "string",
            "description": "The API Key to manage the Cloud Connected cluster.",
            "example": "VXNlci1JRDoxMjM0NTY3ODkwYWJjZGVmMTIzNDU2Nzg5MGFiY2RlZg=="
          }
        },
        "description": "The API Key to manage the Cloud Connected cluster."
      },
      "ClusterCreated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Cluster"
          },
          {
            "$ref": "#/components/schemas/ClusterAPIKey"
          }
        ],
        "description": "The created Cloud Connected cluster along with (optionally) the API Key to manage the Cluster."
      },
      "ClusterID": {
        "pattern": "^[a-z0-9]{32}$",
        "type": "string",
        "description": "ID of the Cloud Connected cluster."
      },
      "ClusterList": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Cluster"
            },
            "description": "The actual clusters."
          }
        },
        "description": "A paginated list of Cloud Connected clusters."
      },
      "ClusterMetadata": {
        "required": [
          "created_at",
          "created_by",
          "organization_id"
        ],
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "description": "Date and time when the cluster was onboarded.",
            "format": "date-time"
          },
          "created_by": {
            "$ref": "#/components/schemas/UserID"
          },
          "organization_id": {
            "$ref": "#/components/schemas/OrganizationID"
          }
        },
        "description": "Additional details about the Cloud Connected cluster."
      },
      "ClusterName": {
        "maxLength": 255,
        "type": "string",
        "description": "Descriptive name for a Cloud Connected cluster.",
        "example": "my observability cluster"
      },
      "ClusterPatched": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Cluster"
          },
          {
            "$ref": "#/components/schemas/ClusterPatchedFields"
          }
        ],
        "description": "The patched Cloud Connected cluster along with (optionally) the APIs Keys to manage the enabled services."
      },
      "ClusterPatchedFields": {
        "type": "object",
        "properties": {
          "keys": {
            "$ref": "#/components/schemas/ServicesAPIKeys"
          }
        },
        "description": "Fields returned when a cluster is patched"
      },
      "CreateClusterRequest": {
        "required": [
          "self_managed_cluster",
          "license"
        ],
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/ClusterName"
          },
          "self_managed_cluster": {
            "$ref": "#/components/schemas/SelfManagedCluster"
          },
          "license": {
            "$ref": "#/components/schemas/SelfManagedClusterLicense"
          }
        },
        "additionalProperties": false,
        "description": "A request to create a Cloud Connected cluster."
      },
      "ErrorResponse": {
        "required": [
          "message",
          "code"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message of the error.",
            "example": "Explicative error message"
          },
          "code": {
            "type": "string",
            "description": "An identifier for this type of error.",
            "example": "code.error"
          }
        },
        "description": "An error response returned by the API."
      },
      "MultiErrorResponse": {
        "required": [
          "errors"
        ],
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "A non-empty list of errors."
      },
      "OrganizationID": {
        "pattern": "^[a-z0-9]{1,32}$",
        "type": "string",
        "description": "The Organization ID which owns the cluster.",
        "example": "198583657190"
      },
      "PatchClusterRequest": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/ClusterName"
          },
          "self_managed_cluster": {
            "$ref": "#/components/schemas/PatchSelfManagedCluster"
          },
          "license": {
            "$ref": "#/components/schemas/PatchSelfManagedClusterLicense"
          },
          "services": {
            "$ref": "#/components/schemas/PatchServices"
          }
        },
        "additionalProperties": false,
        "description": "A request to patch an existing Cloud Connected cluster."
      },
      "PatchSelfManagedCluster": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/SelfManagedClusterName"
          },
          "version": {
            "$ref": "#/components/schemas/SelfManagedClusterVersion"
          }
        },
        "description": "A self-managed cluster."
      },
      "PatchSelfManagedClusterLicense": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/SelfManagedClusterLicenseType"
          },
          "uid": {
            "$ref": "#/components/schemas/SelfManagedClusterLicenseUID"
          }
        },
        "description": "The license of the self-managed cluster"
      },
      "PatchServiceAutoOps": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "whether the AutoOps service is enabled for the cluster"
          }
        },
        "description": "Information about the state and configuration for the AutoOps service"
      },
      "PatchServiceEIS": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "whether the EIS service is enabled for the cluster"
          }
        },
        "description": "Information about the state and configuration for the EIS service"
      },
      "PatchServices": {
        "type": "object",
        "properties": {
          "auto_ops": {
            "$ref": "#/components/schemas/PatchServiceAutoOps"
          },
          "eis": {
            "$ref": "#/components/schemas/PatchServiceEIS"
          }
        },
        "description": "A list of Cloud services that can be enabled for a cluster."
      },
      "RegionID": {
        "type": "string",
        "description": "Unique human-readable identifier for a region in Elastic Cloud.",
        "example": "aws-us-east-1"
      },
      "RotatedServiceAPIKey": {
        "properties": {
          "key": {
            "$ref": "#/components/schemas/ServiceAPIKey"
          }
        },
        "description": "An API Key that can be used to interact with a Cloud Connected Service"
      },
      "SelfManagedCluster": {
        "required": [
          "id",
          "name",
          "version"
        ],
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/SelfManagedClusterID"
          },
          "name": {
            "$ref": "#/components/schemas/SelfManagedClusterName"
          },
          "version": {
            "$ref": "#/components/schemas/SelfManagedClusterVersion"
          }
        },
        "description": "A self-managed cluster."
      },
      "SelfManagedClusterID": {
        "type": "string",
        "description": "ID of the self-managed cluster."
      },
      "SelfManagedClusterLicense": {
        "required": [
          "type",
          "uid"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/SelfManagedClusterLicenseType"
          },
          "uid": {
            "$ref": "#/components/schemas/SelfManagedClusterLicenseUID"
          }
        },
        "description": "The license of the self-managed cluster"
      },
      "SelfManagedClusterLicenseType": {
        "enum": [
          "trial",
          "basic",
          "standard",
          "dev",
          "silver",
          "gold",
          "platinum",
          "enterprise"
        ],
        "type": "string",
        "description": "The type of the self-managed cluster license."
      },
      "SelfManagedClusterLicenseUID": {
        "type": "string",
        "description": "The unique identifier of the self-managed cluster license.",
        "example": "1234567890abcdef1234567890abcdef"
      },
      "SelfManagedClusterName": {
        "type": "string",
        "description": "Descriptive name for a self managed cluster.",
        "example": "observability-cluster-central-2"
      },
      "SelfManagedClusterVersion": {
        "type": "string",
        "description": "The version of the self-managed cluster.",
        "example": "8.10.1"
      },
      "ServiceAPIKey": {
        "type": "string",
        "description": "An API Key that can be used to interact with a Cloud Connected Service",
        "example": "VXNlci1JRDoxMjM0NTY3ODkwYWJjZGVmMTIzNDU2Nzg5MGFiY2RlZg=="
      },
      "ServiceAutoOps": {
        "required": [
          "enabled",
          "support",
          "metadata",
          "subscription"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "whether the AutoOps service is enabled for the cluster"
          },
          "support": {
            "$ref": "#/components/schemas/ServiceSupport"
          },
          "config": {
            "$ref": "#/components/schemas/ServiceAutoOpsConfig"
          },
          "metadata": {
            "$ref": "#/components/schemas/ServiceAutoOpsMetadata"
          },
          "subscription": {
            "$ref": "#/components/schemas/ServiceSubscription"
          }
        },
        "description": "Information about the state and configuration for the AutoOps service"
      },
      "ServiceAutoOpsConfig": {
        "required": [
          "region_id"
        ],
        "type": "object",
        "properties": {
          "region_id": {
            "$ref": "#/components/schemas/RegionID"
          }
        },
        "description": "Configuration for the AutoOps service"
      },
      "ServiceAutoOpsMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ServiceBaseMetadata"
          },
          {
            "required": [
              "connect_url"
            ],
            "type": "object",
            "properties": {
              "service_url": {
                "type": "string",
                "description": "URL to access the service for this cluster.",
                "format": "uri",
                "example": "https://app.auto-ops.cloud.elastic.co/regions/aws-us-east-1/organizations/198583657190/clusters/abcdef1234567890abcdef1234567890/cluster"
              },
              "connect_url": {
                "type": "string",
                "description": "URL to connect to the service.",
                "format": "uri",
                "example": "https://application.auto-ops.cloud.elastic.co/organizations/198583657190/connect-autoops"
              }
            }
          }
        ],
        "description": "Metadata information for the AutoOps service, including documentation and service URLs"
      },
      "ServiceBaseMetadata": {
        "required": [
          "documentation_url"
        ],
        "type": "object",
        "properties": {
          "documentation_url": {
            "type": "string",
            "description": "URL to the service documentation",
            "format": "uri",
            "example": "https://www.elastic.co/guide/en/cloud/current/eis.html"
          }
        },
        "description": "Base metadata information for a service, including documentation URL"
      },
      "ServiceEIS": {
        "required": [
          "enabled",
          "support",
          "metadata",
          "subscription"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "whether the EIS service is enabled for the cluster"
          },
          "support": {
            "$ref": "#/components/schemas/ServiceSupport"
          },
          "metadata": {
            "$ref": "#/components/schemas/ServiceBaseMetadata"
          },
          "subscription": {
            "$ref": "#/components/schemas/ServiceSubscription"
          }
        },
        "description": "Information about the state and configuration for the EIS service"
      },
      "ServiceName": {
        "enum": [
          "eis"
        ],
        "type": "string",
        "description": "Name of the Cloud Connected service.",
        "example": "eis"
      },
      "ServiceSubscription": {
        "required": [
          "required"
        ],
        "type": "object",
        "properties": {
          "required": {
            "type": "boolean",
            "description": "Whether a subscription is required for this service."
          }
        },
        "description": "Subscription requirements for a service."
      },
      "ServiceSupport": {
        "required": [
          "supported",
          "valid_license_types",
          "minimum_stack_version"
        ],
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean",
            "description": "whether the service can be enabled for the cluster"
          },
          "valid_license_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SelfManagedClusterLicenseType"
            },
            "description": "list of license types that support the service."
          },
          "minimum_stack_version": {
            "type": "string",
            "description": "minimum stack version that supports the service.",
            "example": "8.5.0"
          }
        },
        "description": "Information about whether a service is supported for a cluster"
      },
      "Services": {
        "required": [
          "auto_ops",
          "eis"
        ],
        "type": "object",
        "properties": {
          "auto_ops": {
            "$ref": "#/components/schemas/ServiceAutoOps"
          },
          "eis": {
            "$ref": "#/components/schemas/ServiceEIS"
          }
        },
        "description": "A list of Cloud services that can be enabled for a cluster."
      },
      "ServicesAPIKeys": {
        "type": "object",
        "properties": {
          "eis": {
            "$ref": "#/components/schemas/ServiceAPIKey"
          }
        },
        "description": "API keys from the different services that can be used to interact with a Cloud Connected Service"
      },
      "Subscription": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/SubscriptionState"
          }
        },
        "description": "Subscription details for an organization."
      },
      "SubscriptionState": {
        "enum": [
          "trial",
          "active",
          "inactive"
        ],
        "type": "string",
        "description": "The state of the subscription."
      },
      "TermsAndConditionsAccepted": {
        "required": [
          "accepted_at",
          "accepted_by"
        ],
        "type": "object",
        "properties": {
          "accepted_at": {
            "type": "string",
            "description": "Date and time when the terms and conditions for an organization were accepted.",
            "format": "date-time"
          },
          "accepted_by": {
            "$ref": "#/components/schemas/UserID"
          }
        },
        "description": "details about accepted terms and conditions for an organization. Only present if the terms and conditions were accepted."
      },
      "TermsAndConditionsInfo": {
        "type": "object",
        "properties": {
          "accepted": {
            "$ref": "#/components/schemas/TermsAndConditionsAccepted"
          }
        },
        "description": "information regarding acceptance of terms and conditions for an organization."
      },
      "UserID": {
        "type": "string",
        "description": "ID of the user.",
        "example": "1014289666002276"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "PreconditionFailed": {
        "description": "Precondition failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/MultiErrorResponse"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "API keys are used to authenticate requests to the Elastic Cloud Connected REST API.\nGenerate your secret API key in https://cloud.elastic.co/account/keys\nYou must provide the API key for all API requests in the Authorization header as follows:\n```\n\"Authorization: ApiKey $API_KEY\"\n```\nFor example, if you interact with the API using the curl command:\n```\ncurl -H \"Authorization: ApiKey essu_...\" https://api.elastic-cloud.com/api/v1/cloud-connected/clusters\n```\n",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "apiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "clusters",
      "description": "Management of Cloud Connected clusters"
    },
    {
      "name": "organizations",
      "description": "Organization settings related to Cloud Connected"
    },
    {
      "name": "rotation of api keys",
      "description": "Management of API Keys used by Cloud Connected clusters"
    }
  ]
}