Pod

Struct Pod 

Source
pub struct Pod {
Show 37 fields pub id: String, pub name: Option<String>, pub image: String, pub consumer_user_id: String, pub machine_id: String, pub desired_status: PodStatus, pub cost_per_hr: f64, pub adjusted_cost_per_hr: f64, pub gpu_count: Option<i32>, pub vcpu_count: f64, pub memory_in_gb: f64, pub container_disk_in_gb: i32, pub volume_in_gb: Option<i32>, pub volume_mount_path: Option<String>, pub volume_encrypted: bool, pub ports: Vec<String>, pub port_mappings: Option<PortMappings>, pub public_ip: Option<String>, pub env: EnvVars, pub docker_entrypoint: Option<Vec<String>>, pub docker_start_cmd: Option<Vec<String>>, pub interruptible: bool, pub locked: bool, pub gpu: Option<GpuInfo>, pub cpu_flavor_id: Option<String>, pub gpu_type_id: Option<String>, pub template_id: Option<String>, pub network_volume_id: Option<String>, pub container_registry_auth_id: Option<String>, pub endpoint_id: Option<String>, pub ai_api_id: Option<String>, pub sls_version: Option<i32>, pub last_started_at: Option<String>, pub last_status_change: Option<String>, pub machine: Option<Machine>, pub network_volume: Option<NetworkVolume>, pub savings_plans: Option<Vec<SavingsPlan>>,
}
Expand description

A Pod resource representing a containerized compute instance on RunPod.

Pods are the fundamental compute units in RunPod, providing either GPU or CPU-based computing resources. They can be configured with various specifications including compute type, memory, storage, networking, and environment settings.

§Examples

use runpod_sdk::model::Pod;

// Pod instances are typically obtained from API responses
// when listing, creating, or retrieving pods

Fields§

§id: String

A unique string identifying the Pod.

§name: Option<String>

A user-defined name for the Pod. The name does not need to be unique.

§image: String

The image tag for the container run on the Pod.

§consumer_user_id: String

A unique string identifying the RunPod user who rents the Pod.

§machine_id: String

A unique string identifying the host machine the Pod is running on.

§desired_status: PodStatus

The current expected status of the Pod.

§cost_per_hr: f64

The cost in RunPod credits per hour of running the Pod. Note that the actual cost may be lower if Savings Plans are applied.

§adjusted_cost_per_hr: f64

The effective cost in RunPod credits per hour of running the Pod, adjusted by active Savings Plans.

§gpu_count: Option<i32>

The number of GPUs attached to the Pod (if it’s a GPU Pod).

§vcpu_count: f64

The number of virtual CPUs attached to the Pod.

§memory_in_gb: f64

The amount of RAM, in gigabytes (GB), attached to the Pod.

§container_disk_in_gb: i32

The amount of disk space, in gigabytes (GB), allocated on the container disk. The data on the container disk is wiped when the Pod restarts.

§volume_in_gb: Option<i32>

The amount of disk space, in gigabytes (GB), allocated on the Pod volume. The data on the Pod volume is persisted across Pod restarts.

§volume_mount_path: Option<String>

The absolute path where the network volume is mounted in the filesystem.

§volume_encrypted: bool

Whether the local network volume of the Pod is encrypted. Can only be set when creating a Pod.

§ports: Vec<String>

A list of ports exposed on the Pod. Each port is formatted as [port number]/[protocol]. Protocol can be either http or tcp.

§port_mappings: Option<PortMappings>

A mapping of internal ports to public ports on the Pod. For example, {"22": 10341} means that port 22 on the Pod is mapped to port 10341 and is publicly accessible at [public ip]:10341.

§public_ip: Option<String>

The public IP address of the Pod. If the Pod is still initializing, this IP is not yet determined and will be empty.

§env: EnvVars

Environment variables for the Pod container.

§docker_entrypoint: Option<Vec<String>>

If specified, overrides the ENTRYPOINT for the Docker image run on the Pod. If empty, uses the ENTRYPOINT defined in the image.

§docker_start_cmd: Option<Vec<String>>

If specified, overrides the start CMD for the Docker image run on the Pod. If empty, uses the start CMD defined in the image.

§interruptible: bool

Describes how the Pod is rented. An interruptible Pod can be rented at a lower cost but can be stopped at any time to free up resources for another Pod. A reserved Pod is rented at a higher cost but runs until it exits or is manually stopped.

§locked: bool

Whether the Pod is locked. Locking a Pod disables stopping or resetting it.

§gpu: Option<GpuInfo>

GPU information if the Pod has GPUs attached.

§cpu_flavor_id: Option<String>

If the Pod is a CPU Pod, the unique string identifying the CPU flavor the Pod is running on.

§gpu_type_id: Option<String>

The GPU type ID if the Pod has GPUs attached.

§template_id: Option<String>

If the Pod is created with a template, the unique string identifying that template.

§network_volume_id: Option<String>

The unique string identifying the network volume attached to the Pod, if any.

§container_registry_auth_id: Option<String>

If the Pod is created with a container registry auth, the unique string identifying that container registry auth.

§endpoint_id: Option<String>

If the Pod is a Serverless worker, a unique string identifying the associated endpoint.

§ai_api_id: Option<String>

Synonym for endpoint_id (legacy name).

§sls_version: Option<i32>

If the Pod is a Serverless worker, the version of the associated endpoint.

§last_started_at: Option<String>

The UTC timestamp when the Pod was last started.

§last_status_change: Option<String>

A string describing the last lifecycle event on the Pod.

§machine: Option<Machine>

Information about the machine the Pod is running on.

§network_volume: Option<NetworkVolume>

If a network volume is attached to the Pod, information about the network volume.

§savings_plans: Option<Vec<SavingsPlan>>

The list of active Savings Plans applied to the Pod. If none are applied, the list is empty.

Trait Implementations§

Source§

impl Clone for Pod

Source§

fn clone(&self) -> Pod

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pod

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Pod

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Pod

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Pod

§

impl RefUnwindSafe for Pod

§

impl Send for Pod

§

impl Sync for Pod

§

impl Unpin for Pod

§

impl UnwindSafe for Pod

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,