pub struct PodBillingQuery {
pub bucket_size: Option<BucketSize>,
pub end_time: Option<String>,
pub gpu_type_id: Option<GpuTypeId>,
pub grouping: Option<BillingGrouping>,
pub pod_id: Option<String>,
pub start_time: Option<String>,
}Expand description
Query parameters for retrieving Pod billing history.
Use this struct to customize Pod billing queries with filtering and grouping options. All fields are optional, allowing for flexible query construction.
§Default Behavior
When fields are omitted:
bucket_size: Defaults toBucketSize::Daygrouping: Defaults toBillingGrouping::GpuTypeId- Time range: Returns recent billing data (API-defined default period)
§Examples
use runpod_sdk::model::{PodBillingQuery, BucketSize};
// Query for a specific Pod's hourly billing
let query = PodBillingQuery {
bucket_size: Some(BucketSize::Hour),
pod_id: Some("xedezhzb9la3ye".to_string()),
start_time: Some("2023-01-01T00:00:00Z".to_string()),
end_time: Some("2023-01-02T00:00:00Z".to_string()),
..Default::default()
};Fields§
§bucket_size: Option<BucketSize>The length of each billing time bucket. Determines how billing data is aggregated over time.
end_time: Option<String>The end date of the billing period to retrieve. Must be in ISO 8601 format (e.g., “2023-01-31T23:59:59Z”). If omitted, uses API default (typically current time).
gpu_type_id: Option<GpuTypeId>Filter to Pods with the specified GPU type attached. Only billing records for Pods using this GPU type will be returned.
grouping: Option<BillingGrouping>Group the billing records by the specified field. Controls how individual billing records are organized and aggregated.
pod_id: Option<String>Filter to a specific Pod by its unique identifier. When specified, only billing data for this Pod is returned.
start_time: Option<String>The start date of the billing period to retrieve. Must be in ISO 8601 format (e.g., “2023-01-01T00:00:00Z”). If omitted, uses API default (typically 30 days ago).
Trait Implementations§
Source§impl Clone for PodBillingQuery
impl Clone for PodBillingQuery
Source§fn clone(&self) -> PodBillingQuery
fn clone(&self) -> PodBillingQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more