#[non_exhaustive]pub struct CIAppPipelinesAggregateRequest {
pub compute: Option<Vec<CIAppCompute>>,
pub filter: Option<CIAppPipelinesQueryFilter>,
pub group_by: Option<Vec<CIAppPipelinesGroupBy>>,
pub options: Option<CIAppQueryOptions>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The object sent with the request to retrieve aggregation buckets of pipeline events from your organization.
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.compute: Option<Vec<CIAppCompute>>
The list of metrics or timeseries to compute for the retrieved buckets.
filter: Option<CIAppPipelinesQueryFilter>
The search and filter query settings.
group_by: Option<Vec<CIAppPipelinesGroupBy>>
The rules for the group-by.
options: Option<CIAppQueryOptions>
Global query options that are used during the query. Only supply timezone or time offset, not both. Otherwise, the query fails.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CIAppPipelinesAggregateRequest
impl CIAppPipelinesAggregateRequest
Sourcepub fn new() -> CIAppPipelinesAggregateRequest
pub fn new() -> CIAppPipelinesAggregateRequest
Examples found in repository?
examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs (line 15)
14async fn main() {
15 let body = CIAppPipelinesAggregateRequest::new()
16 .compute(vec![CIAppCompute::new(
17 CIAppAggregationFunction::PERCENTILE_90,
18 )
19 .metric("@duration".to_string())
20 .type_(CIAppComputeType::TOTAL)])
21 .filter(
22 CIAppPipelinesQueryFilter::new()
23 .from("now-15m".to_string())
24 .query("@ci.provider.name:(gitlab OR github)".to_string())
25 .to("now".to_string()),
26 )
27 .group_by(vec![CIAppPipelinesGroupBy::new("@ci.status".to_string())
28 .limit(10)
29 .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
30 .options(CIAppQueryOptions::new().timezone("GMT".to_string()));
31 let configuration = datadog::Configuration::new();
32 let api = CIVisibilityPipelinesAPI::with_config(configuration);
33 let resp = api.aggregate_ci_app_pipeline_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn compute(self, value: Vec<CIAppCompute>) -> Self
pub fn compute(self, value: Vec<CIAppCompute>) -> Self
Examples found in repository?
examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs (lines 16-20)
14async fn main() {
15 let body = CIAppPipelinesAggregateRequest::new()
16 .compute(vec![CIAppCompute::new(
17 CIAppAggregationFunction::PERCENTILE_90,
18 )
19 .metric("@duration".to_string())
20 .type_(CIAppComputeType::TOTAL)])
21 .filter(
22 CIAppPipelinesQueryFilter::new()
23 .from("now-15m".to_string())
24 .query("@ci.provider.name:(gitlab OR github)".to_string())
25 .to("now".to_string()),
26 )
27 .group_by(vec![CIAppPipelinesGroupBy::new("@ci.status".to_string())
28 .limit(10)
29 .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
30 .options(CIAppQueryOptions::new().timezone("GMT".to_string()));
31 let configuration = datadog::Configuration::new();
32 let api = CIVisibilityPipelinesAPI::with_config(configuration);
33 let resp = api.aggregate_ci_app_pipeline_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn filter(self, value: CIAppPipelinesQueryFilter) -> Self
pub fn filter(self, value: CIAppPipelinesQueryFilter) -> Self
Examples found in repository?
examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs (lines 21-26)
14async fn main() {
15 let body = CIAppPipelinesAggregateRequest::new()
16 .compute(vec![CIAppCompute::new(
17 CIAppAggregationFunction::PERCENTILE_90,
18 )
19 .metric("@duration".to_string())
20 .type_(CIAppComputeType::TOTAL)])
21 .filter(
22 CIAppPipelinesQueryFilter::new()
23 .from("now-15m".to_string())
24 .query("@ci.provider.name:(gitlab OR github)".to_string())
25 .to("now".to_string()),
26 )
27 .group_by(vec![CIAppPipelinesGroupBy::new("@ci.status".to_string())
28 .limit(10)
29 .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
30 .options(CIAppQueryOptions::new().timezone("GMT".to_string()));
31 let configuration = datadog::Configuration::new();
32 let api = CIVisibilityPipelinesAPI::with_config(configuration);
33 let resp = api.aggregate_ci_app_pipeline_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn group_by(self, value: Vec<CIAppPipelinesGroupBy>) -> Self
pub fn group_by(self, value: Vec<CIAppPipelinesGroupBy>) -> Self
Examples found in repository?
examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs (lines 27-29)
14async fn main() {
15 let body = CIAppPipelinesAggregateRequest::new()
16 .compute(vec![CIAppCompute::new(
17 CIAppAggregationFunction::PERCENTILE_90,
18 )
19 .metric("@duration".to_string())
20 .type_(CIAppComputeType::TOTAL)])
21 .filter(
22 CIAppPipelinesQueryFilter::new()
23 .from("now-15m".to_string())
24 .query("@ci.provider.name:(gitlab OR github)".to_string())
25 .to("now".to_string()),
26 )
27 .group_by(vec![CIAppPipelinesGroupBy::new("@ci.status".to_string())
28 .limit(10)
29 .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
30 .options(CIAppQueryOptions::new().timezone("GMT".to_string()));
31 let configuration = datadog::Configuration::new();
32 let api = CIVisibilityPipelinesAPI::with_config(configuration);
33 let resp = api.aggregate_ci_app_pipeline_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn options(self, value: CIAppQueryOptions) -> Self
pub fn options(self, value: CIAppQueryOptions) -> Self
Examples found in repository?
examples/v2_ci-visibility-pipelines_AggregateCIAppPipelineEvents.rs (line 30)
14async fn main() {
15 let body = CIAppPipelinesAggregateRequest::new()
16 .compute(vec![CIAppCompute::new(
17 CIAppAggregationFunction::PERCENTILE_90,
18 )
19 .metric("@duration".to_string())
20 .type_(CIAppComputeType::TOTAL)])
21 .filter(
22 CIAppPipelinesQueryFilter::new()
23 .from("now-15m".to_string())
24 .query("@ci.provider.name:(gitlab OR github)".to_string())
25 .to("now".to_string()),
26 )
27 .group_by(vec![CIAppPipelinesGroupBy::new("@ci.status".to_string())
28 .limit(10)
29 .total(CIAppGroupByTotal::CIAppGroupByTotalBoolean(false))])
30 .options(CIAppQueryOptions::new().timezone("GMT".to_string()));
31 let configuration = datadog::Configuration::new();
32 let api = CIVisibilityPipelinesAPI::with_config(configuration);
33 let resp = api.aggregate_ci_app_pipeline_events(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for CIAppPipelinesAggregateRequest
impl Clone for CIAppPipelinesAggregateRequest
Source§fn clone(&self) -> CIAppPipelinesAggregateRequest
fn clone(&self) -> CIAppPipelinesAggregateRequest
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<'de> Deserialize<'de> for CIAppPipelinesAggregateRequest
impl<'de> Deserialize<'de> for CIAppPipelinesAggregateRequest
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 CIAppPipelinesAggregateRequest
impl PartialEq for CIAppPipelinesAggregateRequest
Source§fn eq(&self, other: &CIAppPipelinesAggregateRequest) -> bool
fn eq(&self, other: &CIAppPipelinesAggregateRequest) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CIAppPipelinesAggregateRequest
Auto Trait Implementations§
impl Freeze for CIAppPipelinesAggregateRequest
impl RefUnwindSafe for CIAppPipelinesAggregateRequest
impl Send for CIAppPipelinesAggregateRequest
impl Sync for CIAppPipelinesAggregateRequest
impl Unpin for CIAppPipelinesAggregateRequest
impl UnwindSafe for CIAppPipelinesAggregateRequest
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