openapi: 3.0.1
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
    and maintain their infrastructure yourself.

    You can create, update, and manage Cloud Connected clusters and their services.

    ## API principles

    The Elastic Cloud Connected REST API is built following REST principles:

    * Resources (such as clusters) are represented as URIs.
    * Standard HTTP response codes and verbs are used (GET, POST, PUT, PATCH and DELETE).
    * 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.
    * JSON is the data interchange format.

    ## OpenAPI Specification

    The API is documented using the [OpenAPI Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification). The current supported version of the specification is 3.0.
    For 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).
    This specification can be used to generate client SDKs, or on tools that support it, such as the [Swagger Editor](https://editor.swagger.io/).

    ## Documentation source and versions

    This documentation is derived from a private repository.
    It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).
  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+
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
paths:
  /api/v1/cloud-connected/clusters:
    servers: []
    get:
      summary: Get Cloud Connected clusters
      description: Fetches a list of Cloud Connected clusters.
      operationId: listClusters
      tags:
        - clusters
      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:
      description: Create a Cloud Connected cluster to onboard a self-managed cluster.
      summary: Create a Cloud Connected cluster.
      operationId: createCluster
      tags:
        - clusters
      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.
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        description: Configuration of the Cloud Connected cluster to create.
        required: true
        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
      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}:
    servers: []
    parameters:
      - name: id
        description: The ID of the Cloud Connected cluster
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/ClusterID'
    get:
      summary: Get a Cloud Connected cluster
      description: Get a Cloud Connected cluster by its identifier.
      operationId: getCluster
      tags:
        - clusters
      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:
      summary: Disconnect a Cloud Connected cluster
      description: |
        Disconnect a Cloud Connected cluster.
        When `If-Match` is provided, the request is only applied if the current ETag matches.
      operationId: deleteCluster
      tags:
        - clusters
      parameters:
        - name: If-Match
          in: header
          description: ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates
          required: false
          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:
      description: |
        Partially update a Cloud Connected cluster.
        Only fields included in the request body are modified.
        When `If-Match` is provided, the request is only applied if the current ETag matches.
      summary: Update a Cloud Connected cluster
      operationId: patchCluster
      tags:
        - clusters
      parameters:
        - name: If-Match
          in: header
          description: ETag value fetched in a previous GET cluster request. Used to prevent simultaneous updates
          required: false
          schema:
            type: string
      requestBody:
        description: The Cloud Connected cluster patch body
        required: true
        content:
          application/json:
            example:
              name: Example cluster name
            schema:
              $ref: '#/components/schemas/PatchClusterRequest'
      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'
  /api/v1/cloud-connected/clusters/{id}/apikey/_revoke-pending:
    servers: []
    parameters:
      - name: id
        description: The ID of the Cloud Connected cluster
        in: path
        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
        required: false
        schema:
          type: string
    post:
      summary: Revoke previously rotated Cluster API Keys
      description: |
        Revoke API keys for this cluster that are pending revocation after a rotation operation.
        The `_rotate` endpoint schedules revocation in 7 days; this endpoint revokes those pending keys immediately.
      operationId: revokePendingClusterAPIKeys
      tags:
        - rotation of api keys
      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'
  /api/v1/cloud-connected/clusters/{id}/apikey/_rotate:
    servers: []
    parameters:
      - name: id
        description: The ID of the Cloud Connected cluster
        in: path
        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
        required: false
        schema:
          type: string
    post:
      summary: Rotate the Cloud Connected cluster API Key
      description: |
        Rotate the API key used to manage this Cloud Connected cluster.
        A new key is returned, and the previous key is revoked after 7 days or when `_revoke-pending` is called.
      operationId: rotateClusterAPIKey
      tags:
        - rotation of api keys
      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'
  /api/v1/cloud-connected/clusters/{id}/apikey/{service}/_revoke-pending:
    servers: []
    parameters:
      - name: id
        description: The ID of the Cloud Connected cluster
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/ClusterID'
      - name: service
        description: The name of the Cloud Connected service
        in: path
        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
        required: false
        schema:
          type: string
    post:
      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.
        The `_rotate` endpoint schedules revocation in 7 days; this endpoint revokes those pending keys immediately.
      operationId: revokePendingServiceAPIKeys
      tags:
        - rotation of api keys
      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'
  /api/v1/cloud-connected/clusters/{id}/apikey/{service}/_rotate:
    servers: []
    parameters:
      - name: id
        description: The ID of the Cloud Connected cluster
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/ClusterID'
      - name: service
        description: The name of the Cloud Connected service
        in: path
        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
        required: false
        schema:
          type: string
    post:
      summary: Rotate a Cloud Connected service API Key
      description: |
        Rotate the API key used by a Cloud Connected service for this cluster.
        A new key is returned, and the previous key is revoked after 7 days or when `_revoke-pending` is called.
      operationId: rotateServiceAPIKey
      tags:
        - rotation of api keys
      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'
  /api/v1/cloud-connected/organizations/{organization_id}/subscription:
    servers: []
    parameters:
      - name: organization_id
        description: The ID of the organization
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/OrganizationID'
    get:
      description: Get the Cloud Connected subscription state for an organization.
      summary: Get subscription state
      operationId: getSubscription
      tags:
        - organizations
      responses:
        '200':
          description: The subscription state for the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/v1/cloud-connected/organizations/{organization_id}/terms-and-conditions:
    servers: []
    parameters:
      - name: organization_id
        description: The ID of the organization
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/OrganizationID'
    get:
      description: Get terms and conditions acceptance information for an organization.
      summary: Get acceptance info of terms and conditions
      operationId: getTermsAndConditions
      tags:
        - organizations
      responses:
        '200':
          description: The requested acceptance of terms and conditions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermsAndConditionsInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/v1/cloud-connected/organizations/{organization_id}/terms-and-conditions/_accept:
    servers: []
    parameters:
      - name: organization_id
        description: The ID of the organization
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/OrganizationID'
    post:
      description: Accept Cloud Connected terms and conditions for an organization.
      summary: Accept terms and conditions
      operationId: acceptTermsAndConditions
      tags:
        - organizations
      responses:
        '200':
          description: Terms and Conditions were successfully accepted for an organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermsAndConditionsInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  securitySchemes:
    apiKey:
      description: |
        API keys are used to authenticate requests to the Elastic Cloud Connected REST API.
        Generate your secret API key in https://cloud.elastic.co/account/keys
        You must provide the API key for all API requests in the Authorization header as follows:
        ```
        "Authorization: ApiKey $API_KEY"
        ```
        For example, if you interact with the API using the curl command:
        ```
        curl -H "Authorization: ApiKey essu_..." https://api.elastic-cloud.com/api/v1/cloud-connected/clusters
        ```
      name: Authorization
      type: apiKey
      in: header
  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'
  schemas:
    Cluster:
      description: A Cloud Connected 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'
    ClusterAPIKey:
      description: The API Key to manage the Cloud Connected cluster.
      properties:
        key:
          type: string
          description: The API Key to manage the Cloud Connected cluster.
          example: VXNlci1JRDoxMjM0NTY3ODkwYWJjZGVmMTIzNDU2Nzg5MGFiY2RlZg==
    ClusterCreated:
      description: The created Cloud Connected cluster along with (optionally) the API Key to manage the Cluster.
      allOf:
        - $ref: '#/components/schemas/Cluster'
        - $ref: '#/components/schemas/ClusterAPIKey'
    ClusterID:
      type: string
      description: ID of the Cloud Connected cluster.
      pattern: ^[a-z0-9]{32}$
    ClusterList:
      type: object
      description: A paginated list of Cloud Connected clusters.
      required:
        - items
      properties:
        items:
          description: The actual clusters.
          type: array
          items:
            $ref: '#/components/schemas/Cluster'
    ClusterMetadata:
      type: object
      description: Additional details about the Cloud Connected cluster.
      required:
        - created_at
        - created_by
        - organization_id
      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'
    ClusterName:
      type: string
      description: Descriptive name for a Cloud Connected cluster.
      example: my observability cluster
      maxLength: 255
    ClusterPatched:
      description: The patched Cloud Connected cluster along with (optionally) the APIs Keys to manage the enabled services.
      allOf:
        - $ref: '#/components/schemas/Cluster'
        - $ref: '#/components/schemas/ClusterPatchedFields'
    ClusterPatchedFields:
      type: object
      description: Fields returned when a cluster is patched
      properties:
        keys:
          $ref: '#/components/schemas/ServicesAPIKeys'
    CreateClusterRequest:
      type: object
      description: A request to create a Cloud Connected cluster.
      required:
        - self_managed_cluster
        - license
      properties:
        name:
          $ref: '#/components/schemas/ClusterName'
        self_managed_cluster:
          $ref: '#/components/schemas/SelfManagedCluster'
        license:
          $ref: '#/components/schemas/SelfManagedClusterLicense'
      additionalProperties: false
    ErrorResponse:
      type: object
      description: An error response returned by the API.
      required:
        - message
        - code
      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
    MultiErrorResponse:
      type: object
      description: A non-empty list of errors.
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponse'
    OrganizationID:
      type: string
      description: The Organization ID which owns the cluster.
      example: '198583657190'
    PatchClusterRequest:
      type: object
      description: A request to patch an existing Cloud Connected cluster.
      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
    PatchSelfManagedCluster:
      type: object
      description: A self-managed cluster.
      properties:
        name:
          $ref: '#/components/schemas/SelfManagedClusterName'
        version:
          $ref: '#/components/schemas/SelfManagedClusterVersion'
    PatchSelfManagedClusterLicense:
      type: object
      description: The license of the self-managed cluster
      properties:
        type:
          $ref: '#/components/schemas/SelfManagedClusterLicenseType'
        uid:
          $ref: '#/components/schemas/SelfManagedClusterLicenseUID'
    PatchServiceAutoOps:
      type: object
      description: Information about the state and configuration for the AutoOps service
      properties:
        enabled:
          type: boolean
          description: whether the AutoOps service is enabled for the cluster
    PatchServiceEIS:
      type: object
      description: Information about the state and configuration for the EIS service
      properties:
        enabled:
          type: boolean
          description: whether the EIS service is enabled for the cluster
    PatchServices:
      type: object
      description: A list of Cloud services that can be enabled for a cluster.
      properties:
        auto_ops:
          $ref: '#/components/schemas/PatchServiceAutoOps'
        eis:
          $ref: '#/components/schemas/PatchServiceEIS'
    RegionID:
      type: string
      description: Unique human-readable identifier for a region in Elastic Cloud.
      example: aws-us-east-1
    RotatedServiceAPIKey:
      description: An API Key that can be used to interact with a Cloud Connected Service
      properties:
        key:
          $ref: '#/components/schemas/ServiceAPIKey'
    SelfManagedCluster:
      type: object
      description: A self-managed cluster.
      required:
        - id
        - name
        - version
      properties:
        id:
          $ref: '#/components/schemas/SelfManagedClusterID'
        name:
          $ref: '#/components/schemas/SelfManagedClusterName'
        version:
          $ref: '#/components/schemas/SelfManagedClusterVersion'
    SelfManagedClusterID:
      type: string
      description: ID of the self-managed cluster.
    SelfManagedClusterLicense:
      type: object
      description: The license of the self-managed cluster
      required:
        - type
        - uid
      properties:
        type:
          $ref: '#/components/schemas/SelfManagedClusterLicenseType'
        uid:
          $ref: '#/components/schemas/SelfManagedClusterLicenseUID'
    SelfManagedClusterLicenseType:
      type: string
      description: The type of the self-managed cluster license.
      enum:
        - trial
        - basic
        - standard
        - dev
        - silver
        - gold
        - platinum
        - enterprise
    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:
      type: object
      description: Information about the state and configuration for the AutoOps service
      required:
        - enabled
        - support
        - metadata
        - subscription
      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'
    ServiceAutoOpsConfig:
      type: object
      description: Configuration for the AutoOps service
      required:
        - region_id
      properties:
        region_id:
          $ref: '#/components/schemas/RegionID'
    ServiceAutoOpsMetadata:
      description: Metadata information for the AutoOps service, including documentation and service URLs
      allOf:
        - $ref: '#/components/schemas/ServiceBaseMetadata'
        - type: object
          required:
            - connect_url
          properties:
            service_url:
              type: string
              format: uri
              description: URL to access the service for this cluster.
              example: https://app.auto-ops.cloud.elastic.co/regions/aws-us-east-1/organizations/198583657190/clusters/abcdef1234567890abcdef1234567890/cluster
            connect_url:
              type: string
              format: uri
              description: URL to connect to the service.
              example: https://application.auto-ops.cloud.elastic.co/organizations/198583657190/connect-autoops
    ServiceBaseMetadata:
      type: object
      description: Base metadata information for a service, including documentation URL
      required:
        - documentation_url
      properties:
        documentation_url:
          type: string
          format: uri
          description: URL to the service documentation
          example: https://www.elastic.co/guide/en/cloud/current/eis.html
    ServiceEIS:
      type: object
      description: Information about the state and configuration for the EIS service
      required:
        - enabled
        - support
        - metadata
        - subscription
      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'
    ServiceName:
      type: string
      description: Name of the Cloud Connected service.
      enum:
        - eis
      example: eis
    ServiceSubscription:
      type: object
      description: Subscription requirements for a service.
      required:
        - required
      properties:
        required:
          type: boolean
          description: Whether a subscription is required for this service.
    ServiceSupport:
      type: object
      description: Information about whether a service is supported for a cluster
      required:
        - supported
        - valid_license_types
        - minimum_stack_version
      properties:
        supported:
          type: boolean
          description: whether the service can be enabled for the cluster
        valid_license_types:
          type: array
          description: list of license types that support the service.
          items:
            $ref: '#/components/schemas/SelfManagedClusterLicenseType'
        minimum_stack_version:
          type: string
          description: minimum stack version that supports the service.
          example: 8.5.0
    Services:
      type: object
      description: A list of Cloud services that can be enabled for a cluster.
      required:
        - auto_ops
        - eis
      properties:
        auto_ops:
          $ref: '#/components/schemas/ServiceAutoOps'
        eis:
          $ref: '#/components/schemas/ServiceEIS'
    ServicesAPIKeys:
      type: object
      description: API keys from the different services that can be used to interact with a Cloud Connected Service
      properties:
        eis:
          $ref: '#/components/schemas/ServiceAPIKey'
    Subscription:
      type: object
      description: Subscription details for an organization.
      required:
        - state
      properties:
        state:
          $ref: '#/components/schemas/SubscriptionState'
    SubscriptionState:
      type: string
      description: The state of the subscription.
      enum:
        - trial
        - active
        - inactive
    TermsAndConditionsAccepted:
      type: object
      description: details about accepted terms and conditions for an organization. Only present if the terms and conditions were accepted.
      required:
        - accepted_at
        - accepted_by
      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'
    TermsAndConditionsInfo:
      type: object
      description: information regarding acceptance of terms and conditions for an organization.
      properties:
        accepted:
          $ref: '#/components/schemas/TermsAndConditionsAccepted'
    UserID:
      type: string
      description: ID of the user.
      example: '1014289666002276'
servers:
  - url: https://api.elastic-cloud.com
security:
  - apiKey: []
