pub struct Instances {
    pub client: Client,
}

Fields

client: Client

Implementations

List instances in a project.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances endpoint.

Parameters:

  • limit: u32 – Maximum number of items returned by a single call.
  • page_token: &str – Token returned by previous call to retreive the subsequent page.
  • sort_by: crate::types::NameSortMode – Supported set of sort modes for scanning by name only

Currently, we only support scanning in ascending order.

  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

List instances in a project.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances endpoint.

As opposed to get, this function returns all the pages of the request at once.

Create an instance in a project.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances endpoint.

Parameters:

  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Get an instance in a project.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name} endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Delete an instance from a project.

This function performs a DELETE to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name} endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

List disks attached to this instance.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/disks endpoint.

Parameters:

  • limit: u32 – Maximum number of items returned by a single call.
  • page_token: &str – Token returned by previous call to retreive the subsequent page.
  • sort_by: crate::types::NameSortMode – Supported set of sort modes for scanning by name only

Currently, we only support scanning in ascending order.

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

List disks attached to this instance.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/disks endpoint.

As opposed to disks_get, this function returns all the pages of the request at once.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/disks/attach endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/disks/detach endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Migrate an instance to a different propolis-server, possibly on a different sled.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/migrate endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

List network interfaces attached to this instance.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/network-interfaces endpoint.

Parameters:

  • limit: u32 – Maximum number of items returned by a single call.
  • page_token: &str – Token returned by previous call to retreive the subsequent page.
  • sort_by: crate::types::NameSortMode – Supported set of sort modes for scanning by name only

Currently, we only support scanning in ascending order.

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

List network interfaces attached to this instance.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/network-interfaces endpoint.

As opposed to network_interfaces_get, this function returns all the pages of the request at once.

source

pub async fn network_interfaces_post(
    &self,
    instance_name: &str,
    organization_name: &str,
    project_name: &str,
    body: &NetworkInterfaceCreate
) -> Result<NetworkInterface>

Create a network interface for an instance.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/network-interfaces endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Get an interface attached to an instance.

This function performs a GET to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/network-interfaces/{interface_name} endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • interface_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Detach a network interface from an instance.

This function performs a DELETE to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/network-interfaces/{interface_name} endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • interface_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Reboot an instance.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/reboot endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Boot an instance.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/start endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Halt an instance.

This function performs a POST to the /organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/stop endpoint.

Parameters:

  • instance_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • organization_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.
  • project_name: &str – Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more