pub struct DashboardListsAPI { /* private fields */ }
Expand description
Interact with your dashboard lists through the API to organize, find, and share all of your dashboards with your team and organization.
Implementations§
Source§impl DashboardListsAPI
impl DashboardListsAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
examples/v1_dashboard-lists_GetDashboardList.rs (line 10)
6async fn main() {
7 // there is a valid "dashboard_list" in the system
8 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
9 let configuration = datadog::Configuration::new();
10 let api = DashboardListsAPI::with_config(configuration);
11 let resp = api.get_dashboard_list(dashboard_list_id.clone()).await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
examples/v1_dashboard-lists_DeleteDashboardList.rs (line 10)
6async fn main() {
7 // there is a valid "dashboard_list" in the system
8 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
9 let configuration = datadog::Configuration::new();
10 let api = DashboardListsAPI::with_config(configuration);
11 let resp = api.delete_dashboard_list(dashboard_list_id.clone()).await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
examples/v1_dashboard-lists_UpdateDashboardList.rs (line 12)
7async fn main() {
8 // there is a valid "dashboard_list" in the system
9 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
10 let body = DashboardList::new("updated Example-Dashboard-List".to_string());
11 let configuration = datadog::Configuration::new();
12 let api = DashboardListsAPI::with_config(configuration);
13 let resp = api
14 .update_dashboard_list(dashboard_list_id.clone(), body)
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_dashboard_list(
&self,
body: DashboardList,
) -> Result<DashboardList, Error<CreateDashboardListError>>
pub async fn create_dashboard_list( &self, body: DashboardList, ) -> Result<DashboardList, Error<CreateDashboardListError>>
Create an empty dashboard list.
Sourcepub async fn create_dashboard_list_with_http_info(
&self,
body: DashboardList,
) -> Result<ResponseContent<DashboardList>, Error<CreateDashboardListError>>
pub async fn create_dashboard_list_with_http_info( &self, body: DashboardList, ) -> Result<ResponseContent<DashboardList>, Error<CreateDashboardListError>>
Create an empty dashboard list.
Sourcepub async fn delete_dashboard_list(
&self,
list_id: i64,
) -> Result<DashboardListDeleteResponse, Error<DeleteDashboardListError>>
pub async fn delete_dashboard_list( &self, list_id: i64, ) -> Result<DashboardListDeleteResponse, Error<DeleteDashboardListError>>
Delete a dashboard list.
Examples found in repository?
examples/v1_dashboard-lists_DeleteDashboardList.rs (line 11)
6async fn main() {
7 // there is a valid "dashboard_list" in the system
8 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
9 let configuration = datadog::Configuration::new();
10 let api = DashboardListsAPI::with_config(configuration);
11 let resp = api.delete_dashboard_list(dashboard_list_id.clone()).await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn delete_dashboard_list_with_http_info(
&self,
list_id: i64,
) -> Result<ResponseContent<DashboardListDeleteResponse>, Error<DeleteDashboardListError>>
pub async fn delete_dashboard_list_with_http_info( &self, list_id: i64, ) -> Result<ResponseContent<DashboardListDeleteResponse>, Error<DeleteDashboardListError>>
Delete a dashboard list.
Sourcepub async fn get_dashboard_list(
&self,
list_id: i64,
) -> Result<DashboardList, Error<GetDashboardListError>>
pub async fn get_dashboard_list( &self, list_id: i64, ) -> Result<DashboardList, Error<GetDashboardListError>>
Fetch an existing dashboard list’s definition.
Examples found in repository?
examples/v1_dashboard-lists_GetDashboardList.rs (line 11)
6async fn main() {
7 // there is a valid "dashboard_list" in the system
8 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
9 let configuration = datadog::Configuration::new();
10 let api = DashboardListsAPI::with_config(configuration);
11 let resp = api.get_dashboard_list(dashboard_list_id.clone()).await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn get_dashboard_list_with_http_info(
&self,
list_id: i64,
) -> Result<ResponseContent<DashboardList>, Error<GetDashboardListError>>
pub async fn get_dashboard_list_with_http_info( &self, list_id: i64, ) -> Result<ResponseContent<DashboardList>, Error<GetDashboardListError>>
Fetch an existing dashboard list’s definition.
Sourcepub async fn list_dashboard_lists(
&self,
) -> Result<DashboardListListResponse, Error<ListDashboardListsError>>
pub async fn list_dashboard_lists( &self, ) -> Result<DashboardListListResponse, Error<ListDashboardListsError>>
Fetch all of your existing dashboard list definitions.
Sourcepub async fn list_dashboard_lists_with_http_info(
&self,
) -> Result<ResponseContent<DashboardListListResponse>, Error<ListDashboardListsError>>
pub async fn list_dashboard_lists_with_http_info( &self, ) -> Result<ResponseContent<DashboardListListResponse>, Error<ListDashboardListsError>>
Fetch all of your existing dashboard list definitions.
Sourcepub async fn update_dashboard_list(
&self,
list_id: i64,
body: DashboardList,
) -> Result<DashboardList, Error<UpdateDashboardListError>>
pub async fn update_dashboard_list( &self, list_id: i64, body: DashboardList, ) -> Result<DashboardList, Error<UpdateDashboardListError>>
Update the name of a dashboard list.
Examples found in repository?
examples/v1_dashboard-lists_UpdateDashboardList.rs (line 14)
7async fn main() {
8 // there is a valid "dashboard_list" in the system
9 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
10 let body = DashboardList::new("updated Example-Dashboard-List".to_string());
11 let configuration = datadog::Configuration::new();
12 let api = DashboardListsAPI::with_config(configuration);
13 let resp = api
14 .update_dashboard_list(dashboard_list_id.clone(), body)
15 .await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
Sourcepub async fn update_dashboard_list_with_http_info(
&self,
list_id: i64,
body: DashboardList,
) -> Result<ResponseContent<DashboardList>, Error<UpdateDashboardListError>>
pub async fn update_dashboard_list_with_http_info( &self, list_id: i64, body: DashboardList, ) -> Result<ResponseContent<DashboardList>, Error<UpdateDashboardListError>>
Update the name of a dashboard list.
Trait Implementations§
Source§impl Clone for DashboardListsAPI
impl Clone for DashboardListsAPI
Source§fn clone(&self) -> DashboardListsAPI
fn clone(&self) -> DashboardListsAPI
Returns a copy 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 DashboardListsAPI
impl Debug for DashboardListsAPI
Auto Trait Implementations§
impl Freeze for DashboardListsAPI
impl !RefUnwindSafe for DashboardListsAPI
impl Send for DashboardListsAPI
impl Sync for DashboardListsAPI
impl Unpin for DashboardListsAPI
impl !UnwindSafe for DashboardListsAPI
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