-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add VM SSH key endpoints * update SSH key create parameters
- Loading branch information
Showing
10 changed files
with
348 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ allOf: | |
enum: | ||
- new | ||
- starting | ||
- reimaging | ||
- migrating | ||
- running | ||
- stopping | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
title: VirtualMachineSshKey | ||
type: object | ||
description: | | ||
Describes an SSH key used to access a virtual machine. | ||
properties: | ||
id: | ||
$ref: ../../ID.yml | ||
name: | ||
type: string | ||
description: A user-defined name for the SSH key. | ||
identifier: | ||
$ref: ../../Identifier.yml | ||
creator: | ||
$ref: ../../creators/CreatorScope.yml | ||
environment_id: | ||
$ref: ../../ID.yml | ||
hub_id: | ||
$ref: ../../ID.yml | ||
state: | ||
allOf: | ||
- required: | ||
- current | ||
properties: | ||
current: | ||
description: The current state of the SSH key. | ||
type: string | ||
enum: | ||
- live | ||
- deleting | ||
- deleted | ||
- $ref: ../../State.yml | ||
public_key: | ||
type: string | ||
description: The public key value of this SSH key. | ||
required: | ||
- id | ||
- name | ||
- identifier | ||
- creator | ||
- environment_id | ||
- hub_id | ||
- state | ||
- public_key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
platform/paths/virtual-machines/includes/VirtualMachineSshIncludes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
title: VirtualMachineSshIncludes | ||
description: All includable resources linkable to the given virtual machine SSH key. | ||
type: object | ||
properties: | ||
creators: | ||
$ref: ../../../../components/schemas/includes/CreatorInclude.yml | ||
environments: | ||
type: object | ||
additionalProperties: | ||
$ref: ../../../../components/schemas/environments/Environment.yml | ||
environments:identifiers: | ||
type: object | ||
additionalProperties: | ||
$ref: ../../../../components/schemas/ID.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
get: | ||
operationId: "getVirtualMachineSshKey" | ||
summary: Get Virtual Machine SSH Key | ||
description: | | ||
Retrieves a single virtual machine SSH key by ID. | ||
Requires the `virtual-machines-ssh-keys-manage` capability. | ||
tags: | ||
- Virtual Machines | ||
parameters: | ||
- name: sshKeyId | ||
description: The ID of the virtual machine SSH key. | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
- name: include | ||
in: query | ||
required: false | ||
description: | | ||
A comma-separated list of include values. Included resources will show up under the root document's `include` field. | ||
In the case of applying an include to a collection of resources, if multiple resources share the same include, it will only appear once in the return. | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
enum: | ||
- creators | ||
- environments | ||
responses: | ||
200: | ||
description: Returns the requested virtual machine SSH key. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: ../../../../components/schemas/vms/ssh-keys/VirtualMachineSshKey.yml | ||
includes: | ||
$ref: ../includes/VirtualMachineSshIncludes.yml | ||
default: | ||
$ref: ../../../../components/responses/errors/DefaultError.yml | ||
|
||
patch: | ||
operationId: "updateVirtualMachineSshKey" | ||
summary: Update Virtual Machine SSH Key | ||
description: | | ||
Updates the specified virtual machine SSH key. | ||
Requires the `virtual-machines-ssh-keys-manage` capability. | ||
tags: | ||
- Virtual Machine | ||
parameters: | ||
- name: sshKeyId | ||
description: The ID of the SSH key. | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
- name: include | ||
in: query | ||
required: false | ||
description: | | ||
A comma-separated list of include values. Included resources will show up under the root document's `include` field. | ||
In the case of applying an include to a collection of resources, if multiple resources share the same include, it will only appear once in the return. | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
enum: | ||
- creators | ||
- environments | ||
requestBody: | ||
description: Parameters for updating the virtual machine SSH key. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: The name of the virtual machine SSH key. | ||
identifier: | ||
type: string | ||
description: The identifier of the virtual machine SSH key. | ||
responses: | ||
200: | ||
description: Returns the updated virtual machine SSH key. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: ../../../../components/schemas/vms/ssh-keys/VirtualMachineSshKey.yml | ||
includes: | ||
$ref: ../includes/VirtualMachineSshIncludes.yml | ||
default: | ||
$ref: ../../../../components/responses/errors/DefaultError.yml | ||
|
||
delete: | ||
operationId: "deleteVirtualMachineSshKey" | ||
summary: Delete Virtual Machine SSH Key | ||
description: Requires the `virtual-machines-ssh-keys-manage` capability. | ||
tags: | ||
- Virtual Machines | ||
parameters: | ||
- name: sshKeyId | ||
description: The ID of the virtual machine SSH key to delete. | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
202: | ||
description: Returns a job descriptor. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: ../../../../components/schemas/jobs/JobDescriptor.yml | ||
default: | ||
$ref: ../../../../components/responses/errors/DefaultError.yml |
Oops, something went wrong.