#[non_exhaustive]pub struct GetUsageTopAvgMetricsOptionalParams {
pub month: Option<DateTime<Utc>>,
pub day: Option<DateTime<Utc>>,
pub names: Option<Vec<String>>,
pub limit: Option<i32>,
pub next_record_id: Option<String>,
}
Expand description
GetUsageTopAvgMetricsOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_usage_top_avg_metrics
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.month: Option<DateTime<Utc>>
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
day: Option<DateTime<Utc>>
Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
names: Option<Vec<String>>
Comma-separated list of metric names.
limit: Option<i32>
Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
next_record_id: Option<String>
List following results with a next_record_id provided in the previous query.
Implementations§
Source§impl GetUsageTopAvgMetricsOptionalParams
impl GetUsageTopAvgMetricsOptionalParams
Sourcepub fn month(self, value: DateTime<Utc>) -> Self
pub fn month(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
Sourcepub fn day(self, value: DateTime<Utc>) -> Self
pub fn day(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
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_usage_top_avg_metrics(
13 GetUsageTopAvgMetricsOptionalParams::default().day(
14 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
15 .expect("Failed to parse datetime")
16 .with_timezone(&Utc),
17 ),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
Sourcepub fn limit(self, value: i32) -> Self
pub fn limit(self, value: i32) -> Self
Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
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.
Trait Implementations§
Source§impl Clone for GetUsageTopAvgMetricsOptionalParams
impl Clone for GetUsageTopAvgMetricsOptionalParams
Source§fn clone(&self) -> GetUsageTopAvgMetricsOptionalParams
fn clone(&self) -> GetUsageTopAvgMetricsOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more