#[non_exhaustive]pub struct GetHistoricalCostByOrgOptionalParams {
pub view: Option<String>,
pub end_month: Option<DateTime<Utc>>,
pub include_connected_accounts: Option<bool>,
}
Expand description
GetHistoricalCostByOrgOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_historical_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
.
end_month: Option<DateTime<Utc>>
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]
for cost ending this month.
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 GetHistoricalCostByOrgOptionalParams
impl GetHistoricalCostByOrgOptionalParams
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_historical_cost_by_org(
13 DateTime::parse_from_rfc3339("2021-09-11T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetHistoricalCostByOrgOptionalParams::default().view("sub-org".to_string()),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
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 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 GetHistoricalCostByOrgOptionalParams
impl Clone for GetHistoricalCostByOrgOptionalParams
Source§fn clone(&self) -> GetHistoricalCostByOrgOptionalParams
fn clone(&self) -> GetHistoricalCostByOrgOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more