Crusoe Instance Groups API
The Instance Groups API from Crusoe — 2 operation(s) for instance groups.
The Instance Groups API from Crusoe — 2 operation(s) for instance groups.
swagger: '2.0'
info:
description: The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.
title: Crusoe Cloud API Gateway Audit Logs Instance Groups API
version: v1alpha5
host: api.crusoecloud.com
basePath: /v1alpha5
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Instance Groups
paths:
/projects/{project_id}/compute/instance-groups:
get:
tags:
- Instance Groups
summary: Lists all instance groups.
operationId: listInstanceGroups
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/listInstanceGroupsResponse'
'401':
$ref: '#/responses/authError'
'500':
$ref: '#/responses/serverError'
post:
tags:
- Instance Groups
summary: Create an instance group.
operationId: createInstanceGroup
parameters:
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/InstanceGroupPostRequest'
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/createInstanceGroupResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'500':
$ref: '#/responses/serverError'
/projects/{project_id}/compute/instance-groups/{instance_group_id}:
get:
tags:
- Instance Groups
summary: Retrieve details about an instance group.
operationId: getInstanceGroup
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: InstanceGroupID
name: instance_group_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/getInstanceGroupResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
delete:
tags:
- Instance Groups
summary: Delete an instance group.
operationId: deleteInstanceGroup
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: InstanceGroupID
name: instance_group_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/emptyResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'500':
$ref: '#/responses/serverError'
patch:
tags:
- Instance Groups
summary: Update an instance group.
operationId: patchInstanceGroup
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: InstanceGroupID
name: instance_group_id
in: path
required: true
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/InstanceGroupPatchRequest'
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/patchInstanceGroupResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'500':
$ref: '#/responses/serverError'
definitions:
InstanceGroupPatchRequest:
description: 'This is a separate type from InstanceGroupPostRequest for clearer documentation, as these fields are not required
in the PATCH endpoint.'
type: object
title: InstanceGroupPatchRequest defines the specifications of the updates to be made to the instance group.
properties:
desired_count:
$ref: '#/definitions/DesiredCount'
name:
description: Name of the instance group.
type: string
x-go-name: Name
example: my-instance-group
template_id:
description: Instance Template ID to be associated with the instance group.
type: string
x-go-name: TemplateID
example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
ListInstanceGroupsResponse:
description: 'ListInstanceGroupsResponse is the resource response type for GET
requests to the InstanceGroup endpoint.'
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/definitions/InstanceGroup'
x-go-name: Items
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
InstanceGroup:
type: object
title: InstanceGroup defines the specification of an instance group.
required:
- name
- id
- template_id
- created_at
- updated_at
- project_id
- running_instance_count
- instances
- desired_count
properties:
created_at:
description: Time the instance template was created.
type: string
x-go-name: CreatedAt
example: '2024-01-01T00:00:00Z'
desired_count:
description: Desired VM Count for the instance group.
type: integer
format: int64
x-go-name: DesiredCount
example: 3
id:
description: ID of the instance group.
type: string
x-go-name: ID
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
instances:
description: A list of IDs of instances currently in the instance group.
type: array
items:
type: string
x-go-name: Instances
example:
- 066ce497-889e-4899-b53e-400df3fb7c0e
name:
description: Name of the instance group.
type: string
x-go-name: Name
example: my-instance-group
project_id:
description: Project ID of the project this instance template belongs to.
type: string
x-go-name: ProjectID
example: b67aec22-2908-4427-994c-4e32be87477e
running_instance_count:
description: The number of running instances currently in the Instance Group.
type: integer
format: int64
x-go-name: RunningInstanceCount
example: 3
template_id:
description: Instance Template ID currently associated with the instance group.
type: string
x-go-name: TemplateID
example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
updated_at:
description: Most recent time the instance group was updated.
type: string
x-go-name: UpdatedAt
example: '2024-01-01T00:00:00Z'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
InstanceGroupPostRequest:
type: object
title: InstanceGroupPostRequest defines the specifications of the instance group to be created.
required:
- name
- template_id
- desired_count
properties:
desired_count:
description: Desired VM Count for the instance group.
type: integer
format: int64
x-go-name: DesiredCount
example: 3
name:
description: Name of the instance group.
type: string
x-go-name: Name
example: my-instance-group
template_id:
description: Instance Template ID to be associated with the instance group.
type: string
x-go-name: TemplateID
example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
DesiredCount:
type: object
title: DesiredCount defines a wrapper struct for the desired count of VMs in the instance group.
properties:
value:
type: integer
format: int64
x-go-name: Value
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
responses:
getInstanceGroupResponse:
description: ''
schema:
$ref: '#/definitions/InstanceGroup'
createInstanceGroupResponse:
description: ''
schema:
$ref: '#/definitions/InstanceGroup'
emptyResponse:
description: Empty Response
listInstanceGroupsResponse:
description: ''
schema:
$ref: '#/definitions/ListInstanceGroupsResponse'
serverError:
description: Error Internal Server
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '500'
message:
type: string
x-go-name: Message
example: internal_error
patchInstanceGroupResponse:
description: ''
schema:
$ref: '#/definitions/InstanceGroup'
notFoundError:
description: Error Not Found
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '404'
message:
type: string
x-go-name: Message
example: not_found
badReqError:
description: Error Bad Request
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '400'
message:
type: string
x-go-name: Message
example: bad_request
authError:
description: Error Authentication Failed
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '401'
message:
type: string
x-go-name: Message
example: bad_credential
x-tagGroups:
- name: Compute
tags:
- VMs
- VM Operations
- Images
- Instance Templates
- Custom Images
- Custom Image Operations
- name: Organizations
tags:
- Projects
- Entities
- Prospects
- Billing
- Usage
- Quotas
- Audit Logs
- Reservations
- name: Users
tags:
- Identities
- Roles
- SSH Keys
- Tokens
- name: Storage
tags:
- Disks
- Disk Operations
- Snapshots
- Snapshot Operations
- name: Networking
tags:
- VPC Firewall Rules
- VPC Firewall Rule Operations
- VPC Networks
- VPC Subnets
- IB Partitions
- Load Balancers
- name: Orchestration
tags:
- Kubernetes Clusters
- Kubernetes Cluster Operations
- Kubernetes Node Pools
- Kubernetes Node Pool Operations
- Kubernetes Versions
- AutoClusters
- AutoCluster Operations
- name: Locations
tags:
- Locations
- name: Capacities
tags:
- Capacities