#[non_exhaustive]pub struct TopologyQuery {
pub data_source: Option<TopologyQueryDataSource>,
pub filters: Option<Vec<String>>,
pub service: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Query to service-based topology data sources like the service map or data streams.
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.data_source: Option<TopologyQueryDataSource>
Name of the data source
filters: Option<Vec<String>>
Your environment and primary tag (or * if enabled for your account).
service: Option<String>
Name of the service
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl TopologyQuery
impl TopologyQuery
Sourcepub fn new() -> TopologyQuery
pub fn new() -> TopologyQuery
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2652180930.rs (line 27)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::TopologyMapWidgetDefinition(Box::new(
24 TopologyMapWidgetDefinition::new(
25 vec![TopologyRequest::new()
26 .query(
27 TopologyQuery::new()
28 .data_source(TopologyQueryDataSource::SERVICE_MAP)
29 .filters(vec!["env:none".to_string(), "environment:*".to_string()])
30 .service("".to_string()),
31 )
32 .request_type(TopologyRequestType::TOPOLOGY)],
33 TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
34 )
35 .title("".to_string())
36 .title_align(WidgetTextAlign::LEFT)
37 .title_size("16".to_string()),
38 )))
39 .layout(WidgetLayout::new(15, 47, 0, 0)),
40 ],
41 )
42 .description(Some("".to_string()))
43 .notify_list(Some(vec![]))
44 .template_variables(Some(vec![]));
45 let configuration = datadog::Configuration::new();
46 let api = DashboardsAPI::with_config(configuration);
47 let resp = api.create_dashboard(body).await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
Sourcepub fn data_source(self, value: TopologyQueryDataSource) -> Self
pub fn data_source(self, value: TopologyQueryDataSource) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2652180930.rs (line 28)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::TopologyMapWidgetDefinition(Box::new(
24 TopologyMapWidgetDefinition::new(
25 vec![TopologyRequest::new()
26 .query(
27 TopologyQuery::new()
28 .data_source(TopologyQueryDataSource::SERVICE_MAP)
29 .filters(vec!["env:none".to_string(), "environment:*".to_string()])
30 .service("".to_string()),
31 )
32 .request_type(TopologyRequestType::TOPOLOGY)],
33 TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
34 )
35 .title("".to_string())
36 .title_align(WidgetTextAlign::LEFT)
37 .title_size("16".to_string()),
38 )))
39 .layout(WidgetLayout::new(15, 47, 0, 0)),
40 ],
41 )
42 .description(Some("".to_string()))
43 .notify_list(Some(vec![]))
44 .template_variables(Some(vec![]));
45 let configuration = datadog::Configuration::new();
46 let api = DashboardsAPI::with_config(configuration);
47 let resp = api.create_dashboard(body).await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
Sourcepub fn filters(self, value: Vec<String>) -> Self
pub fn filters(self, value: Vec<String>) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2652180930.rs (line 29)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::TopologyMapWidgetDefinition(Box::new(
24 TopologyMapWidgetDefinition::new(
25 vec![TopologyRequest::new()
26 .query(
27 TopologyQuery::new()
28 .data_source(TopologyQueryDataSource::SERVICE_MAP)
29 .filters(vec!["env:none".to_string(), "environment:*".to_string()])
30 .service("".to_string()),
31 )
32 .request_type(TopologyRequestType::TOPOLOGY)],
33 TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
34 )
35 .title("".to_string())
36 .title_align(WidgetTextAlign::LEFT)
37 .title_size("16".to_string()),
38 )))
39 .layout(WidgetLayout::new(15, 47, 0, 0)),
40 ],
41 )
42 .description(Some("".to_string()))
43 .notify_list(Some(vec![]))
44 .template_variables(Some(vec![]));
45 let configuration = datadog::Configuration::new();
46 let api = DashboardsAPI::with_config(configuration);
47 let resp = api.create_dashboard(body).await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
Sourcepub fn service(self, value: String) -> Self
pub fn service(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2652180930.rs (line 30)
18async fn main() {
19 let body = Dashboard::new(
20 DashboardLayoutType::FREE,
21 "Example-Dashboard".to_string(),
22 vec![
23 Widget::new(WidgetDefinition::TopologyMapWidgetDefinition(Box::new(
24 TopologyMapWidgetDefinition::new(
25 vec![TopologyRequest::new()
26 .query(
27 TopologyQuery::new()
28 .data_source(TopologyQueryDataSource::SERVICE_MAP)
29 .filters(vec!["env:none".to_string(), "environment:*".to_string()])
30 .service("".to_string()),
31 )
32 .request_type(TopologyRequestType::TOPOLOGY)],
33 TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
34 )
35 .title("".to_string())
36 .title_align(WidgetTextAlign::LEFT)
37 .title_size("16".to_string()),
38 )))
39 .layout(WidgetLayout::new(15, 47, 0, 0)),
40 ],
41 )
42 .description(Some("".to_string()))
43 .notify_list(Some(vec![]))
44 .template_variables(Some(vec![]));
45 let configuration = datadog::Configuration::new();
46 let api = DashboardsAPI::with_config(configuration);
47 let resp = api.create_dashboard(body).await;
48 if let Ok(value) = resp {
49 println!("{:#?}", value);
50 } else {
51 println!("{:#?}", resp.unwrap_err());
52 }
53}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for TopologyQuery
impl Clone for TopologyQuery
Source§fn clone(&self) -> TopologyQuery
fn clone(&self) -> TopologyQuery
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 TopologyQuery
impl Debug for TopologyQuery
Source§impl Default for TopologyQuery
impl Default for TopologyQuery
Source§impl<'de> Deserialize<'de> for TopologyQuery
impl<'de> Deserialize<'de> for TopologyQuery
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 TopologyQuery
impl PartialEq for TopologyQuery
Source§impl Serialize for TopologyQuery
impl Serialize for TopologyQuery
impl StructuralPartialEq for TopologyQuery
Auto Trait Implementations§
impl Freeze for TopologyQuery
impl RefUnwindSafe for TopologyQuery
impl Send for TopologyQuery
impl Sync for TopologyQuery
impl Unpin for TopologyQuery
impl UnwindSafe for TopologyQuery
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