#[non_exhaustive]pub struct HostMapRequest {
pub apm_query: Option<LogQueryDefinition>,
pub event_query: Option<LogQueryDefinition>,
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 rum_query: Option<LogQueryDefinition>,
pub security_query: Option<LogQueryDefinition>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Updated host map.
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.apm_query: Option<LogQueryDefinition>
The log query.
event_query: Option<LogQueryDefinition>
The log query.
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>
Query definition.
rum_query: Option<LogQueryDefinition>
The log query.
security_query: Option<LogQueryDefinition>
The log query.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl HostMapRequest
impl HostMapRequest
Sourcepub fn new() -> HostMapRequest
pub fn new() -> HostMapRequest
Examples found in repository?
examples/v1_dashboards_CreateDashboard_858397694.rs (line 23)
16async fn main() {
17 let body = Dashboard::new(
18 DashboardLayoutType::ORDERED,
19 "".to_string(),
20 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
21 Box::new(HostMapWidgetDefinition::new(
22 HostMapWidgetDefinitionRequests::new()
23 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
24 HostMapWidgetDefinitionType::HOSTMAP,
25 )),
26 ))],
27 )
28 .description(None)
29 .notify_list(Some(vec![]))
30 .reflow_type(DashboardReflowType::AUTO)
31 .restricted_roles(vec![])
32 .template_variables(Some(vec![DashboardTemplateVariable::new(
33 "host1".to_string(),
34 )
35 .available_values(Some(vec![
36 "my-host".to_string(),
37 "host1".to_string(),
38 "host2".to_string(),
39 ]))
40 .defaults(vec!["my-host".to_string()])
41 .prefix(Some("host".to_string()))]));
42 let configuration = datadog::Configuration::new();
43 let api = DashboardsAPI::with_config(configuration);
44 let resp = api.create_dashboard(body).await;
45 if let Ok(value) = resp {
46 println!("{:#?}", value);
47 } else {
48 println!("{:#?}", resp.unwrap_err());
49 }
50}
More examples
examples/v1_dashboards_CreateDashboard_1751391372.rs (line 23)
16async fn main() {
17 let body = Dashboard::new(
18 DashboardLayoutType::ORDERED,
19 "".to_string(),
20 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
21 Box::new(HostMapWidgetDefinition::new(
22 HostMapWidgetDefinitionRequests::new()
23 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
24 HostMapWidgetDefinitionType::HOSTMAP,
25 )),
26 ))],
27 )
28 .description(None)
29 .notify_list(Some(vec![]))
30 .reflow_type(DashboardReflowType::AUTO)
31 .restricted_roles(vec![])
32 .template_variables(Some(vec![DashboardTemplateVariable::new(
33 "group_by_var".to_string(),
34 )
35 .available_values(Some(vec![
36 "service".to_string(),
37 "datacenter".to_string(),
38 "env".to_string(),
39 ]))
40 .defaults(vec!["service".to_string(), "datacenter".to_string()])
41 .type_(Some("group".to_string()))]));
42 let configuration = datadog::Configuration::new();
43 let api = DashboardsAPI::with_config(configuration);
44 let resp = api.create_dashboard(body).await;
45 if let Ok(value) = resp {
46 println!("{:#?}", value);
47 } else {
48 println!("{:#?}", resp.unwrap_err());
49 }
50}
examples/v1_dashboards_CreateDashboard_1200099236.rs (line 26)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::HostMapWidgetDefinition(Box::new(
24 HostMapWidgetDefinition::new(
25 HostMapWidgetDefinitionRequests::new().fill(
26 HostMapRequest::new().q("avg:system.cpu.user{*} by {host}".to_string()),
27 ),
28 HostMapWidgetDefinitionType::HOSTMAP,
29 )
30 .no_group_hosts(true)
31 .no_metric_hosts(true)
32 .node_type(WidgetNodeType::HOST)
33 .style(
34 HostMapWidgetDefinitionStyle::new()
35 .palette("green_to_orange".to_string())
36 .palette_flip(false),
37 )
38 .title("".to_string())
39 .title_align(WidgetTextAlign::LEFT)
40 .title_size("16".to_string()),
41 )))
42 .layout(WidgetLayout::new(22, 47, 0, 0)),
43 ],
44 )
45 .description(None)
46 .notify_list(Some(vec![]))
47 .template_variables(Some(vec![]));
48 let configuration = datadog::Configuration::new();
49 let api = DashboardsAPI::with_config(configuration);
50 let resp = api.create_dashboard(body).await;
51 if let Ok(value) = resp {
52 println!("{:#?}", value);
53 } else {
54 println!("{:#?}", resp.unwrap_err());
55 }
56}
examples/v1_dashboards_CreateDashboard_2850365602.rs (line 26)
19async fn main() {
20 let body = Dashboard::new(
21 DashboardLayoutType::ORDERED,
22 "".to_string(),
23 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
24 Box::new(HostMapWidgetDefinition::new(
25 HostMapWidgetDefinitionRequests::new()
26 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
27 HostMapWidgetDefinitionType::HOSTMAP,
28 )),
29 ))],
30 )
31 .description(None)
32 .notify_list(Some(vec![]))
33 .reflow_type(DashboardReflowType::AUTO)
34 .restricted_roles(vec![])
35 .template_variable_presets(Some(vec![DashboardTemplateVariablePreset::new()
36 .name("my saved view".to_string())
37 .template_variables(vec![DashboardTemplateVariablePresetValue::new()
38 .name("datacenter".to_string())
39 .values(vec!["*".to_string(), "my-host".to_string()])])]))
40 .template_variables(Some(vec![DashboardTemplateVariable::new(
41 "host1".to_string(),
42 )
43 .available_values(Some(vec![
44 "my-host".to_string(),
45 "host1".to_string(),
46 "host2".to_string(),
47 ]))
48 .defaults(vec!["my-host".to_string()])
49 .prefix(Some("host".to_string()))]));
50 let configuration = datadog::Configuration::new();
51 let api = DashboardsAPI::with_config(configuration);
52 let resp = api.create_dashboard(body).await;
53 if let Ok(value) = resp {
54 println!("{:#?}", value);
55 } else {
56 println!("{:#?}", resp.unwrap_err());
57 }
58}
pub fn apm_query(self, value: LogQueryDefinition) -> Self
pub fn event_query(self, value: LogQueryDefinition) -> Self
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
Sourcepub fn q(self, value: String) -> Self
pub fn q(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_858397694.rs (line 23)
16async fn main() {
17 let body = Dashboard::new(
18 DashboardLayoutType::ORDERED,
19 "".to_string(),
20 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
21 Box::new(HostMapWidgetDefinition::new(
22 HostMapWidgetDefinitionRequests::new()
23 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
24 HostMapWidgetDefinitionType::HOSTMAP,
25 )),
26 ))],
27 )
28 .description(None)
29 .notify_list(Some(vec![]))
30 .reflow_type(DashboardReflowType::AUTO)
31 .restricted_roles(vec![])
32 .template_variables(Some(vec![DashboardTemplateVariable::new(
33 "host1".to_string(),
34 )
35 .available_values(Some(vec![
36 "my-host".to_string(),
37 "host1".to_string(),
38 "host2".to_string(),
39 ]))
40 .defaults(vec!["my-host".to_string()])
41 .prefix(Some("host".to_string()))]));
42 let configuration = datadog::Configuration::new();
43 let api = DashboardsAPI::with_config(configuration);
44 let resp = api.create_dashboard(body).await;
45 if let Ok(value) = resp {
46 println!("{:#?}", value);
47 } else {
48 println!("{:#?}", resp.unwrap_err());
49 }
50}
More examples
examples/v1_dashboards_CreateDashboard_1751391372.rs (line 23)
16async fn main() {
17 let body = Dashboard::new(
18 DashboardLayoutType::ORDERED,
19 "".to_string(),
20 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
21 Box::new(HostMapWidgetDefinition::new(
22 HostMapWidgetDefinitionRequests::new()
23 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
24 HostMapWidgetDefinitionType::HOSTMAP,
25 )),
26 ))],
27 )
28 .description(None)
29 .notify_list(Some(vec![]))
30 .reflow_type(DashboardReflowType::AUTO)
31 .restricted_roles(vec![])
32 .template_variables(Some(vec![DashboardTemplateVariable::new(
33 "group_by_var".to_string(),
34 )
35 .available_values(Some(vec![
36 "service".to_string(),
37 "datacenter".to_string(),
38 "env".to_string(),
39 ]))
40 .defaults(vec!["service".to_string(), "datacenter".to_string()])
41 .type_(Some("group".to_string()))]));
42 let configuration = datadog::Configuration::new();
43 let api = DashboardsAPI::with_config(configuration);
44 let resp = api.create_dashboard(body).await;
45 if let Ok(value) = resp {
46 println!("{:#?}", value);
47 } else {
48 println!("{:#?}", resp.unwrap_err());
49 }
50}
examples/v1_dashboards_CreateDashboard_1200099236.rs (line 26)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::HostMapWidgetDefinition(Box::new(
24 HostMapWidgetDefinition::new(
25 HostMapWidgetDefinitionRequests::new().fill(
26 HostMapRequest::new().q("avg:system.cpu.user{*} by {host}".to_string()),
27 ),
28 HostMapWidgetDefinitionType::HOSTMAP,
29 )
30 .no_group_hosts(true)
31 .no_metric_hosts(true)
32 .node_type(WidgetNodeType::HOST)
33 .style(
34 HostMapWidgetDefinitionStyle::new()
35 .palette("green_to_orange".to_string())
36 .palette_flip(false),
37 )
38 .title("".to_string())
39 .title_align(WidgetTextAlign::LEFT)
40 .title_size("16".to_string()),
41 )))
42 .layout(WidgetLayout::new(22, 47, 0, 0)),
43 ],
44 )
45 .description(None)
46 .notify_list(Some(vec![]))
47 .template_variables(Some(vec![]));
48 let configuration = datadog::Configuration::new();
49 let api = DashboardsAPI::with_config(configuration);
50 let resp = api.create_dashboard(body).await;
51 if let Ok(value) = resp {
52 println!("{:#?}", value);
53 } else {
54 println!("{:#?}", resp.unwrap_err());
55 }
56}
examples/v1_dashboards_CreateDashboard_2850365602.rs (line 26)
19async fn main() {
20 let body = Dashboard::new(
21 DashboardLayoutType::ORDERED,
22 "".to_string(),
23 vec![Widget::new(WidgetDefinition::HostMapWidgetDefinition(
24 Box::new(HostMapWidgetDefinition::new(
25 HostMapWidgetDefinitionRequests::new()
26 .fill(HostMapRequest::new().q("avg:system.cpu.user{*}".to_string())),
27 HostMapWidgetDefinitionType::HOSTMAP,
28 )),
29 ))],
30 )
31 .description(None)
32 .notify_list(Some(vec![]))
33 .reflow_type(DashboardReflowType::AUTO)
34 .restricted_roles(vec![])
35 .template_variable_presets(Some(vec![DashboardTemplateVariablePreset::new()
36 .name("my saved view".to_string())
37 .template_variables(vec![DashboardTemplateVariablePresetValue::new()
38 .name("datacenter".to_string())
39 .values(vec!["*".to_string(), "my-host".to_string()])])]))
40 .template_variables(Some(vec![DashboardTemplateVariable::new(
41 "host1".to_string(),
42 )
43 .available_values(Some(vec![
44 "my-host".to_string(),
45 "host1".to_string(),
46 "host2".to_string(),
47 ]))
48 .defaults(vec!["my-host".to_string()])
49 .prefix(Some("host".to_string()))]));
50 let configuration = datadog::Configuration::new();
51 let api = DashboardsAPI::with_config(configuration);
52 let resp = api.create_dashboard(body).await;
53 if let Ok(value) = resp {
54 println!("{:#?}", value);
55 } else {
56 println!("{:#?}", resp.unwrap_err());
57 }
58}
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 HostMapRequest
impl Clone for HostMapRequest
Source§fn clone(&self) -> HostMapRequest
fn clone(&self) -> HostMapRequest
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 HostMapRequest
impl Debug for HostMapRequest
Source§impl Default for HostMapRequest
impl Default for HostMapRequest
Source§impl<'de> Deserialize<'de> for HostMapRequest
impl<'de> Deserialize<'de> for HostMapRequest
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 HostMapRequest
impl PartialEq for HostMapRequest
Source§impl Serialize for HostMapRequest
impl Serialize for HostMapRequest
impl StructuralPartialEq for HostMapRequest
Auto Trait Implementations§
impl Freeze for HostMapRequest
impl RefUnwindSafe for HostMapRequest
impl Send for HostMapRequest
impl Sync for HostMapRequest
impl Unpin for HostMapRequest
impl UnwindSafe for HostMapRequest
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