pub struct ContainersAPI { /* private fields */ }
Expand description
The Containers API allows you to query container data for your organization. See the Container Monitoring page for more information.
Implementations§
Source§impl ContainersAPI
impl ContainersAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
examples/v2_containers_ListContainers.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ContainersAPI::with_config(configuration);
10 let resp = api
11 .list_containers(ListContainersOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
More examples
examples/v2_containers_ListContainers_2175733917.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ContainersAPI::with_config(configuration);
10 let resp = api
11 .list_containers(
12 ListContainersOptionalParams::default().group_by("short_image".to_string()),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
examples/v2_containers_ListContainers_931009654.rs (line 11)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ContainersAPI::with_config(configuration);
12 let response =
13 api.list_containers_with_pagination(ListContainersOptionalParams::default().page_size(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}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn list_containers(
&self,
params: ListContainersOptionalParams,
) -> Result<ContainersResponse, Error<ListContainersError>>
pub async fn list_containers( &self, params: ListContainersOptionalParams, ) -> Result<ContainersResponse, Error<ListContainersError>>
Get all containers for your organization.
Examples found in repository?
examples/v2_containers_ListContainers.rs (line 11)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ContainersAPI::with_config(configuration);
10 let resp = api
11 .list_containers(ListContainersOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
More examples
examples/v2_containers_ListContainers_2175733917.rs (lines 11-13)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ContainersAPI::with_config(configuration);
10 let resp = api
11 .list_containers(
12 ListContainersOptionalParams::default().group_by("short_image".to_string()),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub fn list_containers_with_pagination(
&self,
params: ListContainersOptionalParams,
) -> impl Stream<Item = Result<ContainerItem, Error<ListContainersError>>> + '_
pub fn list_containers_with_pagination( &self, params: ListContainersOptionalParams, ) -> impl Stream<Item = Result<ContainerItem, Error<ListContainersError>>> + '_
Examples found in repository?
examples/v2_containers_ListContainers_931009654.rs (line 13)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ContainersAPI::with_config(configuration);
12 let response =
13 api.list_containers_with_pagination(ListContainersOptionalParams::default().page_size(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}
Sourcepub async fn list_containers_with_http_info(
&self,
params: ListContainersOptionalParams,
) -> Result<ResponseContent<ContainersResponse>, Error<ListContainersError>>
pub async fn list_containers_with_http_info( &self, params: ListContainersOptionalParams, ) -> Result<ResponseContent<ContainersResponse>, Error<ListContainersError>>
Get all containers for your organization.
Trait Implementations§
Source§impl Clone for ContainersAPI
impl Clone for ContainersAPI
Source§fn clone(&self) -> ContainersAPI
fn clone(&self) -> ContainersAPI
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 Debug for ContainersAPI
impl Debug for ContainersAPI
Auto Trait Implementations§
impl Freeze for ContainersAPI
impl !RefUnwindSafe for ContainersAPI
impl Send for ContainersAPI
impl Sync for ContainersAPI
impl Unpin for ContainersAPI
impl !UnwindSafe for ContainersAPI
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