Struct datadog_api_client::datadogV1::api::api_hosts::ListHostsOptionalParams
source · #[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?
7 8 9 10 11 12 13 14 15 16 17 18
async fn main() {
let configuration = datadog::Configuration::new();
let api = HostsAPI::with_config(configuration);
let resp = api
.list_hosts(ListHostsOptionalParams::default().filter("env:ci".to_string()))
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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?
7 8 9 10 11 12 13 14 15 16 17 18
async fn main() {
let configuration = datadog::Configuration::new();
let api = HostsAPI::with_config(configuration);
let resp = api
.list_hosts(ListHostsOptionalParams::default().include_hosts_metadata(true))
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
7 8 9 10 11 12 13 14 15 16 17 18
async fn main() {
let configuration = datadog::Configuration::new();
let api = HostsAPI::with_config(configuration);
let resp = api
.list_hosts(ListHostsOptionalParams::default().include_hosts_metadata(true))
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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 moresource§impl Debug for ListHostsOptionalParams
impl Debug for ListHostsOptionalParams
source§impl Default for ListHostsOptionalParams
impl Default for ListHostsOptionalParams
source§fn default() -> ListHostsOptionalParams
fn default() -> ListHostsOptionalParams
Auto Trait Implementations§
impl Freeze for ListHostsOptionalParams
impl RefUnwindSafe for ListHostsOptionalParams
impl Send for ListHostsOptionalParams
impl Sync for ListHostsOptionalParams
impl Unpin for ListHostsOptionalParams
impl UnwindSafe for ListHostsOptionalParams
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
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)
clone_to_uninit)