#[non_exhaustive]pub struct QueryValueWidgetRequest {Show 16 fields
pub aggregator: Option<WidgetAggregator>,
pub apm_query: Option<LogQueryDefinition>,
pub audit_query: Option<LogQueryDefinition>,
pub conditional_formats: Option<Vec<WidgetConditionalFormat>>,
pub event_query: Option<LogQueryDefinition>,
pub formulas: Option<Vec<WidgetFormula>>,
pub log_query: Option<LogQueryDefinition>,
pub network_query: Option<LogQueryDefinition>,
pub process_query: Option<ProcessQueryDefinition>,
pub profile_metrics_query: Option<LogQueryDefinition>,
pub q: Option<String>,
pub queries: Option<Vec<FormulaAndFunctionQueryDefinition>>,
pub response_format: Option<FormulaAndFunctionResponseFormat>,
pub rum_query: Option<LogQueryDefinition>,
pub security_query: Option<LogQueryDefinition>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Updated query value widget.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.aggregator: Option<WidgetAggregator>
Aggregator used for the request.
apm_query: Option<LogQueryDefinition>
The log query.
audit_query: Option<LogQueryDefinition>
The log query.
conditional_formats: Option<Vec<WidgetConditionalFormat>>
List of conditional formats.
event_query: Option<LogQueryDefinition>
The log query.
formulas: Option<Vec<WidgetFormula>>
List of formulas that operate on queries.
log_query: Option<LogQueryDefinition>
The log query.
network_query: Option<LogQueryDefinition>
The log query.
process_query: Option<ProcessQueryDefinition>
The process query to use in the widget.
profile_metrics_query: Option<LogQueryDefinition>
The log query.
q: Option<String>
TODO.
queries: Option<Vec<FormulaAndFunctionQueryDefinition>>
List of queries that can be returned directly or used in formulas.
response_format: Option<FormulaAndFunctionResponseFormat>
Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets.
rum_query: Option<LogQueryDefinition>
The log query.
security_query: Option<LogQueryDefinition>
The log query.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl QueryValueWidgetRequest
impl QueryValueWidgetRequest
Sourcepub fn new() -> QueryValueWidgetRequest
pub fn new() -> QueryValueWidgetRequest
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 33)
22async fn main() {
23 let body =
24 Dashboard::new(
25 DashboardLayoutType::FREE,
26 "Example-Dashboard".to_string(),
27 vec![
28 Widget::new(
29 WidgetDefinition::QueryValueWidgetDefinition(
30 Box::new(
31 QueryValueWidgetDefinition::new(
32 vec![
33 QueryValueWidgetRequest::new()
34 .queries(
35 vec![
36 FormulaAndFunctionQueryDefinition
37 ::FormulaAndFunctionMetricQueryDefinition(
38 Box::new(
39 FormulaAndFunctionMetricQueryDefinition::new(
40 FormulaAndFunctionMetricDataSource::METRICS,
41 "query1".to_string(),
42 "avg:system.cpu.user{*}".to_string(),
43 ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44 ),
45 )
46 ],
47 )
48 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49 ],
50 QueryValueWidgetDefinitionType::QUERY_VALUE,
51 )
52 .autoscale(true)
53 .precision(2)
54 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55 .title("".to_string())
56 .title_align(WidgetTextAlign::LEFT)
57 .title_size("16".to_string()),
58 ),
59 ),
60 ).layout(WidgetLayout::new(15, 47, 0, 0))
61 ],
62 )
63 .description(Some("".to_string()))
64 .notify_list(Some(vec![]))
65 .template_variables(Some(vec![]));
66 let configuration = datadog::Configuration::new();
67 let api = DashboardsAPI::with_config(configuration);
68 let resp = api.create_dashboard(body).await;
69 if let Ok(value) = resp {
70 println!("{:#?}", value);
71 } else {
72 println!("{:#?}", resp.unwrap_err());
73 }
74}
More examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 34)
23async fn main() {
24 let body =
25 Dashboard::new(
26 DashboardLayoutType::ORDERED,
27 "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28 vec![
29 Widget::new(
30 WidgetDefinition::QueryValueWidgetDefinition(
31 Box::new(
32 QueryValueWidgetDefinition::new(
33 vec![
34 QueryValueWidgetRequest::new()
35 .formulas(vec![WidgetFormula::new("query1".to_string())])
36 .queries(
37 vec![
38 FormulaAndFunctionQueryDefinition
39 ::FormulaAndFunctionMetricQueryDefinition(
40 Box::new(
41 FormulaAndFunctionMetricQueryDefinition::new(
42 FormulaAndFunctionMetricDataSource::METRICS,
43 "query1".to_string(),
44 "p90:dist.dd.dogweb.latency{*}".to_string(),
45 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46 ),
47 )
48 ],
49 )
50 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51 ],
52 QueryValueWidgetDefinitionType::QUERY_VALUE,
53 )
54 .autoscale(true)
55 .precision(2)
56 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57 .title("".to_string())
58 .title_align(WidgetTextAlign::LEFT)
59 .title_size("16".to_string()),
60 ),
61 ),
62 ).layout(WidgetLayout::new(2, 2, 0, 0))
63 ],
64 );
65 let configuration = datadog::Configuration::new();
66 let api = DashboardsAPI::with_config(configuration);
67 let resp = api.create_dashboard(body).await;
68 if let Ok(value) = resp {
69 println!("{:#?}", value);
70 } else {
71 println!("{:#?}", resp.unwrap_err());
72 }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 37)
26async fn main() {
27 let body =
28 Dashboard::new(
29 DashboardLayoutType::ORDERED,
30 "Example-Dashboard with QVW Timeseries Background".to_string(),
31 vec![
32 Widget::new(
33 WidgetDefinition::QueryValueWidgetDefinition(
34 Box::new(
35 QueryValueWidgetDefinition::new(
36 vec![
37 QueryValueWidgetRequest::new()
38 .formulas(vec![WidgetFormula::new("query1".to_string())])
39 .queries(
40 vec![
41 FormulaAndFunctionQueryDefinition
42 ::FormulaAndFunctionMetricQueryDefinition(
43 Box::new(
44 FormulaAndFunctionMetricQueryDefinition::new(
45 FormulaAndFunctionMetricDataSource::METRICS,
46 "query1".to_string(),
47 "sum:my.cool.count.metric{*}".to_string(),
48 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49 ),
50 )
51 ],
52 )
53 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54 ],
55 QueryValueWidgetDefinitionType::QUERY_VALUE,
56 )
57 .autoscale(true)
58 .precision(2)
59 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60 .timeseries_background(
61 TimeseriesBackground::new(
62 TimeseriesBackgroundType::AREA,
63 ).yaxis(WidgetAxis::new().include_zero(true)),
64 )
65 .title("".to_string())
66 .title_align(WidgetTextAlign::LEFT)
67 .title_size("16".to_string()),
68 ),
69 ),
70 ).layout(WidgetLayout::new(2, 2, 0, 0))
71 ],
72 );
73 let configuration = datadog::Configuration::new();
74 let api = DashboardsAPI::with_config(configuration);
75 let resp = api.create_dashboard(body).await;
76 if let Ok(value) = resp {
77 println!("{:#?}", value);
78 } else {
79 println!("{:#?}", resp.unwrap_err());
80 }
81}
pub fn aggregator(self, value: WidgetAggregator) -> Self
pub fn apm_query(self, value: LogQueryDefinition) -> Self
pub fn audit_query(self, value: LogQueryDefinition) -> Self
pub fn conditional_formats(self, value: Vec<WidgetConditionalFormat>) -> Self
pub fn event_query(self, value: LogQueryDefinition) -> Self
Sourcepub fn formulas(self, value: Vec<WidgetFormula>) -> Self
pub fn formulas(self, value: Vec<WidgetFormula>) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 35)
23async fn main() {
24 let body =
25 Dashboard::new(
26 DashboardLayoutType::ORDERED,
27 "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28 vec![
29 Widget::new(
30 WidgetDefinition::QueryValueWidgetDefinition(
31 Box::new(
32 QueryValueWidgetDefinition::new(
33 vec![
34 QueryValueWidgetRequest::new()
35 .formulas(vec![WidgetFormula::new("query1".to_string())])
36 .queries(
37 vec![
38 FormulaAndFunctionQueryDefinition
39 ::FormulaAndFunctionMetricQueryDefinition(
40 Box::new(
41 FormulaAndFunctionMetricQueryDefinition::new(
42 FormulaAndFunctionMetricDataSource::METRICS,
43 "query1".to_string(),
44 "p90:dist.dd.dogweb.latency{*}".to_string(),
45 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46 ),
47 )
48 ],
49 )
50 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51 ],
52 QueryValueWidgetDefinitionType::QUERY_VALUE,
53 )
54 .autoscale(true)
55 .precision(2)
56 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57 .title("".to_string())
58 .title_align(WidgetTextAlign::LEFT)
59 .title_size("16".to_string()),
60 ),
61 ),
62 ).layout(WidgetLayout::new(2, 2, 0, 0))
63 ],
64 );
65 let configuration = datadog::Configuration::new();
66 let api = DashboardsAPI::with_config(configuration);
67 let resp = api.create_dashboard(body).await;
68 if let Ok(value) = resp {
69 println!("{:#?}", value);
70 } else {
71 println!("{:#?}", resp.unwrap_err());
72 }
73}
More examples
examples/v1_dashboards_CreateDashboard_765140092.rs (line 38)
26async fn main() {
27 let body =
28 Dashboard::new(
29 DashboardLayoutType::ORDERED,
30 "Example-Dashboard with QVW Timeseries Background".to_string(),
31 vec![
32 Widget::new(
33 WidgetDefinition::QueryValueWidgetDefinition(
34 Box::new(
35 QueryValueWidgetDefinition::new(
36 vec![
37 QueryValueWidgetRequest::new()
38 .formulas(vec![WidgetFormula::new("query1".to_string())])
39 .queries(
40 vec![
41 FormulaAndFunctionQueryDefinition
42 ::FormulaAndFunctionMetricQueryDefinition(
43 Box::new(
44 FormulaAndFunctionMetricQueryDefinition::new(
45 FormulaAndFunctionMetricDataSource::METRICS,
46 "query1".to_string(),
47 "sum:my.cool.count.metric{*}".to_string(),
48 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49 ),
50 )
51 ],
52 )
53 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54 ],
55 QueryValueWidgetDefinitionType::QUERY_VALUE,
56 )
57 .autoscale(true)
58 .precision(2)
59 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60 .timeseries_background(
61 TimeseriesBackground::new(
62 TimeseriesBackgroundType::AREA,
63 ).yaxis(WidgetAxis::new().include_zero(true)),
64 )
65 .title("".to_string())
66 .title_align(WidgetTextAlign::LEFT)
67 .title_size("16".to_string()),
68 ),
69 ),
70 ).layout(WidgetLayout::new(2, 2, 0, 0))
71 ],
72 );
73 let configuration = datadog::Configuration::new();
74 let api = DashboardsAPI::with_config(configuration);
75 let resp = api.create_dashboard(body).await;
76 if let Ok(value) = resp {
77 println!("{:#?}", value);
78 } else {
79 println!("{:#?}", resp.unwrap_err());
80 }
81}
pub fn log_query(self, value: LogQueryDefinition) -> Self
pub fn network_query(self, value: LogQueryDefinition) -> Self
pub fn process_query(self, value: ProcessQueryDefinition) -> Self
pub fn profile_metrics_query(self, value: LogQueryDefinition) -> Self
pub fn q(self, value: String) -> Self
Sourcepub fn queries(self, value: Vec<FormulaAndFunctionQueryDefinition>) -> Self
pub fn queries(self, value: Vec<FormulaAndFunctionQueryDefinition>) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (lines 34-47)
22async fn main() {
23 let body =
24 Dashboard::new(
25 DashboardLayoutType::FREE,
26 "Example-Dashboard".to_string(),
27 vec![
28 Widget::new(
29 WidgetDefinition::QueryValueWidgetDefinition(
30 Box::new(
31 QueryValueWidgetDefinition::new(
32 vec![
33 QueryValueWidgetRequest::new()
34 .queries(
35 vec![
36 FormulaAndFunctionQueryDefinition
37 ::FormulaAndFunctionMetricQueryDefinition(
38 Box::new(
39 FormulaAndFunctionMetricQueryDefinition::new(
40 FormulaAndFunctionMetricDataSource::METRICS,
41 "query1".to_string(),
42 "avg:system.cpu.user{*}".to_string(),
43 ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44 ),
45 )
46 ],
47 )
48 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49 ],
50 QueryValueWidgetDefinitionType::QUERY_VALUE,
51 )
52 .autoscale(true)
53 .precision(2)
54 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55 .title("".to_string())
56 .title_align(WidgetTextAlign::LEFT)
57 .title_size("16".to_string()),
58 ),
59 ),
60 ).layout(WidgetLayout::new(15, 47, 0, 0))
61 ],
62 )
63 .description(Some("".to_string()))
64 .notify_list(Some(vec![]))
65 .template_variables(Some(vec![]));
66 let configuration = datadog::Configuration::new();
67 let api = DashboardsAPI::with_config(configuration);
68 let resp = api.create_dashboard(body).await;
69 if let Ok(value) = resp {
70 println!("{:#?}", value);
71 } else {
72 println!("{:#?}", resp.unwrap_err());
73 }
74}
More examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (lines 36-49)
23async fn main() {
24 let body =
25 Dashboard::new(
26 DashboardLayoutType::ORDERED,
27 "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28 vec![
29 Widget::new(
30 WidgetDefinition::QueryValueWidgetDefinition(
31 Box::new(
32 QueryValueWidgetDefinition::new(
33 vec![
34 QueryValueWidgetRequest::new()
35 .formulas(vec![WidgetFormula::new("query1".to_string())])
36 .queries(
37 vec![
38 FormulaAndFunctionQueryDefinition
39 ::FormulaAndFunctionMetricQueryDefinition(
40 Box::new(
41 FormulaAndFunctionMetricQueryDefinition::new(
42 FormulaAndFunctionMetricDataSource::METRICS,
43 "query1".to_string(),
44 "p90:dist.dd.dogweb.latency{*}".to_string(),
45 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46 ),
47 )
48 ],
49 )
50 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51 ],
52 QueryValueWidgetDefinitionType::QUERY_VALUE,
53 )
54 .autoscale(true)
55 .precision(2)
56 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57 .title("".to_string())
58 .title_align(WidgetTextAlign::LEFT)
59 .title_size("16".to_string()),
60 ),
61 ),
62 ).layout(WidgetLayout::new(2, 2, 0, 0))
63 ],
64 );
65 let configuration = datadog::Configuration::new();
66 let api = DashboardsAPI::with_config(configuration);
67 let resp = api.create_dashboard(body).await;
68 if let Ok(value) = resp {
69 println!("{:#?}", value);
70 } else {
71 println!("{:#?}", resp.unwrap_err());
72 }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (lines 39-52)
26async fn main() {
27 let body =
28 Dashboard::new(
29 DashboardLayoutType::ORDERED,
30 "Example-Dashboard with QVW Timeseries Background".to_string(),
31 vec![
32 Widget::new(
33 WidgetDefinition::QueryValueWidgetDefinition(
34 Box::new(
35 QueryValueWidgetDefinition::new(
36 vec![
37 QueryValueWidgetRequest::new()
38 .formulas(vec![WidgetFormula::new("query1".to_string())])
39 .queries(
40 vec![
41 FormulaAndFunctionQueryDefinition
42 ::FormulaAndFunctionMetricQueryDefinition(
43 Box::new(
44 FormulaAndFunctionMetricQueryDefinition::new(
45 FormulaAndFunctionMetricDataSource::METRICS,
46 "query1".to_string(),
47 "sum:my.cool.count.metric{*}".to_string(),
48 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49 ),
50 )
51 ],
52 )
53 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54 ],
55 QueryValueWidgetDefinitionType::QUERY_VALUE,
56 )
57 .autoscale(true)
58 .precision(2)
59 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60 .timeseries_background(
61 TimeseriesBackground::new(
62 TimeseriesBackgroundType::AREA,
63 ).yaxis(WidgetAxis::new().include_zero(true)),
64 )
65 .title("".to_string())
66 .title_align(WidgetTextAlign::LEFT)
67 .title_size("16".to_string()),
68 ),
69 ),
70 ).layout(WidgetLayout::new(2, 2, 0, 0))
71 ],
72 );
73 let configuration = datadog::Configuration::new();
74 let api = DashboardsAPI::with_config(configuration);
75 let resp = api.create_dashboard(body).await;
76 if let Ok(value) = resp {
77 println!("{:#?}", value);
78 } else {
79 println!("{:#?}", resp.unwrap_err());
80 }
81}
Sourcepub fn response_format(self, value: FormulaAndFunctionResponseFormat) -> Self
pub fn response_format(self, value: FormulaAndFunctionResponseFormat) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 48)
22async fn main() {
23 let body =
24 Dashboard::new(
25 DashboardLayoutType::FREE,
26 "Example-Dashboard".to_string(),
27 vec![
28 Widget::new(
29 WidgetDefinition::QueryValueWidgetDefinition(
30 Box::new(
31 QueryValueWidgetDefinition::new(
32 vec![
33 QueryValueWidgetRequest::new()
34 .queries(
35 vec![
36 FormulaAndFunctionQueryDefinition
37 ::FormulaAndFunctionMetricQueryDefinition(
38 Box::new(
39 FormulaAndFunctionMetricQueryDefinition::new(
40 FormulaAndFunctionMetricDataSource::METRICS,
41 "query1".to_string(),
42 "avg:system.cpu.user{*}".to_string(),
43 ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44 ),
45 )
46 ],
47 )
48 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49 ],
50 QueryValueWidgetDefinitionType::QUERY_VALUE,
51 )
52 .autoscale(true)
53 .precision(2)
54 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55 .title("".to_string())
56 .title_align(WidgetTextAlign::LEFT)
57 .title_size("16".to_string()),
58 ),
59 ),
60 ).layout(WidgetLayout::new(15, 47, 0, 0))
61 ],
62 )
63 .description(Some("".to_string()))
64 .notify_list(Some(vec![]))
65 .template_variables(Some(vec![]));
66 let configuration = datadog::Configuration::new();
67 let api = DashboardsAPI::with_config(configuration);
68 let resp = api.create_dashboard(body).await;
69 if let Ok(value) = resp {
70 println!("{:#?}", value);
71 } else {
72 println!("{:#?}", resp.unwrap_err());
73 }
74}
More examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 50)
23async fn main() {
24 let body =
25 Dashboard::new(
26 DashboardLayoutType::ORDERED,
27 "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28 vec![
29 Widget::new(
30 WidgetDefinition::QueryValueWidgetDefinition(
31 Box::new(
32 QueryValueWidgetDefinition::new(
33 vec![
34 QueryValueWidgetRequest::new()
35 .formulas(vec![WidgetFormula::new("query1".to_string())])
36 .queries(
37 vec![
38 FormulaAndFunctionQueryDefinition
39 ::FormulaAndFunctionMetricQueryDefinition(
40 Box::new(
41 FormulaAndFunctionMetricQueryDefinition::new(
42 FormulaAndFunctionMetricDataSource::METRICS,
43 "query1".to_string(),
44 "p90:dist.dd.dogweb.latency{*}".to_string(),
45 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46 ),
47 )
48 ],
49 )
50 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51 ],
52 QueryValueWidgetDefinitionType::QUERY_VALUE,
53 )
54 .autoscale(true)
55 .precision(2)
56 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57 .title("".to_string())
58 .title_align(WidgetTextAlign::LEFT)
59 .title_size("16".to_string()),
60 ),
61 ),
62 ).layout(WidgetLayout::new(2, 2, 0, 0))
63 ],
64 );
65 let configuration = datadog::Configuration::new();
66 let api = DashboardsAPI::with_config(configuration);
67 let resp = api.create_dashboard(body).await;
68 if let Ok(value) = resp {
69 println!("{:#?}", value);
70 } else {
71 println!("{:#?}", resp.unwrap_err());
72 }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 53)
26async fn main() {
27 let body =
28 Dashboard::new(
29 DashboardLayoutType::ORDERED,
30 "Example-Dashboard with QVW Timeseries Background".to_string(),
31 vec![
32 Widget::new(
33 WidgetDefinition::QueryValueWidgetDefinition(
34 Box::new(
35 QueryValueWidgetDefinition::new(
36 vec![
37 QueryValueWidgetRequest::new()
38 .formulas(vec![WidgetFormula::new("query1".to_string())])
39 .queries(
40 vec![
41 FormulaAndFunctionQueryDefinition
42 ::FormulaAndFunctionMetricQueryDefinition(
43 Box::new(
44 FormulaAndFunctionMetricQueryDefinition::new(
45 FormulaAndFunctionMetricDataSource::METRICS,
46 "query1".to_string(),
47 "sum:my.cool.count.metric{*}".to_string(),
48 ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49 ),
50 )
51 ],
52 )
53 .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54 ],
55 QueryValueWidgetDefinitionType::QUERY_VALUE,
56 )
57 .autoscale(true)
58 .precision(2)
59 .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60 .timeseries_background(
61 TimeseriesBackground::new(
62 TimeseriesBackgroundType::AREA,
63 ).yaxis(WidgetAxis::new().include_zero(true)),
64 )
65 .title("".to_string())
66 .title_align(WidgetTextAlign::LEFT)
67 .title_size("16".to_string()),
68 ),
69 ),
70 ).layout(WidgetLayout::new(2, 2, 0, 0))
71 ],
72 );
73 let configuration = datadog::Configuration::new();
74 let api = DashboardsAPI::with_config(configuration);
75 let resp = api.create_dashboard(body).await;
76 if let Ok(value) = resp {
77 println!("{:#?}", value);
78 } else {
79 println!("{:#?}", resp.unwrap_err());
80 }
81}
pub fn rum_query(self, value: LogQueryDefinition) -> Self
pub fn security_query(self, value: LogQueryDefinition) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for QueryValueWidgetRequest
impl Clone for QueryValueWidgetRequest
Source§fn clone(&self) -> QueryValueWidgetRequest
fn clone(&self) -> QueryValueWidgetRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for QueryValueWidgetRequest
impl Debug for QueryValueWidgetRequest
Source§impl Default for QueryValueWidgetRequest
impl Default for QueryValueWidgetRequest
Source§impl<'de> Deserialize<'de> for QueryValueWidgetRequest
impl<'de> Deserialize<'de> for QueryValueWidgetRequest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for QueryValueWidgetRequest
impl PartialEq for QueryValueWidgetRequest
Source§impl Serialize for QueryValueWidgetRequest
impl Serialize for QueryValueWidgetRequest
impl StructuralPartialEq for QueryValueWidgetRequest
Auto Trait Implementations§
impl Freeze for QueryValueWidgetRequest
impl RefUnwindSafe for QueryValueWidgetRequest
impl Send for QueryValueWidgetRequest
impl Sync for QueryValueWidgetRequest
impl Unpin for QueryValueWidgetRequest
impl UnwindSafe for QueryValueWidgetRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more