#[non_exhaustive]pub struct GetMonthlyCostAttributionOptionalParams {
pub end_month: Option<DateTime<Utc>>,
pub sort_direction: Option<SortDirection>,
pub sort_name: Option<String>,
pub tag_breakdown_keys: Option<String>,
pub next_record_id: Option<String>,
pub include_descendants: Option<bool>,
}
Expand description
GetMonthlyCostAttributionOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_monthly_cost_attribution
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.end_month: Option<DateTime<Utc>>
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]
for cost ending this month.
sort_direction: Option<SortDirection>
The direction to sort by: [desc, asc]
.
sort_name: Option<String>
The billing dimension to sort by. Always sorted by total cost. Example: infra_host
.
tag_breakdown_keys: Option<String>
Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags.
To see which tags are available, look for the value of tag_config_source
in the API response.
next_record_id: Option<String>
List following results with a next_record_id provided in the previous query.
include_descendants: Option<bool>
Include child org cost in the response. Defaults to true
.
Implementations§
Source§impl GetMonthlyCostAttributionOptionalParams
impl GetMonthlyCostAttributionOptionalParams
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.
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_monthly_cost_attribution(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 "infra_host_total_cost".to_string(),
17 GetMonthlyCostAttributionOptionalParams::default().end_month(
18 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
19 .expect("Failed to parse datetime")
20 .with_timezone(&Utc),
21 ),
22 )
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
Sourcepub fn sort_direction(self, value: SortDirection) -> Self
pub fn sort_direction(self, value: SortDirection) -> Self
The direction to sort by: [desc, asc]
.
Sourcepub fn sort_name(self, value: String) -> Self
pub fn sort_name(self, value: String) -> Self
The billing dimension to sort by. Always sorted by total cost. Example: infra_host
.
Sourcepub fn tag_breakdown_keys(self, value: String) -> Self
pub fn tag_breakdown_keys(self, value: String) -> Self
Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags.
To see which tags are available, look for the value of tag_config_source
in the API response.
Sourcepub fn next_record_id(self, value: String) -> Self
pub fn next_record_id(self, value: String) -> Self
List following results with a next_record_id provided in the previous query.
Sourcepub fn include_descendants(self, value: bool) -> Self
pub fn include_descendants(self, value: bool) -> Self
Include child org cost in the response. Defaults to true
.
Trait Implementations§
Source§impl Clone for GetMonthlyCostAttributionOptionalParams
impl Clone for GetMonthlyCostAttributionOptionalParams
Source§fn clone(&self) -> GetMonthlyCostAttributionOptionalParams
fn clone(&self) -> GetMonthlyCostAttributionOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more