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 – A count of bytes, typically used either for memory or storage capacity

The maximum supported byte count is i64::MAX. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers’ convenience.

  • 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 – human-readable free-form text about a resource.
  • project_name: &str – The project’s unique name within the organization.

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 – human-readable free-form text about a resource.
  • project_name: &str – The project’s unique name within the organization.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – A count of bytes, typically used either for memory or storage capacity

The maximum supported byte count is i64::MAX. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers’ convenience.

  • 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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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

Parameters:

  • instance_name: &str – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – A count of bytes, typically used either for memory or storage capacity

The maximum supported byte count is i64::MAX. This makes it somewhat inconvenient to define constructors: a u32 constructor can be infallible, but an i64 constructor can fail (if the value is negative) and a u64 constructor can fail (if the value is larger than i64::MAX). We provide all of these for consumers’ convenience.

  • 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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • interface_name: &str – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • interface_name: &str – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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 – human-readable free-form text about a resource.
  • organization_name: &str – human-readable free-form text about a resource.
  • project_name: &str – human-readable free-form text about a resource.

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