Struct datadog_api_client::datadogV1::model::model_apm_stats_query_definition::ApmStatsQueryDefinition
source · #[non_exhaustive]pub struct ApmStatsQueryDefinition {
pub columns: Option<Vec<ApmStatsQueryColumnType>>,
pub env: String,
pub name: String,
pub primary_tag: String,
pub resource: Option<String>,
pub row_type: ApmStatsQueryRowType,
pub service: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
The APM stats query for table and distributions widgets.
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.columns: Option<Vec<ApmStatsQueryColumnType>>Column properties used by the front end for display.
env: StringEnvironment name.
name: StringOperation name associated with service.
primary_tag: StringThe organization’s host group name and value.
resource: Option<String>Resource name.
row_type: ApmStatsQueryRowTypeThe level of detail for the request.
service: StringService name.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl ApmStatsQueryDefinition
impl ApmStatsQueryDefinition
sourcepub fn new(
env: String,
name: String,
primary_tag: String,
row_type: ApmStatsQueryRowType,
service: String,
) -> ApmStatsQueryDefinition
pub fn new( env: String, name: String, primary_tag: String, row_type: ApmStatsQueryRowType, service: String, ) -> ApmStatsQueryDefinition
Examples found in repository?
examples/v1_dashboards_CreateDashboard_803346562.rs (lines 25-31)
17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::ORDERED,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::DistributionWidgetDefinition(Box::new(
DistributionWidgetDefinition::new(
vec![DistributionWidgetRequest::new().apm_stats_query(
ApmStatsQueryDefinition::new(
"prod".to_string(),
"cassandra.query".to_string(),
"datacenter:dc1".to_string(),
ApmStatsQueryRowType::SERVICE,
"cassandra".to_string(),
),
)],
DistributionWidgetDefinitionType::DISTRIBUTION,
)
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(4, 4, 0, 0)),
],
);
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 columns(self, value: Vec<ApmStatsQueryColumnType>) -> Self
pub fn resource(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for ApmStatsQueryDefinition
impl Clone for ApmStatsQueryDefinition
source§fn clone(&self) -> ApmStatsQueryDefinition
fn clone(&self) -> ApmStatsQueryDefinition
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 ApmStatsQueryDefinition
impl Debug for ApmStatsQueryDefinition
source§impl<'de> Deserialize<'de> for ApmStatsQueryDefinition
impl<'de> Deserialize<'de> for ApmStatsQueryDefinition
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 ApmStatsQueryDefinition
impl PartialEq for ApmStatsQueryDefinition
source§impl Serialize for ApmStatsQueryDefinition
impl Serialize for ApmStatsQueryDefinition
impl StructuralPartialEq for ApmStatsQueryDefinition
Auto Trait Implementations§
impl Freeze for ApmStatsQueryDefinition
impl RefUnwindSafe for ApmStatsQueryDefinition
impl Send for ApmStatsQueryDefinition
impl Sync for ApmStatsQueryDefinition
impl Unpin for ApmStatsQueryDefinition
impl UnwindSafe for ApmStatsQueryDefinition
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)