#[non_exhaustive]pub struct GetEstimatedCostByOrgOptionalParams {
pub view: Option<String>,
pub start_month: Option<DateTime<Utc>>,
pub end_month: Option<DateTime<Utc>>,
pub start_date: Option<DateTime<Utc>>,
pub end_date: Option<DateTime<Utc>>,
pub include_connected_accounts: Option<bool>,
}Expand description
GetEstimatedCostByOrgOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_estimated_cost_by_org
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.view: Option<String>String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org. Defaults to summary.
start_month: Option<DateTime<Utc>>Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an end_month to view month-over-month cost.
end_month: Option<DateTime<Utc>>Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month.
start_date: Option<DateTime<Utc>>Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an end_date to view day-over-day cumulative cost.
end_date: Option<DateTime<Utc>>Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost ending this day.
include_connected_accounts: Option<bool>Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false.
Implementations§
Source§impl GetEstimatedCostByOrgOptionalParams
impl GetEstimatedCostByOrgOptionalParams
Sourcepub fn view(self, value: String) -> Self
pub fn view(self, value: String) -> Self
String to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org. Defaults to summary.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_estimated_cost_by_org(
13 GetEstimatedCostByOrgOptionalParams::default()
14 .view("sub-org".to_string())
15 .start_month(
16 DateTime::parse_from_rfc3339("2021-11-11T11:11:11+00:00")
17 .expect("Failed to parse datetime")
18 .with_timezone(&Utc),
19 ),
20 )
21 .await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}Sourcepub fn start_month(self, value: DateTime<Utc>) -> Self
pub fn start_month(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an end_month to view month-over-month cost.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_estimated_cost_by_org(
13 GetEstimatedCostByOrgOptionalParams::default()
14 .view("sub-org".to_string())
15 .start_month(
16 DateTime::parse_from_rfc3339("2021-11-11T11:11:11+00:00")
17 .expect("Failed to parse datetime")
18 .with_timezone(&Utc),
19 ),
20 )
21 .await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}Sourcepub fn end_month(self, value: DateTime<Utc>) -> Self
pub fn end_month(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month.
Sourcepub fn start_date(self, value: DateTime<Utc>) -> Self
pub fn start_date(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an end_date to view day-over-day cumulative cost.
Sourcepub fn end_date(self, value: DateTime<Utc>) -> Self
pub fn end_date(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost ending this day.
Sourcepub fn include_connected_accounts(self, value: bool) -> Self
pub fn include_connected_accounts(self, value: bool) -> Self
Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false.
Trait Implementations§
Source§impl Clone for GetEstimatedCostByOrgOptionalParams
impl Clone for GetEstimatedCostByOrgOptionalParams
Source§fn clone(&self) -> GetEstimatedCostByOrgOptionalParams
fn clone(&self) -> GetEstimatedCostByOrgOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more