openapi: 3.0.0
info:
  title: Infrastructure API
  version: v1alpha1
  description: The regional API for Fluidstack
servers:
  - url: https://<region>.atlas.fluidstack.io/api/v1alpha1
security:
  - bearerAuth: []
paths:
  /projects:
    post:
      summary: Create a project
      operationId: CreateProject
      tags:
        - Projects
      requestBody:
        description: Details of the project to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectsPostRequest'
      responses:
        '201':
          description: Project created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all projects
      operationId: ListProjects
      tags:
        - Projects
      responses:
        '200':
          description: A list of projects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /projects/{id}:
    get:
      summary: Get a project
      operationId: GetProject
      tags:
        - Projects
      parameters:
        - name: id
          in: path
          required: true
          description: Unique identifier of the project
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Project details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a project
      operationId: DeleteProject
      tags:
        - Projects
      parameters:
        - name: id
          in: path
          required: true
          description: Unique identifier of the project to delete
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '204':
          description: Project deleted successfully
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Project not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /instances:
    post:
      summary: Create a machine instance
      operationId: CreateInstance
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      requestBody:
        description: Details of the instance to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstancesPostRequest'
      responses:
        '201':
          description: Instance created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      summary: List all machine instances
      operationId: ListInstances
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      responses:
        '200':
          description: A list of machine instances
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Instance'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /instances/{id}:
    get:
      summary: Get a machine instance
      operationId: GetInstance
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the instance
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Instance details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a machine instance
      operationId: DeleteInstance
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the instance
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '204':
          description: Instance deleted successfully
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /instances/{id}/actions/start:
    post:
      summary: Start a machine instance
      operationId: StartInstance
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the instance
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '202':
          description: Instance start initiated successfully
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Instance state conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /instances/{id}/actions/stop:
    post:
      summary: Stop a machine instance
      operationId: StopInstance
      tags:
        - Instances
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the instance
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '202':
          description: Instance stop initiated successfully
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Instance state conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /instance-types:
    get:
      summary: List all available instance types
      operationId: ListInstanceTypes
      tags:
        - Instance Types
      responses:
        '200':
          description: A list of available instance types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InstanceType'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters:
    get:
      summary: List all clusters
      operationId: ListKubernetesClusters
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      responses:
        '200':
          description: Cluster details retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KubernetesCluster'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Create a Kubernetes cluster
      operationId: CreateKubernetesCluster
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      requestBody:
        description: Details of the Kubernetes cluster to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KubernetesClusterCreateRequest'
      responses:
        '201':
          description: Kubernetes cluster created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KubernetesCluster'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters/register:
    post:
      summary: Registers a Kubernetes cluster with a region
      operationId: RegisterKubernetesCluster
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      requestBody:
        description: Details of the Kubernetes cluster to register
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KubernetesClusterRegisterRequest'
      responses:
        '201':
          description: Kubernetes cluster registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KubernetesCluster'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters/{id}:
    get:
      summary: Get a cluster
      operationId: GetKubernetesCluster
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the kubernetes cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Kubernetes cluster details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KubernetesCluster'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Kubernetes cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a Kubernetes cluster
      operationId: UpdateKubernetesCluster
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the kubernetes cluster to update
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      requestBody:
        description: Updated details of the Kubernetes cluster
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KubernetesClusterUpdateRequest'
      responses:
        '200':
          description: Kubernetes cluster updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KubernetesCluster'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Kubernetes cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a Kubernetes cluster
      operationId: DeleteKubernetesCluster
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the kubernetes cluster to delete
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '204':
          description: Kubernetes cluster deleted successfully
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Kubernetes cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters/{cluster_id}/node-pools:
    get:
      summary: List all node pools for a cluster
      operationId: ListKubernetesNodePools
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: cluster_id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ClusterID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Node pools retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KubernetesNodePool'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters/{cluster_id}/node-pools/{node_pool_id}:
    get:
      summary: Get a node pool
      operationId: GetKubernetesNodePool
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: cluster_id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ClusterID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
        - name: node_pool_id
          in: path
          required: true
          description: Unique identifier of the node pool
          x-go-name: NodePoolID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Node pool details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KubernetesNodePool'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Node pool not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /kubernetes/clusters/{cluster_id}/credentials:
    get:
      summary: Get kubeconfig credentials for a cluster
      operationId: GetKubernetesClusterCredentials
      tags:
        - Kubernetes
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: cluster_id
          in: path
          required: true
          description: Unique identifier of the kubernetes cluster
          x-go-name: ClusterID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Kubeconfig credentials retrieved successfully
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store, no-cache, must-revalidate
              description: Prevents credential caching
            Content-Disposition:
              schema:
                type: string
                example: attachment; filename=kubeconfig
              description: Forces download as file
          content:
            application/yaml:
              schema:
                type: string
                format: byte
                description: Base64-encoded kubeconfig file
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Kubernetes cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters:
    get:
      summary: List all clusters
      operationId: ListSlurmClusters
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      responses:
        '200':
          description: Slurm Cluster details retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SlurmCluster'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters/{id}:
    get:
      summary: Get a cluster
      operationId: GetSlurmCluster
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Cluster details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlurmCluster'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters/{cluster_id}/node-pools:
    get:
      summary: List all node pools for a cluster
      operationId: ListSlurmNodePools
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: cluster_id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ClusterID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Node pools retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SlurmNodePool'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Slurm cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /capacity:
    get:
      summary: List available capacity
      operationId: ListCapacity
      tags:
        - Capacity
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
      responses:
        '200':
          description: A list of available capacity by instance type.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Available instance type
                      example: h100.8x
                    capacity:
                      type: integer
                      description: Available instance count
                      example: 1
                  required:
                    - name
                    - capacity
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /capabilities:
    get:
      summary: List available capabilities
      operationId: ListCapabilities
      tags:
        - Capabilities
      responses:
        '200':
          description: A list of available capabilities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Capabilities'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters/{cluster_id}/node-pools/{node_pool_id}:
    get:
      summary: Get a node pool
      operationId: GetSlurmNodePool
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: cluster_id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ClusterID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
        - name: node_pool_id
          in: path
          required: true
          description: Unique identifier of the node pool
          x-go-name: NodePoolID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Node pool details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlurmNodePool'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Node pool not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters/{id}/users:
    get:
      summary: List users on a Slurm cluster
      operationId: ListSlurmUsers
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      responses:
        '200':
          description: Users retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SlurmUser'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      summary: Add a user to a Slurm cluster
      operationId: AddSlurmUser
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
      requestBody:
        description: Add a user to a Slurm cluster
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlurmUser'
      responses:
        '201':
          description: Sucessfully added user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlurmUser'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /slurm/clusters/{id}/users/{username}:
    get:
      summary: Get a user on a Slurm cluster
      operationId: GetSlurmUser
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
        - name: username
          in: path
          required: true
          description: Username of the user
          schema:
            type: string
      responses:
        '200':
          description: User retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlurmUser'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      summary: Update a user's SSH keys on a Slurm cluster
      operationId: UpdateSlurmUser
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
        - name: username
          in: path
          required: true
          description: Username of the user
          schema:
            type: string
      requestBody:
        description: Updated SSH keys for the user
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlurmUserUpdateRequest'
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlurmUser'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      summary: Delete a user from a Slurm cluster
      operationId: DeleteSlurmUser
      tags:
        - Slurm
      parameters:
        - $ref: '#/components/parameters/X-PROJECT-ID'
        - name: id
          in: path
          required: true
          description: Unique identifier of the cluster
          x-go-name: ID
          schema:
            type: string
            format: uuid
            x-go-type: uuid.UUID
            x-go-type-import:
              path: github.com/google/uuid
        - name: username
          in: path
          required: true
          description: Username of the user
          schema:
            type: string
      responses:
        '204':
          description: User deleted successfully
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    Error:
      type: object
      description: Error response
      required:
        - message
      properties:
        message:
          type: string
          description: Human-readable error message
    InstancesPostRequest:
      type: object
      description: POST request for a machine instance
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: Name of the instance
          example: instance-1
        type:
          type: string
          description: Instance type
          example: h100.8x
        image:
          type: string
          description: Operating system image for the instance
          default: image://ubuntu22.04
          example: image://ubuntu22.04
        preemptible:
          type: boolean
          description: Whether the instance is preemptible
          default: false
          example: false
        ephemeral:
          type: boolean
          description: Whether the instance is ephemeral
          default: false
          example: false
        userData:
          type: string
          format: byte
          description: Base64-encoded cloud-init user data for instance initialization
          nullable: true
          default: null
          example: |
            I2Nsb3VkLWNvbmZpZwpwYWNrYWdlczoKICAtIG5naW54
        tags:
          type: object
          description: >
            Tags for the instance. Tag keys must be 1–63 characters, start and
            end with alphanumerics, and may include `-`, `_`, and `.`.
          additionalProperties:
            type: string
          example:
            environment: production
    Instance:
      type: object
      description: machine instance
      required:
        - id
        - name
        - type
        - state
        - ip
        - image
        - preemptible
        - ephemeral
        - userData
        - tags
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the instance
          example: 550e8400-e29b-41d4-a716-446655440000
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: Name of the instance
          example: instance-1
        type:
          type: string
          description: Instance type
          example: h100.8x
        ip:
          type: string
          format: ipv4
          nullable: true
          description: Private IP address of the instance
          example: 10.0.0.2
          x-go-name: IP
        state:
          $ref: '#/components/schemas/InstanceState'
        image:
          type: string
          description: Operating system image for the instance
          example: ubuntu22.04
        preemptible:
          type: boolean
          description: Whether the instance is preemptible
          example: false
        ephemeral:
          type: boolean
          description: Whether the instance is ephemeral
          example: false
        userData:
          type: string
          format: byte
          nullable: true
          description: Base64-encoded cloud-init user data for instance initialization
          example: |
            I2Nsb3VkLWNvbmZpZwpwYWNrYWdlczoKICAtIG5naW54
        tags:
          type: object
          description: Tags for the instance
          additionalProperties:
            type: string
          example:
            environment: production
        cluster_id:
          type: string
          format: uuid
          nullable: true
          description: |
            The cluster this instance belongs to
          example: 650e8400-e29b-41d4-a716-446655440001
          x-go-name: ClusterID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
    InstanceType:
      type: object
      description: Machine instance type
      required:
        - name
        - cpu
        - memory
      properties:
        name:
          type: string
          description: Name of the instance type
          example: h100.8x
        cpu:
          type: integer
          description: Number of CPUs the instance type has
          example: 96
        memory:
          type: string
          description: Amount of memory the instance type has
          example: 960Gi
        gpuModel:
          type: string
          description: GPU model the instance type has
          example: GH100_H100_SXM5_80GB
        gpuCount:
          type: integer
          description: Number of GPUs the instance type has
          example: 8
    InstanceState:
      type: string
      description: Possible states of a machine instance
      enum:
        - creating
        - starting
        - running
        - stopping
        - stopped
        - deleting
        - out-of-stock
        - error
      example: running
    ProjectsPostRequest:
      type: object
      description: POST request for a project
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the project
          example: project-1
        tags:
          type: object
          description: >
            Tags for the project. Tag keys must be 1–63 characters, start and
            end with alphanumerics, and may include `-`, `_`, and `.`.
          additionalProperties:
            type: string
          example:
            team: ml-ops
    Project:
      type: object
      description: Project information
      required:
        - id
        - name
        - state
        - tags
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the project
          example: 123e4567-e89b-12d3-a456-426614174003
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: Name of the project
          example: project-1
        state:
          $ref: '#/components/schemas/ProjectState'
        tags:
          type: object
          description: Tags for the project
          additionalProperties:
            type: string
          example:
            team: ml-ops
    ProjectState:
      type: string
      description: Possible states of a project
      enum:
        - active
        - deleting
      example: active
    KubernetesCluster:
      type: object
      description: Kubernetes Cluster
      required:
        - id
        - name
        - version
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the cluster
          example: 123e4567-e89b-12d3-a456-426614174003
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: The cluster name.
          example: cluster-01
        version:
          type: string
          description: The cluster version.
          example: 1.32.1
        endpoint:
          type: string
          format: uri
          description: The API server endpoint of the kubernetes cluster
          example: https://api.cluster-01.example.com
        certificateAuthorityData:
          type: string
          format: byte
          description: Base64-encoded certificate authority data for the kubernetes cluster
        status:
          $ref: '#/components/schemas/KubernetesClusterStatus'
    KubernetesClusterStatus:
      type: object
      description: The cluster status.
      properties:
        type:
          type: string
          description: The cluster status type.
          enum:
            - READY
            - NOT_READY
            - DELETING
          example: READY
        details:
          type: object
          description: >-
            Detailed status information including cluster, control plane, and
            node pool status.
          additionalProperties: true
    KubernetesClusterCreateRequest:
      type: object
      description: Request to create a Kubernetes cluster
      required:
        - name
        - version
        - podCIDRBlock
        - serviceCIDRBlock
      properties:
        name:
          type: string
          description: The cluster name.
          example: cluster-01
        version:
          type: string
          description: The cluster version.
          example: 1.32.5
        podCIDRBlock:
          type: string
          description: The CIDR block for pod IPs in the cluster.
          default: 10.233.0.0/18
        serviceCIDRBlock:
          type: string
          description: The CIDR block for service IPs in the cluster.
          default: 10.233.64.0/18
        defaultNodePool:
          type: object
          description: Definition of the default node pool for the cluster
          required:
            - name
            - type
            - count
          properties:
            create:
              type: boolean
              description: Whether to create the default node pool
              default: true
            name:
              type: string
              description: Name of the default node pool
              default: default
            type:
              type: string
              description: Instance type of the default node pool
              default: cpu.4x
            count:
              type: integer
              description: Number of nodes in the default node pool
              default: 3
    KubernetesClusterUpdateRequest:
      type: object
      description: Request to update a Kubernetes cluster
      properties:
        version:
          type: string
          description: The new cluster version.
          example: v1.32.5
          pattern: ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?$
        labels:
          type: object
          description: Labels to merge into the cluster's existing labels
          additionalProperties:
            type: string
          example:
            fluidstack.io/metrics-enabled: 'true'
    KubernetesClusterRegisterRequest:
      type: object
      description: Request to register a Kubernetes cluster with a region
      required:
        - name
        - kubeconfig
      properties:
        name:
          type: string
          description: The cluster name.
          example: cluster-01
        kubeconfig:
          type: string
          description: Kubeconfig for the kubernetes cluster
        labels:
          type: object
          description: Labels as a JSON map of key-value pairs
          additionalProperties:
            type: string
          example:
            environment: production
    KubernetesNodePool:
      type: object
      description: Kubernetes Node Pool
      required:
        - id
        - name
        - cluster
        - type
        - count
        - version
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the kubernetes node pool
          example: 123e4567-e89b-12d3-a456-426614174003
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: Name of the kubernetes node pool
          example: pool-01
        cluster:
          type: string
          description: Name of the kubernetes cluster
          example: cluster-01
        type:
          type: string
          description: Instance type of the kubernetes node pool
          example: h100.8x
        count:
          type: integer
          description: Number of nodes in the kubernetes node pool
          example: 3
        version:
          type: string
          description: Version of the kubernetes node pool
          example: 1.32.1
        nodes:
          type: array
          description: List of nodes in the kubernetes node pool
          items:
            $ref: '#/components/schemas/KubernetesNode'
    KubernetesNode:
      type: object
      description: Kubernetes Node
      required:
        - name
        - instanceID
        - state
        - kubeletVersion
        - createdAt
        - conditions
      properties:
        name:
          type: string
          description: Name of the kubernetes node
          example: node-01
        instanceID:
          type: string
          format: uuid
          description: Unique identifier of the instance backing the kubernetes node
          x-go-name: InstanceID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        state:
          type: string
          description: State of the kubernetes node
          enum:
            - ready
            - not_ready
            - unknown
          example: ready
        kubeletVersion:
          type: string
          description: Version of the kubelet running on the kubernetes node
          example: v1.32.1
        createdAt:
          type: string
          format: date-time
          description: Creation time of the kubernetes node
          example: '2023-10-01T12:00:00Z'
        publicIP:
          type: string
          format: ipv4
          description: Public IP address of the node
          example: 203.0.113.1
          x-go-name: PublicIP
          x-go-type: net.IP
        privateIP:
          type: string
          format: ipv4
          description: Private IP address of the node
          example: 10.0.0.2
          x-go-name: PrivateIP
          x-go-type: net.IP
        conditions:
          type: array
          description: Conditions of the kubernetes node
          items:
            type: object
            x-go-type: corev1.NodeCondition
            x-go-type-import:
              path: k8s.io/api/core/v1
              name: corev1
            properties:
              type:
                type: string
                description: Type of the condition
                example: Ready
              status:
                type: string
                description: Status of the condition
                enum:
                  - 'True'
                  - 'False'
                  - Unknown
              lastHeartbeatTime:
                type: string
                format: date-time
                description: Last time the condition was updated
                example: '2023-10-01T12:00:00Z'
              lastTransitionTime:
                type: string
                format: date-time
                description: >-
                  Last time the condition transitioned from one status to
                  another
                example: '2023-10-01T12:00:00Z'
              reason:
                type: string
                description: Reason for the condition's last transition
                example: KubeletReady
              message:
                type: string
                description: Human-readable message indicating details about the condition
                example: Kubelet is ready
        accelerator:
          $ref: '#/components/schemas/Accelerator'
        labels:
          type: object
          description: Labels assigned to the kubernetes node
          additionalProperties:
            type: string
          example:
            kubernetes.io/hostname: node-01
            node-role.kubernetes.io/worker: ''
        taints:
          type: array
          description: Taints applied to the kubernetes node
          items:
            type: object
            properties:
              key:
                type: string
                description: Key of the taint
                example: nvidia.com/gpu
              value:
                type: string
                description: Value of the taint
                example: present
              effect:
                type: string
                description: Effect of the taint
                enum:
                  - NoSchedule
                  - PreferNoSchedule
                  - NoExecute
                example: NoSchedule
            x-go-type: corev1.Taint
            x-go-type-import:
              path: k8s.io/api/core/v1
              name: corev1
    SlurmCluster:
      type: object
      description: Slurm Cluster
      required:
        - id
        - name
        - version
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the slurm cluster
          example: 123e4567-e89b-12d3-a456-426614174003
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: Name of the slurm cluster
          example: cluster-01
        version:
          type: string
          description: The cluster version.
          example: 24.05.6
        loginNodes:
          type: array
          description: Login nodes for the cluster
          items:
            $ref: '#/components/schemas/SlurmLoginNode'
    SlurmNodePool:
      type: object
      description: Slurm Node Pool
      required:
        - id
        - name
        - type
        - count
        - nodes
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the slurm node pool
          example: 123e4567-e89b-12d3-a456-426614174003
          x-go-name: ID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        name:
          type: string
          description: Name of the node pool
          example: pool-01
        type:
          type: string
          description: Instance type of the node pool
          example: h100.8x
        count:
          type: integer
          description: Number of nodes in the node pool
          example: 3
        nodes:
          type: array
          description: List of nodes in the node pool
          items:
            $ref: '#/components/schemas/SlurmNode'
    SlurmNode:
      type: object
      description: Slurm Node
      required:
        - name
        - instanceID
        - states
        - slurmdVersion
      properties:
        name:
          type: string
          description: Name of the node
          example: node-01
        instanceID:
          type: string
          format: uuid
          description: Unique identifier of the instance backing the node
          x-go-name: InstanceID
          x-go-type: uuid.UUID
          x-go-type-import:
            path: github.com/google/uuid
        states:
          type: array
          description: States of the node
          items:
            type: string
        slurmdVersion:
          type: string
          description: Version of slurmd running on the node
          example: 24.05.7
        publicIP:
          type: string
          format: ipv4
          description: Public IP address of the node
          example: 203.0.113.1
          x-go-name: PublicIP
          x-go-type: net.IP
        privateIP:
          type: string
          format: ipv4
          description: Private IP address of the node
          example: 10.0.0.2
          x-go-name: PrivateIP
          x-go-type: net.IP
        partitions:
          type: array
          description: Partitions to which the node belongs
          items:
            type: string
            example: high-priority
        reservation:
          type: string
          description: Reservation to which the node belongs
        reason:
          type: string
          description: Reason for the state of the node
        accelerator:
          $ref: '#/components/schemas/Accelerator'
    SlurmLoginNode:
      type: object
      description: Slurm Login nNode
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the node
          example: login-01
        publicIP:
          type: string
          description: Public IP address of the node
          format: ipv4
          example: 203.0.113.0
          x-go-name: PublicIP
          x-go-type: net.IP
    Accelerator:
      type: object
      description: Hardware accelerator details for a node
      required:
        - type
        - product
      properties:
        type:
          type: string
          enum:
            - nvidia/gpu
          description: Type of the hardware accelerator
          example: nvidia/gpu
          x-enum-varnames:
            - NvidiaGPU
        product:
          type: string
          description: Product name of the accelerator
          example: NVIDIA-H100-80GB-HBM3
        driverVersion:
          type: string
          description: Version of the driver for the accelerator
          example: 550.127.08
        cudaVersion:
          type: string
          description: Version of CUDA on the node
          example: '13.0'
        count:
          type: integer
          description: Number of accelerators on the node
          example: 8
    Capabilities:
      type: array
      description: List of avaialable capabilities
      example:
        - instances:list
        - slurm:clusters:list
      items:
        $ref: '#/components/schemas/Capability'
    Capability:
      type: string
      enum:
        - instances:list
        - instances:create
        - instances:delete
        - instances:read
        - instances:update
        - instances:start
        - instances:stop
        - projects:list
        - projects:create
        - projects:delete
        - projects:read
        - projects:update
        - kubernetes:clusters:list
        - kubernetes:clusters:read
        - kubernetes:clusters:create
        - kubernetes:clusters:delete
        - kubernetes:clusters:update
        - kubernetes:clusters:register
        - kubernetes:node-pools:list
        - kubernetes:node-pools:read
        - kubernetes:node-pools:create
        - kubernetes:node-pools:delete
        - kubernetes:node-pools:update
        - kubernetes:credentials:read
        - kubernetes:features:user-auth
        - slurm:clusters:list
        - slurm:clusters:read
        - slurm:clusters:proxy
        - slurm:node-pools:list
        - slurm:node-pools:read
        - slurm:users:list
        - slurm:users:create
        - slurm:users:read
        - slurm:users:update
        - slurm:users:delete
    SlurmUser:
      type: object
      description: Slurm cluster user
      required:
        - username
        - sshKeys
      properties:
        username:
          type: string
          description: Username of the user.
          example: user01
        sshKeys:
          type: array
          description: SSH public keys authorized for the user.
          x-go-name: SSHKeys
          items:
            type: string
            example: >-
              ssh-ed25519
              AAAAC3NzaC1lZDI1NTE5AAAAIEaSkijEWFbnjixzWRw3u2spZZaeVeWO5/ymySevCvXh
        sudo:
          type: boolean
          description: >-
            Whether the user has sudo access. Defaults to false if not
            specified.
          default: false
          example: false
    SlurmUserUpdateRequest:
      type: object
      description: Request to update a Slurm cluster user's SSH keys and sudo access
      required:
        - sshKeys
      properties:
        sshKeys:
          type: array
          description: Updated SSH public keys for the user.
          x-go-name: SSHKeys
          items:
            type: string
            example: >-
              ssh-ed25519
              AAAAC3NzaC1lZDI1NTE5AAAAIEaSkijEWFbnjixzWRw3u2spZZaeVeWO5/ymySevCvXh
        sudo:
          type: boolean
          description: >-
            Whether the user has sudo access. If not provided, the current value
            is preserved.
          example: false
  parameters:
    X-PROJECT-ID:
      name: X-PROJECT-ID
      in: header
      required: true
      description: Project identifier passed as a header
      x-go-name: ProjectID
      schema:
        type: string
        format: uuid
        x-go-type: uuid.UUID
        x-go-type-import:
          path: github.com/google/uuid
