#[non_exhaustive]pub struct ListHostsOptionalParams {
pub filter: Option<String>,
pub sort_field: Option<String>,
pub sort_dir: Option<String>,
pub start: Option<i64>,
pub count: Option<i64>,
pub from: Option<i64>,
pub include_muted_hosts_data: Option<bool>,
pub include_hosts_metadata: Option<bool>,
}
Expand description
ListHostsOptionalParams is a struct for passing parameters to the method HostsAPI::list_hosts
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.filter: Option<String>
String to filter search results.
sort_field: Option<String>
Sort hosts by this field.
sort_dir: Option<String>
Direction of sort. Options include asc
and desc
.
start: Option<i64>
Specify the starting point for the host search results. For example, if you set count
to 100 and the first 100 results have already been returned, you can set start
to 101
to get the next 100 results.
count: Option<i64>
Number of hosts to return. Max 1000.
from: Option<i64>
Number of seconds since UNIX epoch from which you want to search your hosts.
include_muted_hosts_data: Option<bool>
Include information on the muted status of hosts and when the mute expires.
include_hosts_metadata: Option<bool>
Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.).
Implementations§
Source§impl ListHostsOptionalParams
impl ListHostsOptionalParams
Sourcepub fn filter(self, value: String) -> Self
pub fn filter(self, value: String) -> Self
String to filter search results.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = HostsAPI::with_config(configuration);
10 let resp = api
11 .list_hosts(ListHostsOptionalParams::default().filter("env:ci".to_string()))
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub fn sort_field(self, value: String) -> Self
pub fn sort_field(self, value: String) -> Self
Sort hosts by this field.
Sourcepub fn start(self, value: i64) -> Self
pub fn start(self, value: i64) -> Self
Specify the starting point for the host search results. For example, if you set count
to 100 and the first 100 results have already been returned, you can set start
to 101
to get the next 100 results.
Sourcepub fn from(self, value: i64) -> Self
pub fn from(self, value: i64) -> Self
Number of seconds since UNIX epoch from which you want to search your hosts.
Sourcepub fn include_muted_hosts_data(self, value: bool) -> Self
pub fn include_muted_hosts_data(self, value: bool) -> Self
Include information on the muted status of hosts and when the mute expires.
Sourcepub fn include_hosts_metadata(self, value: bool) -> Self
pub fn include_hosts_metadata(self, value: bool) -> Self
Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.).
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = HostsAPI::with_config(configuration);
10 let resp = api
11 .list_hosts(ListHostsOptionalParams::default().include_hosts_metadata(true))
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
More examples
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = HostsAPI::with_config(configuration);
10 let resp = api
11 .list_hosts(ListHostsOptionalParams::default().include_hosts_metadata(true))
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Trait Implementations§
Source§impl Clone for ListHostsOptionalParams
impl Clone for ListHostsOptionalParams
Source§fn clone(&self) -> ListHostsOptionalParams
fn clone(&self) -> ListHostsOptionalParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more