pub struct EndpointBillingQuery {
pub bucket_size: Option<BucketSize>,
pub data_center_id: Option<Vec<String>>,
pub endpoint_id: Option<String>,
pub end_time: Option<String>,
pub gpu_type_id: Option<Vec<GpuTypeId>>,
pub grouping: Option<BillingGrouping>,
pub image_name: Option<String>,
pub start_time: Option<String>,
pub template_id: Option<String>,
}Expand description
Query parameters for retrieving Serverless endpoint billing history.
Provides comprehensive filtering options for Serverless endpoint billing data, including data center filtering, image-based filtering, and template-based filtering.
§Default Behavior
When fields are omitted:
bucket_size: Defaults toBucketSize::Daygrouping: Defaults toBillingGrouping::EndpointIddata_center_id: Includes all available data centers- Time range: Returns recent billing data (API-defined default period)
§Examples
use runpod_sdk::model::{EndpointBillingQuery, BucketSize, BillingGrouping};
// Query billing for endpoints in specific data centers
let query = EndpointBillingQuery {
bucket_size: Some(BucketSize::Week),
grouping: Some(BillingGrouping::GpuTypeId),
data_center_id: Some(vec!["US-TX-1".to_string(), "US-CA-2".to_string()]),
..Default::default()
};Fields§
§bucket_size: Option<BucketSize>The length of each billing time bucket. Determines how billing data is aggregated over time.
data_center_id: Option<Vec<String>>Filter to endpoints located in any of the specified RunPod data centers. Data center IDs can be found in the Pod listing response. If omitted, includes all available data centers.
endpoint_id: Option<String>Filter to a specific endpoint by its unique identifier. When specified, only billing data for this endpoint is returned.
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<Vec<GpuTypeId>>Filter to endpoints with any of the specified GPU types attached. Useful for analyzing costs across different GPU configurations.
grouping: Option<BillingGrouping>Group the billing records by the specified field. Controls how individual billing records are organized and aggregated.
image_name: Option<String>Filter to endpoints created with the specified Docker image. Useful for tracking costs of specific application deployments. Example: “runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04”
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).
template_id: Option<String>Filter to endpoints created from the specified template. Useful for tracking costs of endpoints deployed from specific templates.
Trait Implementations§
Source§impl Clone for EndpointBillingQuery
impl Clone for EndpointBillingQuery
Source§fn clone(&self) -> EndpointBillingQuery
fn clone(&self) -> EndpointBillingQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more