pub async fn create_cost_metric(
pool: &Pool<MySql>,
resource_type_id: i32,
provider_id: Option<i64>,
region_id: Option<i64>,
app_id: Option<i64>,
worker_id: Option<i64>,
org_id: Option<i64>,
start_time: DateTime<Utc>,
end_time: DateTime<Utc>,
usage_quantity: f64,
unit_cost: f64,
currency: &str,
total_cost: f64,
discount_percentage: Option<f64>,
discount_reason: Option<&str>,
billing_period: Option<&str>,
) -> Result<CostMetric>
Expand description
Creates a new cost metric in the database.