pub struct NetworkVolumeCreateInput {
pub name: String,
pub size: u32,
pub data_center_id: String,
}Expand description
Input parameters for creating a new network volume.
This struct contains all the required configuration options for creating a network volume. All fields are mandatory as they define the fundamental characteristics of the volume that cannot be changed after creation (except size, which can only be increased).
§Validation Requirements
- name: Must be 1-255 characters long. Can contain letters, numbers, spaces, hyphens, and underscores
- size: Must be between 1 and 4,000 GB. Choose based on your storage needs and budget
- data_center_id: Must be a valid RunPod data center identifier (format: XX-XX-N)
§Examples
use runpod_sdk::model::NetworkVolumeCreateInput;
// Create a small development volume
let dev_volume = NetworkVolumeCreateInput {
name: "dev-workspace".to_string(),
size: 10,
data_center_id: "US-CA-1".to_string(),
};
// Create a large production dataset volume
let prod_volume = NetworkVolumeCreateInput {
name: "production-ml-datasets".to_string(),
size: 1000,
data_center_id: "EU-RO-1".to_string(),
};Fields§
§name: StringA user-defined name for the network volume.
The name is used for identification and organization purposes. It does not need to be unique across your account, allowing you to use descriptive names that match your workflow or project structure.
Constraints:
- Length: 1-255 characters
- Allowed characters: letters, numbers, spaces, hyphens, underscores
- Case-sensitive
Examples: “ml-training-data”, “user uploads”, “backup_volume_2024”
size: u32The amount of disk space, in gigabytes (GB), to allocate to the network volume.
This determines the storage capacity of the volume and directly affects billing. Choose a size that accounts for current needs plus reasonable growth, as expanding volumes requires an update operation and may take time to complete.
Constraints:
- Minimum: 1 GB
- Maximum: 4,000 GB (4 TB)
- Billing: Charged per GB-hour for the full allocated capacity
Performance notes:
- Larger volumes may have better IOPS performance
- Size can be increased later but never decreased
Examples: 10 (small dev), 100 (medium project), 1000 (large dataset)
data_center_id: StringThe RunPod data center ID where the network volume will be created.
Network volumes are bound to specific data centers and can only be attached to Pods running in the same data center. Choose based on:
- Geographic proximity to your users
- Data sovereignty requirements
- Pricing differences between regions
- Availability of required GPU/CPU types
Format: Two-letter country code, two-letter region code, and number (XX-XX-N)
Common data centers:
US-CA-1: California, USA (West Coast)US-TX-1: Texas, USA (Central)EU-RO-1: Romania, EuropeEU-SE-1: Sweden, Europe
Note: Available data centers and their identifiers can be retrieved from the data centers API endpoint.
Trait Implementations§
Source§impl Clone for NetworkVolumeCreateInput
impl Clone for NetworkVolumeCreateInput
Source§fn clone(&self) -> NetworkVolumeCreateInput
fn clone(&self) -> NetworkVolumeCreateInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more