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 podsFields§
§id: StringA unique string identifying the Pod.
name: Option<String>A user-defined name for the Pod. The name does not need to be unique.
image: StringThe image tag for the container run on the Pod.
consumer_user_id: StringA unique string identifying the RunPod user who rents the Pod.
machine_id: StringA unique string identifying the host machine the Pod is running on.
desired_status: PodStatusThe current expected status of the Pod.
cost_per_hr: f64The 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: f64The 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: f64The number of virtual CPUs attached to the Pod.
memory_in_gb: f64The amount of RAM, in gigabytes (GB), attached to the Pod.
container_disk_in_gb: i32The 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: boolWhether 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: EnvVarsEnvironment 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: boolDescribes 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: boolWhether 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.