pub struct Client { /* private fields */ }
Expand description
Entrypoint for interacting with the API client.
Implementations
sourceimpl Client
impl Client
sourcepub fn new<T, H>(token: T, host: H) -> Self where
T: ToString,
H: ToString,
pub fn new<T, H>(token: T, host: H) -> Self where
T: ToString,
H: ToString,
Create a new Client struct. It takes a type that can convert into
an &str (String
or Vec<u8>
for example). As long as the function is
given a valid API key your requests will work.
sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from environment variables: OXIDE_TOKEN and OXIDE_HOST.
pub async fn request_raw(
&self,
method: Method,
uri: &str,
body: Option<Body>
) -> Result<RequestBuilder>
pub async fn response_raw(
&self,
method: Method,
uri: &str,
body: Option<Body>
) -> Result<Response>
sourcepub fn disks(&self) -> Disks
pub fn disks(&self) -> Disks
Virtual disks are used to store instance-local data which includes the operating system.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn firewall(&self) -> Firewall
pub fn firewall(&self) -> Firewall
Firewall operation controls the flow of network data into a VPC.
FROM: http://oxide.computer/docs/#xxx
TODO operations that will not ship to customers.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn images(&self) -> Images
pub fn images(&self) -> Images
Images are read-only Virtual Disks that may be used to boot Virtual Machines.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn images_global(&self) -> ImagesGlobal
pub fn images_global(&self) -> ImagesGlobal
Images are read-only Virtual Disks that may be used to boot Virtual Machines. These images are scoped globally.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn instances(&self) -> Instances
pub fn instances(&self) -> Instances
Virtual machine instances are the basic unit of computation. These operations are used for provisioning, controlling, and destroying instances.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn ip_pools(&self) -> IpPools
pub fn ip_pools(&self) -> IpPools
IP Pools contain external IP addresses that can be assigned to virtual machine Instances.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn metrics(&self) -> Metrics
pub fn metrics(&self) -> Metrics
Metrics provide insight into the operation of the Oxide deployment. These include telemetry on hardware and software components that can be used to understand the current state as well as to diagnose issues.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn organizations(&self) -> Organizations
pub fn organizations(&self) -> Organizations
Organizations represent a subset of users and projects in an Oxide deployment.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn projects(&self) -> Projects
pub fn projects(&self) -> Projects
Projects are a grouping of associated resources such as instances and disks within an organization for purposes of billing and access control.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn racks(&self) -> Racks
pub fn racks(&self) -> Racks
These operations pertain to hardware inventory and management. Racks are the unit of expansion of an Oxide deployment. Racks are in turn composed of sleds, switches, power supplies, and a cabled backplane.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn roles(&self) -> Roles
pub fn roles(&self) -> Roles
Roles are a component of Identity and Access Management (IAM) that allow a user or agent account access to additional permissions.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn routers(&self) -> Routers
pub fn routers(&self) -> Routers
Routers direct the flow of network traffic into, out of, and within a VPC via routes.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn routes(&self) -> Routes
pub fn routes(&self) -> Routes
Routes define router policy.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn sagas(&self) -> Sagas
pub fn sagas(&self) -> Sagas
Sagas are the abstraction used to represent multi-step operations within the Oxide deployment. These operations can be used to query saga status and report errors.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn silos(&self) -> Silos
pub fn silos(&self) -> Silos
Silos represent a logical partition of users and resources.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn sleds(&self) -> Sleds
pub fn sleds(&self) -> Sleds
This tag should be moved into hardware.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn snapshots(&self) -> Snapshots
pub fn snapshots(&self) -> Snapshots
Snapshots of Virtual Disks at a particular point in time.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn sshkeys(&self) -> Sshkeys
pub fn sshkeys(&self) -> Sshkeys
Public SSH keys for an individual user.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn subnets(&self) -> Subnets
pub fn subnets(&self) -> Subnets
This tag should be moved into a generic network tag.
FROM: http://oxide.computer/docs/#xxx
sourcepub fn system(&self) -> System
pub fn system(&self) -> System
Internal system information.
FROM: http://oxide.computer/docs/#xxx
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more