Struct datadog_api_client::datadogV1::model::model_log_query_definition_search::LogQueryDefinitionSearch
source · #[non_exhaustive]pub struct LogQueryDefinitionSearch {
pub query: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
The query being made on the logs.
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.query: StringSearch value to apply.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl LogQueryDefinitionSearch
impl LogQueryDefinitionSearch
sourcepub fn new(query: String) -> LogQueryDefinitionSearch
pub fn new(query: String) -> LogQueryDefinitionSearch
Examples found in repository?
examples/v1_dashboards_CreateDashboard.rs (line 40)
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 53 54
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::ORDERED,
"Example-Dashboard with Profile Metrics Query".to_string(),
vec![Widget::new(WidgetDefinition::TimeseriesWidgetDefinition(
Box::new(TimeseriesWidgetDefinition::new(
vec![TimeseriesWidgetRequest::new().profile_metrics_query(
LogQueryDefinition::new()
.compute(
LogsQueryCompute::new("sum".to_string())
.facet("@prof_core_cpu_cores".to_string()),
)
.group_by(vec![LogQueryDefinitionGroupBy::new("service".to_string())
.limit(10)
.sort(
LogQueryDefinitionGroupBySort::new(
"sum".to_string(),
WidgetSort::DESCENDING,
)
.facet("@prof_core_cpu_cores".to_string()),
)])
.search(LogQueryDefinitionSearch::new("runtime:jvm".to_string())),
)],
TimeseriesWidgetDefinitionType::TIMESERIES,
)),
))],
);
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 LogQueryDefinitionSearch
impl Clone for LogQueryDefinitionSearch
source§fn clone(&self) -> LogQueryDefinitionSearch
fn clone(&self) -> LogQueryDefinitionSearch
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 LogQueryDefinitionSearch
impl Debug for LogQueryDefinitionSearch
source§impl<'de> Deserialize<'de> for LogQueryDefinitionSearch
impl<'de> Deserialize<'de> for LogQueryDefinitionSearch
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 LogQueryDefinitionSearch
impl PartialEq for LogQueryDefinitionSearch
source§impl Serialize for LogQueryDefinitionSearch
impl Serialize for LogQueryDefinitionSearch
impl StructuralPartialEq for LogQueryDefinitionSearch
Auto Trait Implementations§
impl Freeze for LogQueryDefinitionSearch
impl RefUnwindSafe for LogQueryDefinitionSearch
impl Send for LogQueryDefinitionSearch
impl Sync for LogQueryDefinitionSearch
impl Unpin for LogQueryDefinitionSearch
impl UnwindSafe for LogQueryDefinitionSearch
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)