Skip to content

Latest commit

 

History

History
512 lines (273 loc) · 14.3 KB

InstanceApi.md

File metadata and controls

512 lines (273 loc) · 14.3 KB

\InstanceApi

All URIs are relative to https://api-ch-gva-2.exoscale.com/v2

Method HTTP request Description
add_instance_protection PUT /instance/{id}:add-protection Set instance destruction protection
create_instance POST /instance Create a Compute instance
create_snapshot POST /instance/{id}:create-snapshot Create a Snapshot of a Compute instance
delete_instance DELETE /instance/{id} Delete a Compute instance
get_instance GET /instance/{id} Retrieve Compute instance details
list_instances GET /instance List Compute instances
reboot_instance PUT /instance/{id}:reboot Reboot a Compute instance
remove_instance_protection PUT /instance/{id}:remove-protection Remove instance destruction protection
reset_instance PUT /instance/{id}:reset Reset a Compute instance to a base/target template
reset_instance_field DELETE /instance/{id}/{field} Reset Instance field
resize_instance_disk PUT /instance/{id}:resize-disk Resize a Compute instance disk
revert_instance_to_snapshot POST /instance/{instance-id}:revert-snapshot Revert a snapshot for an instance
scale_instance PUT /instance/{id}:scale Scale a Compute instance to a new Instance Type
start_instance PUT /instance/{id}:start Start a Compute instance
stop_instance PUT /instance/{id}:stop Stop a Compute instance
update_instance PUT /instance/{id} Update a Compute instance

add_instance_protection

serde_json::Value add_instance_protection(id) Set instance destruction protection

Parameters

Name Type Description Required Notes
id String [required]

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_instance

crate::models::Operation create_instance(create_instance_request) Create a Compute instance

Parameters

Name Type Description Required Notes
create_instance_request CreateInstanceRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_snapshot

crate::models::Operation create_snapshot(id) Create a Snapshot of a Compute instance

Parameters

Name Type Description Required Notes
id String [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_instance

crate::models::Operation delete_instance(id) Delete a Compute instance

Parameters

Name Type Description Required Notes
id String [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_instance

crate::models::Instance get_instance(id) Retrieve Compute instance details

Parameters

Name Type Description Required Notes
id String [required]

Return type

crate::models::Instance

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_instances

crate::models::ListInstances200Response list_instances(manager_id, manager_type) List Compute instances

Parameters

Name Type Description Required Notes
manager_id Option<String>
manager_type Option<String>

Return type

crate::models::ListInstances200Response

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reboot_instance

crate::models::Operation reboot_instance(id) Reboot a Compute instance

Parameters

Name Type Description Required Notes
id String [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_instance_protection

serde_json::Value remove_instance_protection(id) Remove instance destruction protection

Parameters

Name Type Description Required Notes
id String [required]

Return type

serde_json::Value

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reset_instance

crate::models::Operation reset_instance(id, reset_instance_request) Reset a Compute instance to a base/target template

This operation re-installs a Compute instance to a base template. If target template is provided it will be used to recreated instance from. Warning: the operation wipes all data stored on the disk.

Parameters

Name Type Description Required Notes
id String [required]
reset_instance_request ResetInstanceRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reset_instance_field

crate::models::Operation reset_instance_field(id, field) Reset Instance field

Parameters

Name Type Description Required Notes
id String [required]
field String [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resize_instance_disk

crate::models::Operation resize_instance_disk(id, resize_instance_disk_request) Resize a Compute instance disk

This operation resizes a Compute instance's disk volume. Note: the disk can only grow, cannot be shrunk.

Parameters

Name Type Description Required Notes
id String [required]
resize_instance_disk_request ResizeInstanceDiskRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

revert_instance_to_snapshot

crate::models::Operation revert_instance_to_snapshot(instance_id, revert_instance_to_snapshot_request) Revert a snapshot for an instance

This operation reverts the snapshot to the Compute instance volume, restoring stored data as it was at the time of the snapshot. The Compute instance must be previously stopped.

Parameters

Name Type Description Required Notes
instance_id String [required]
revert_instance_to_snapshot_request RevertInstanceToSnapshotRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

scale_instance

crate::models::Operation scale_instance(id, scale_instance_request) Scale a Compute instance to a new Instance Type

This operation changes the Compute instance's type. Note: the new Instance Type must be within the same family (e.g. a standard instance cannot be scaled to gpu2 or storage).

Parameters

Name Type Description Required Notes
id String [required]
scale_instance_request ScaleInstanceRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_instance

crate::models::Operation start_instance(id, start_instance_request) Start a Compute instance

This operation starts a virtual machine, potentially using a rescue profile if specified

Parameters

Name Type Description Required Notes
id String [required]
start_instance_request StartInstanceRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

stop_instance

crate::models::Operation stop_instance(id) Stop a Compute instance

Parameters

Name Type Description Required Notes
id String [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_instance

crate::models::Operation update_instance(id, update_instance_request) Update a Compute instance

Parameters

Name Type Description Required Notes
id String [required]
update_instance_request UpdateInstanceRequest [required]

Return type

crate::models::Operation

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]