Struct datadog_api_client::datadogV1::model::model_heat_map_widget_request::HeatMapWidgetRequest
source · #[non_exhaustive]pub struct HeatMapWidgetRequest {Show 14 fields
pub apm_query: Option<LogQueryDefinition>,
pub event_query: Option<EventQueryDefinition>,
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 style: Option<WidgetStyle>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Updated heat map 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.apm_query: Option<LogQueryDefinition>The log query.
event_query: Option<EventQueryDefinition>The event 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>Widget query.
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.
style: Option<WidgetStyle>Widget style definition.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl HeatMapWidgetRequest
impl HeatMapWidgetRequest
sourcepub fn new() -> HeatMapWidgetRequest
pub fn new() -> HeatMapWidgetRequest
Examples found in repository?
examples/v1_dashboards_CreateDashboard_1177423752.rs (line 25)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HeatMapWidgetDefinition(Box::new(
HeatMapWidgetDefinition::new(
vec![HeatMapWidgetRequest::new()
.q("avg:system.cpu.user{*} by {service}".to_string())
.style(WidgetStyle::new().palette("dog_classic".to_string()))],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(
WidgetLegacyLiveSpan::new(),
)))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(15, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v1_dashboards_CreateDashboard_3777304439.rs (line 34)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
async fn main() {
let body =
Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(
WidgetDefinition::HeatMapWidgetDefinition(
Box::new(
HeatMapWidgetDefinition::new(
vec![
HeatMapWidgetRequest::new()
.formulas(vec![WidgetFormula::new("query1".to_string())])
.queries(
vec![
FormulaAndFunctionQueryDefinition
::FormulaAndFunctionMetricQueryDefinition(
Box::new(
FormulaAndFunctionMetricQueryDefinition::new(
FormulaAndFunctionMetricDataSource::METRICS,
"query1".to_string(),
"avg:system.cpu.user{*}".to_string(),
),
),
)
],
)
.response_format(FormulaAndFunctionResponseFormat::TIMESERIES)
.style(WidgetStyle::new().palette("dog_classic".to_string()))
],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
],
)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn apm_query(self, value: LogQueryDefinition) -> Self
pub fn event_query(self, value: EventQueryDefinition) -> 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_3777304439.rs (line 35)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
async fn main() {
let body =
Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(
WidgetDefinition::HeatMapWidgetDefinition(
Box::new(
HeatMapWidgetDefinition::new(
vec![
HeatMapWidgetRequest::new()
.formulas(vec![WidgetFormula::new("query1".to_string())])
.queries(
vec![
FormulaAndFunctionQueryDefinition
::FormulaAndFunctionMetricQueryDefinition(
Box::new(
FormulaAndFunctionMetricQueryDefinition::new(
FormulaAndFunctionMetricDataSource::METRICS,
"query1".to_string(),
"avg:system.cpu.user{*}".to_string(),
),
),
)
],
)
.response_format(FormulaAndFunctionResponseFormat::TIMESERIES)
.style(WidgetStyle::new().palette("dog_classic".to_string()))
],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
],
)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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_1177423752.rs (line 26)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HeatMapWidgetDefinition(Box::new(
HeatMapWidgetDefinition::new(
vec![HeatMapWidgetRequest::new()
.q("avg:system.cpu.user{*} by {service}".to_string())
.style(WidgetStyle::new().palette("dog_classic".to_string()))],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(
WidgetLegacyLiveSpan::new(),
)))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(15, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn queries(self, value: Vec<FormulaAndFunctionQueryDefinition>) -> Self
pub fn queries(self, value: Vec<FormulaAndFunctionQueryDefinition>) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_3777304439.rs (lines 36-49)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
async fn main() {
let body =
Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(
WidgetDefinition::HeatMapWidgetDefinition(
Box::new(
HeatMapWidgetDefinition::new(
vec![
HeatMapWidgetRequest::new()
.formulas(vec![WidgetFormula::new("query1".to_string())])
.queries(
vec![
FormulaAndFunctionQueryDefinition
::FormulaAndFunctionMetricQueryDefinition(
Box::new(
FormulaAndFunctionMetricQueryDefinition::new(
FormulaAndFunctionMetricDataSource::METRICS,
"query1".to_string(),
"avg:system.cpu.user{*}".to_string(),
),
),
)
],
)
.response_format(FormulaAndFunctionResponseFormat::TIMESERIES)
.style(WidgetStyle::new().palette("dog_classic".to_string()))
],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
],
)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn response_format(self, value: FormulaAndFunctionResponseFormat) -> Self
pub fn response_format(self, value: FormulaAndFunctionResponseFormat) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_3777304439.rs (line 50)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
async fn main() {
let body =
Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(
WidgetDefinition::HeatMapWidgetDefinition(
Box::new(
HeatMapWidgetDefinition::new(
vec![
HeatMapWidgetRequest::new()
.formulas(vec![WidgetFormula::new("query1".to_string())])
.queries(
vec![
FormulaAndFunctionQueryDefinition
::FormulaAndFunctionMetricQueryDefinition(
Box::new(
FormulaAndFunctionMetricQueryDefinition::new(
FormulaAndFunctionMetricDataSource::METRICS,
"query1".to_string(),
"avg:system.cpu.user{*}".to_string(),
),
),
)
],
)
.response_format(FormulaAndFunctionResponseFormat::TIMESERIES)
.style(WidgetStyle::new().palette("dog_classic".to_string()))
],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
],
)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn rum_query(self, value: LogQueryDefinition) -> Self
pub fn security_query(self, value: LogQueryDefinition) -> Self
sourcepub fn style(self, value: WidgetStyle) -> Self
pub fn style(self, value: WidgetStyle) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_1177423752.rs (line 27)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HeatMapWidgetDefinition(Box::new(
HeatMapWidgetDefinition::new(
vec![HeatMapWidgetRequest::new()
.q("avg:system.cpu.user{*} by {service}".to_string())
.style(WidgetStyle::new().palette("dog_classic".to_string()))],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(
WidgetLegacyLiveSpan::new(),
)))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(15, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v1_dashboards_CreateDashboard_3777304439.rs (line 51)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
async fn main() {
let body =
Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(
WidgetDefinition::HeatMapWidgetDefinition(
Box::new(
HeatMapWidgetDefinition::new(
vec![
HeatMapWidgetRequest::new()
.formulas(vec![WidgetFormula::new("query1".to_string())])
.queries(
vec![
FormulaAndFunctionQueryDefinition
::FormulaAndFunctionMetricQueryDefinition(
Box::new(
FormulaAndFunctionMetricQueryDefinition::new(
FormulaAndFunctionMetricDataSource::METRICS,
"query1".to_string(),
"avg:system.cpu.user{*}".to_string(),
),
),
)
],
)
.response_format(FormulaAndFunctionResponseFormat::TIMESERIES)
.style(WidgetStyle::new().palette("dog_classic".to_string()))
],
HeatMapWidgetDefinitionType::HEATMAP,
)
.time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
],
)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for HeatMapWidgetRequest
impl Clone for HeatMapWidgetRequest
source§fn clone(&self) -> HeatMapWidgetRequest
fn clone(&self) -> HeatMapWidgetRequest
Returns a copy 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 HeatMapWidgetRequest
impl Debug for HeatMapWidgetRequest
source§impl Default for HeatMapWidgetRequest
impl Default for HeatMapWidgetRequest
source§impl<'de> Deserialize<'de> for HeatMapWidgetRequest
impl<'de> Deserialize<'de> for HeatMapWidgetRequest
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 HeatMapWidgetRequest
impl PartialEq for HeatMapWidgetRequest
source§impl Serialize for HeatMapWidgetRequest
impl Serialize for HeatMapWidgetRequest
impl StructuralPartialEq for HeatMapWidgetRequest
Auto Trait Implementations§
impl Freeze for HeatMapWidgetRequest
impl RefUnwindSafe for HeatMapWidgetRequest
impl Send for HeatMapWidgetRequest
impl Sync for HeatMapWidgetRequest
impl Unpin for HeatMapWidgetRequest
impl UnwindSafe for HeatMapWidgetRequest
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)