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 VPC Subnets API version: v1alpha5 host: api.crusoecloud.com basePath: /v1alpha5 schemes: - https consumes: - application/json produces: - application/json tags: - name: VPC Subnets paths: /projects/{project_id}/networking/vpc-subnets: get: tags: - VPC Subnets summary: Retrieve details about all VPC subnets that belong to the logged in user. operationId: listVPCSubnets parameters: - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: ProjectID name: project_id in: path required: true responses: '200': $ref: '#/responses/listVpcSubnetsResponse' '401': $ref: '#/responses/authError' '403': $ref: '#/responses/permissionsError' '500': $ref: '#/responses/serverError' post: description: A successful response from this resource will contain information regarding the created subnet. tags: - VPC Subnets summary: Create a new VPC subnet owned by the logged in user. operationId: createVPCSubnet parameters: - name: Body in: body required: true schema: $ref: '#/definitions/VPCSubnetPostRequest' - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: ProjectID name: project_id in: path required: true responses: '200': $ref: '#/responses/vpcSubnetPostResponse' '400': $ref: '#/responses/badReqError' '401': $ref: '#/responses/authError' '403': $ref: '#/responses/permissionsError' '500': $ref: '#/responses/serverError' /projects/{project_id}/networking/vpc-subnets/{vpc_subnet_id}: get: tags: - VPC Subnets summary: Retrieve details for a VPC subnet that belongs to the logged in user. operationId: getVPCSubnet parameters: - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: ProjectID name: project_id in: path required: true - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: VPCSubnetID name: vpc_subnet_id in: path required: true responses: '200': $ref: '#/responses/getVpcSubnetResponse' '401': $ref: '#/responses/authError' '403': $ref: '#/responses/permissionsError' '500': $ref: '#/responses/serverError' delete: description: A successful response from this resource will contain the async operation. tags: - VPC Subnets summary: Delete a VPC subnet owned by the logged in user. operationId: deleteVPCSubnet parameters: - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: ProjectID name: project_id in: path required: true - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: VPCSubnetID name: vpc_subnet_id in: path required: true responses: '200': $ref: '#/responses/asyncOperationResponse' '400': $ref: '#/responses/badReqError' '401': $ref: '#/responses/authError' '403': $ref: '#/responses/permissionsError' '404': $ref: '#/responses/notFoundError' '500': $ref: '#/responses/serverError' patch: description: A successful response from this resource will contain the async operation. tags: - VPC Subnets summary: Patch (update) a VPC subnet owned by the logged in user. operationId: patchVPCSubnet parameters: - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: ProjectID name: project_id in: path required: true - type: string example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab x-go-name: VPCSubnetID name: vpc_subnet_id in: path required: true - name: Body in: body required: true schema: $ref: '#/definitions/VPCSubnetPatchRequest' responses: '200': $ref: '#/responses/asyncOperationResponse' '400': $ref: '#/responses/badReqError' '401': $ref: '#/responses/authError' '403': $ref: '#/responses/permissionsError' '404': $ref: '#/responses/notFoundError' '500': $ref: '#/responses/serverError' definitions: Operation: description: 'Individual resources that use Operations should populate the `metadata` field with resource-specific information.' type: object title: Operation contains the common fields for all Operation API objects. required: - operation_id - state - metadata - started_at - completed_at properties: completed_at: type: string x-go-name: CompletedAt example: '2021-12-03T19:59:34Z' metadata: x-go-name: Metadata example: '{}' operation_id: type: string x-go-name: ID example: F6EF489C-086E-458D-B812-7962964A28C9 result: x-go-name: Result example: '{}' started_at: type: string x-go-name: StartedAt example: '2021-12-03T19:58:34Z' state: type: string enum: - IN_PROGRESS - SUCCEEDED - FAILED x-go-name: State example: IN_PROGRESS x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers AsyncOperationResponse: type: object title: AsyncOperationResponse is the response type for endpoints which return async operations. required: - operation properties: operation: $ref: '#/definitions/Operation' x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers VPCSubnetPostRequest: type: object title: VPCSubnetPostRequest is the request type for POST requests to the VPC Subnet endpoint. required: - name - cidr - vpc_network_id - location properties: cidr: type: string x-go-name: Cidr example: 172.27.0.0/16 location: type: string x-go-name: Location example: us-east name: type: string x-go-name: Name example: my-cool-vpc-subnet vpc_network_id: type: string x-go-name: VPCNetworkID example: 36c0b0d9-8b68-4869-addb-227b06b64ee0 x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers VPCSubnetPostResponse: type: object title: VPCSubnetPostResponse is the response type for POST requests to the VPC Subnets endpoint. required: - subnet properties: subnet: $ref: '#/definitions/VPCSubnet' x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers VPCSubnet: type: object required: - id - name - vpc_network_id - cidr - location properties: cidr: type: string x-go-name: CIDR example: 121.0.0.0/24 id: type: string x-go-name: ID example: 1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc location: type: string x-go-name: Location example: us-northcentraleast1-a name: type: string x-go-name: Name example: my-subnet vpc_network_id: type: string x-go-name: VPCNetworkID example: 1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers ListVPCSubnetsResponseV1Alpha5: type: object title: ListVPCSubnetsResponseV1Alpha5 is the response type for GET requests to the VPC Subnets endpoint. required: - items properties: items: type: array items: $ref: '#/definitions/VPCSubnet' x-go-name: Items x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers VPCSubnetPatchRequest: type: object title: VPCSubnetPatchRequest is the request type for PATCH requests to the VPC Subnets endpoint. required: - name properties: name: type: string x-go-name: Name example: my-cool-vpc-subnet x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers responses: 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 getVpcSubnetResponse: description: '' schema: $ref: '#/definitions/VPCSubnet' vpcSubnetPostResponse: description: '' schema: $ref: '#/definitions/VPCSubnetPostResponse' listVpcSubnetsResponse: description: '' schema: $ref: '#/definitions/ListVPCSubnetsResponseV1Alpha5' 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 asyncOperationResponse: description: '' schema: $ref: '#/definitions/AsyncOperationResponse' permissionsError: description: Error Permissions schema: type: object required: - code - message properties: code: type: string x-go-name: Code example: '403' message: type: string x-go-name: Message example: unauthorized 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