PodCreateInput

Struct PodCreateInput 

Source
pub struct PodCreateInput {
Show 33 fields pub allowed_cuda_versions: Option<Vec<CudaVersion>>, pub cloud_type: Option<CloudType>, pub compute_type: Option<ComputeType>, pub container_disk_in_gb: Option<i32>, pub container_registry_auth_id: Option<String>, pub country_codes: Option<Vec<String>>, pub cpu_flavor_ids: Option<Vec<CpuFlavorId>>, pub cpu_flavor_priority: Option<String>, pub data_center_ids: Option<Vec<DataCenterId>>, pub data_center_priority: Option<String>, pub docker_entrypoint: Option<Vec<String>>, pub docker_start_cmd: Option<Vec<String>>, pub env: Option<EnvVars>, pub global_networking: Option<bool>, pub gpu_count: Option<i32>, pub gpu_type_ids: Option<Vec<GpuTypeId>>, pub gpu_type_priority: Option<String>, pub image_name: Option<String>, pub interruptible: Option<bool>, pub locked: Option<bool>, pub min_disk_bandwidth_m_bps: Option<f64>, pub min_download_mbps: Option<f64>, pub min_ram_per_gpu: Option<i32>, pub min_upload_mbps: Option<f64>, pub min_vcpu_per_gpu: Option<i32>, pub name: Option<String>, pub network_volume_id: Option<String>, pub ports: Option<Vec<String>>, pub support_public_ip: Option<bool>, pub template_id: Option<String>, pub vcpu_count: Option<i32>, pub volume_in_gb: Option<i32>, pub volume_mount_path: Option<String>,
}
Expand description

Input parameters for creating a new Pod.

This struct contains all the configuration options available when creating a Pod, including compute specifications, networking, storage, and deployment preferences. Most fields are optional and will use RunPod defaults if not specified.

§Examples

use runpod_sdk::model::{PodCreateInput, ComputeType, CloudType};

let create_input = PodCreateInput {
    name: Some("my-pod".to_string()),
    image_name: Some("runpod/pytorch:latest".to_string()),
    compute_type: Some(ComputeType::Gpu),
    cloud_type: Some(CloudType::Secure),
    ..Default::default()
};

Fields§

§allowed_cuda_versions: Option<Vec<CudaVersion>>

If the created Pod is a GPU Pod, a list of acceptable CUDA versions. If not set, any CUDA version is acceptable.

§cloud_type: Option<CloudType>

Set to SECURE to create the Pod in Secure Cloud. Set to COMMUNITY to create the Pod in Community Cloud.

§compute_type: Option<ComputeType>

Set to GPU to create a GPU Pod. Set to CPU to create a CPU Pod. If set to CPU, the Pod will not have a GPU attached and GPU-related properties will be ignored.

§container_disk_in_gb: Option<i32>

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

§container_registry_auth_id: Option<String>

Registry credentials ID for private container registries.

§country_codes: Option<Vec<String>>

A list of country codes where the created Pod can be located. If not set, the Pod can be located in any country.

§cpu_flavor_ids: Option<Vec<CpuFlavorId>>

If the created Pod is a CPU Pod, a list of RunPod CPU flavors which can be attached to the Pod. The order determines the rental priority.

§cpu_flavor_priority: Option<String>

If the created Pod is a CPU Pod, set to availability to respond to current CPU flavor availability. Set to custom to always try to rent CPU flavors in the order specified in cpu_flavor_ids.

§data_center_ids: Option<Vec<DataCenterId>>

A list of RunPod data center IDs where the created Pod can be located.

§data_center_priority: Option<String>

Set to availability to respond to current machine availability. Set to custom to always try to rent machines from data centers in the order specified in data_center_ids.

§docker_entrypoint: Option<Vec<String>>

If specified, overrides the ENTRYPOINT for the Docker image. 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. If empty, uses the start CMD defined in the image.

§env: Option<EnvVars>

Environment variables for the Pod container.

§global_networking: Option<bool>

Set to true to enable global networking for the created Pod. Currently only available for On-Demand GPU Pods on some Secure Cloud data centers.

§gpu_count: Option<i32>

If the created Pod is a GPU Pod, the number of GPUs attached to the Pod.

§gpu_type_ids: Option<Vec<GpuTypeId>>

If the created Pod is a GPU Pod, a list of RunPod GPU types which can be attached to the Pod. The order determines the rental priority.

§gpu_type_priority: Option<String>

If the created Pod is a GPU Pod, set to availability to respond to current GPU type availability. Set to custom to always try to rent GPU types in the order specified in gpu_type_ids.

§image_name: Option<String>

The image tag for the container run on the created Pod.

§interruptible: Option<bool>

Set to true to create an interruptible or spot Pod. An interruptible Pod can be rented at a lower cost but can be stopped at any time to free up resources for another Pod.

§locked: Option<bool>

Set to true to lock the Pod. Locking a Pod disables stopping or resetting it.

§min_disk_bandwidth_m_bps: Option<f64>

The minimum disk bandwidth, in megabytes per second (MBps), for the created Pod.

§min_download_mbps: Option<f64>

The minimum download speed, in megabits per second (Mbps), for the created Pod.

§min_ram_per_gpu: Option<i32>

If the created Pod is a GPU Pod, the minimum amount of RAM, in gigabytes (GB), allocated to the Pod for each GPU attached.

§min_upload_mbps: Option<f64>

The minimum upload speed, in megabits per second (Mbps), for the created Pod.

§min_vcpu_per_gpu: Option<i32>

If the created Pod is a GPU Pod, the minimum number of virtual CPUs allocated to the Pod for each GPU attached.

§name: Option<String>

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

§network_volume_id: Option<String>

The unique string identifying the network volume to attach to the created Pod. If attached, a network volume replaces the Pod network volume.

§ports: Option<Vec<String>>

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

§support_public_ip: Option<bool>

If the created Pod is on Community Cloud, set to true if you need the Pod to expose a public IP address. On Secure Cloud, the Pod will always have a public IP address.

§template_id: Option<String>

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

§vcpu_count: Option<i32>

If the created Pod is a CPU Pod, the number of vCPUs allocated to the Pod.

§volume_in_gb: Option<i32>

The amount of disk space, in gigabytes (GB), to allocate 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 will be mounted in the filesystem.

Trait Implementations§

Source§

impl Clone for PodCreateInput

Source§

fn clone(&self) -> PodCreateInput

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 PodCreateInput

Source§

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

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

impl Default for PodCreateInput

Source§

fn default() -> PodCreateInput

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PodCreateInput

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 PodCreateInput

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§

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>,