#[non_exhaustive]pub struct ListSLOsOptionalParams {
pub ids: Option<String>,
pub query: Option<String>,
pub tags_query: Option<String>,
pub metrics_query: Option<String>,
pub limit: Option<i64>,
pub offset: Option<i64>,
}
Expand description
ListSLOsOptionalParams is a struct for passing parameters to the method ServiceLevelObjectivesAPI::list_slos
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.ids: Option<String>
A comma separated list of the IDs of the service level objectives objects.
query: Option<String>
The query string to filter results based on SLO names.
The query string to filter results based on a single SLO tag.
metrics_query: Option<String>
The query string to filter results based on SLO numerator and denominator.
limit: Option<i64>
The number of SLOs to return in the response.
offset: Option<i64>
The specific offset to use as the beginning of the returned response.
Implementations§
Source§impl ListSLOsOptionalParams
impl ListSLOsOptionalParams
Sourcepub fn ids(self, value: String) -> Self
pub fn ids(self, value: String) -> Self
A comma separated list of the IDs of the service level objectives objects.
Examples found in repository?
7async fn main() {
8 // there is a valid "slo" in the system
9 let slo_data_0_id = std::env::var("SLO_DATA_0_ID").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ServiceLevelObjectivesAPI::with_config(configuration);
12 let resp = api
13 .list_slos(ListSLOsOptionalParams::default().ids(slo_data_0_id.clone()))
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub fn query(self, value: String) -> Self
pub fn query(self, value: String) -> Self
The query string to filter results based on SLO names.
The query string to filter results based on a single SLO tag.
Sourcepub fn metrics_query(self, value: String) -> Self
pub fn metrics_query(self, value: String) -> Self
The query string to filter results based on SLO numerator and denominator.
Sourcepub fn limit(self, value: i64) -> Self
pub fn limit(self, value: i64) -> Self
The number of SLOs to return in the response.
Examples found in repository?
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ServiceLevelObjectivesAPI::with_config(configuration);
12 let response = api.list_slos_with_pagination(ListSLOsOptionalParams::default().limit(2));
13 pin_mut!(response);
14 while let Some(resp) = response.next().await {
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20 }
21}
Trait Implementations§
Source§impl Clone for ListSLOsOptionalParams
impl Clone for ListSLOsOptionalParams
Source§fn clone(&self) -> ListSLOsOptionalParams
fn clone(&self) -> ListSLOsOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more