#[non_exhaustive]pub struct ListProcessesOptionalParams {
pub search: Option<String>,
pub tags: Option<String>,
pub from: Option<i64>,
pub to: Option<i64>,
pub page_limit: Option<i32>,
pub page_cursor: Option<String>,
}
Expand description
ListProcessesOptionalParams is a struct for passing parameters to the method ProcessesAPI::list_processes
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.search: Option<String>
String to search processes by.
Comma-separated list of tags to filter processes by.
from: Option<i64>
Unix timestamp (number of seconds since epoch) of the start of the query window.
If not provided, the start of the query window will be 15 minutes before the to
timestamp. If neither
from
nor to
are provided, the query window will be [now - 15m, now]
.
to: Option<i64>
Unix timestamp (number of seconds since epoch) of the end of the query window.
If not provided, the end of the query window will be 15 minutes after the from
timestamp. If neither
from
nor to
are provided, the query window will be [now - 15m, now]
.
page_limit: Option<i32>
Maximum number of results returned.
page_cursor: Option<String>
String to query the next page of results.
This key is provided with each valid response from the API in meta.page.after
.
Implementations§
Source§impl ListProcessesOptionalParams
impl ListProcessesOptionalParams
Sourcepub fn search(self, value: String) -> Self
pub fn search(self, value: String) -> Self
String to search processes by.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ProcessesAPI::with_config(configuration);
10 let resp = api
11 .list_processes(
12 ListProcessesOptionalParams::default()
13 .search("process-agent".to_string())
14 .tags("testing:true".to_string())
15 .page_limit(2),
16 )
17 .await;
18 if let Ok(value) = resp {
19 println!("{:#?}", value);
20 } else {
21 println!("{:#?}", resp.unwrap_err());
22 }
23}
Comma-separated list of tags to filter processes by.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ProcessesAPI::with_config(configuration);
10 let resp = api
11 .list_processes(
12 ListProcessesOptionalParams::default()
13 .search("process-agent".to_string())
14 .tags("testing:true".to_string())
15 .page_limit(2),
16 )
17 .await;
18 if let Ok(value) = resp {
19 println!("{:#?}", value);
20 } else {
21 println!("{:#?}", resp.unwrap_err());
22 }
23}
Sourcepub fn from(self, value: i64) -> Self
pub fn from(self, value: i64) -> Self
Unix timestamp (number of seconds since epoch) of the start of the query window.
If not provided, the start of the query window will be 15 minutes before the to
timestamp. If neither
from
nor to
are provided, the query window will be [now - 15m, now]
.
Sourcepub fn to(self, value: i64) -> Self
pub fn to(self, value: i64) -> Self
Unix timestamp (number of seconds since epoch) of the end of the query window.
If not provided, the end of the query window will be 15 minutes after the from
timestamp. If neither
from
nor to
are provided, the query window will be [now - 15m, now]
.
Sourcepub fn page_limit(self, value: i32) -> Self
pub fn page_limit(self, value: i32) -> Self
Maximum number of results returned.
Examples found in repository?
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ProcessesAPI::with_config(configuration);
12 let response =
13 api.list_processes_with_pagination(ListProcessesOptionalParams::default().page_limit(2));
14 pin_mut!(response);
15 while let Some(resp) = response.next().await {
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21 }
22}
More examples
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ProcessesAPI::with_config(configuration);
10 let resp = api
11 .list_processes(
12 ListProcessesOptionalParams::default()
13 .search("process-agent".to_string())
14 .tags("testing:true".to_string())
15 .page_limit(2),
16 )
17 .await;
18 if let Ok(value) = resp {
19 println!("{:#?}", value);
20 } else {
21 println!("{:#?}", resp.unwrap_err());
22 }
23}
Sourcepub fn page_cursor(self, value: String) -> Self
pub fn page_cursor(self, value: String) -> Self
String to query the next page of results.
This key is provided with each valid response from the API in meta.page.after
.
Trait Implementations§
Source§impl Clone for ListProcessesOptionalParams
impl Clone for ListProcessesOptionalParams
Source§fn clone(&self) -> ListProcessesOptionalParams
fn clone(&self) -> ListProcessesOptionalParams
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more