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?
examples/v2_dashboard-lists_GetDashboardListItems.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
12 .get_dashboard_list_items(dashboard_list_id.clone())
13 .await;
14 if let Ok(value) = resp {
15 println!("{:#?}", value);
16 } else {
17 println!("{:#?}", resp.unwrap_err());
18 }
19}
More examples
examples/v2_dashboard-lists_CreateDashboardListItems.rs (line 15)
9async fn main() {
10 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
11 "q5j-nti-fv6".to_string(),
12 DashboardType::HOST_TIMEBOARD,
13 )]);
14 let configuration = datadog::Configuration::new();
15 let api = DashboardListsAPI::with_config(configuration);
16 let resp = api
17 .create_dashboard_list_items(9223372036854775807, body)
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
examples/v2_dashboard-lists_DeleteDashboardListItems.rs (line 16)
9async fn main() {
10 let body =
11 DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
12 "q5j-nti-fv6".to_string(),
13 DashboardType::HOST_TIMEBOARD,
14 )]);
15 let configuration = datadog::Configuration::new();
16 let api = DashboardListsAPI::with_config(configuration);
17 let resp = api
18 .delete_dashboard_list_items(9223372036854775807, body)
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs (line 21)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "dashboard" in the system
15 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
16 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
17 dashboard_id.clone(),
18 DashboardType::CUSTOM_TIMEBOARD,
19 )]);
20 let configuration = datadog::Configuration::new();
21 let api = DashboardListsAPI::with_config(configuration);
22 let resp = api
23 .create_dashboard_list_items(dashboard_list_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs (line 22)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "dashboard" in the system
15 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
16 let body =
17 DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
18 dashboard_id.clone(),
19 DashboardType::CUSTOM_TIMEBOARD,
20 )]);
21 let configuration = datadog::Configuration::new();
22 let api = DashboardListsAPI::with_config(configuration);
23 let resp = api
24 .delete_dashboard_list_items(dashboard_list_id.clone(), body)
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs (line 21)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "screenboard_dashboard" in the system
15 let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
16 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
17 screenboard_dashboard_id.clone(),
18 DashboardType::CUSTOM_SCREENBOARD,
19 )]);
20 let configuration = datadog::Configuration::new();
21 let api = DashboardListsAPI::with_config(configuration);
22 let resp = api
23 .create_dashboard_list_items(dashboard_list_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Additional examples can be found in:
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_dashboard_list_items(
&self,
dashboard_list_id: i64,
body: DashboardListAddItemsRequest,
) -> Result<DashboardListAddItemsResponse, Error<CreateDashboardListItemsError>>
pub async fn create_dashboard_list_items( &self, dashboard_list_id: i64, body: DashboardListAddItemsRequest, ) -> Result<DashboardListAddItemsResponse, Error<CreateDashboardListItemsError>>
Add dashboards to an existing dashboard list.
Examples found in repository?
examples/v2_dashboard-lists_CreateDashboardListItems.rs (line 17)
9async fn main() {
10 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
11 "q5j-nti-fv6".to_string(),
12 DashboardType::HOST_TIMEBOARD,
13 )]);
14 let configuration = datadog::Configuration::new();
15 let api = DashboardListsAPI::with_config(configuration);
16 let resp = api
17 .create_dashboard_list_items(9223372036854775807, body)
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs (line 23)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "dashboard" in the system
15 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
16 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
17 dashboard_id.clone(),
18 DashboardType::CUSTOM_TIMEBOARD,
19 )]);
20 let configuration = datadog::Configuration::new();
21 let api = DashboardListsAPI::with_config(configuration);
22 let resp = api
23 .create_dashboard_list_items(dashboard_list_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs (line 23)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "screenboard_dashboard" in the system
15 let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
16 let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
17 screenboard_dashboard_id.clone(),
18 DashboardType::CUSTOM_SCREENBOARD,
19 )]);
20 let configuration = datadog::Configuration::new();
21 let api = DashboardListsAPI::with_config(configuration);
22 let resp = api
23 .create_dashboard_list_items(dashboard_list_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub async fn create_dashboard_list_items_with_http_info(
&self,
dashboard_list_id: i64,
body: DashboardListAddItemsRequest,
) -> Result<ResponseContent<DashboardListAddItemsResponse>, Error<CreateDashboardListItemsError>>
pub async fn create_dashboard_list_items_with_http_info( &self, dashboard_list_id: i64, body: DashboardListAddItemsRequest, ) -> Result<ResponseContent<DashboardListAddItemsResponse>, Error<CreateDashboardListItemsError>>
Add dashboards to an existing dashboard list.
Sourcepub async fn delete_dashboard_list_items(
&self,
dashboard_list_id: i64,
body: DashboardListDeleteItemsRequest,
) -> Result<DashboardListDeleteItemsResponse, Error<DeleteDashboardListItemsError>>
pub async fn delete_dashboard_list_items( &self, dashboard_list_id: i64, body: DashboardListDeleteItemsRequest, ) -> Result<DashboardListDeleteItemsResponse, Error<DeleteDashboardListItemsError>>
Delete dashboards from an existing dashboard list.
Examples found in repository?
examples/v2_dashboard-lists_DeleteDashboardListItems.rs (line 18)
9async fn main() {
10 let body =
11 DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
12 "q5j-nti-fv6".to_string(),
13 DashboardType::HOST_TIMEBOARD,
14 )]);
15 let configuration = datadog::Configuration::new();
16 let api = DashboardListsAPI::with_config(configuration);
17 let resp = api
18 .delete_dashboard_list_items(9223372036854775807, body)
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
More examples
examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs (line 24)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "dashboard" in the system
15 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
16 let body =
17 DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
18 dashboard_id.clone(),
19 DashboardType::CUSTOM_TIMEBOARD,
20 )]);
21 let configuration = datadog::Configuration::new();
22 let api = DashboardListsAPI::with_config(configuration);
23 let resp = api
24 .delete_dashboard_list_items(dashboard_list_id.clone(), body)
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs (line 24)
10async fn main() {
11 // there is a valid "dashboard_list" in the system
12 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
13
14 // there is a valid "screenboard_dashboard" in the system
15 let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
16 let body =
17 DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
18 screenboard_dashboard_id.clone(),
19 DashboardType::CUSTOM_SCREENBOARD,
20 )]);
21 let configuration = datadog::Configuration::new();
22 let api = DashboardListsAPI::with_config(configuration);
23 let resp = api
24 .delete_dashboard_list_items(dashboard_list_id.clone(), body)
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
Sourcepub async fn delete_dashboard_list_items_with_http_info(
&self,
dashboard_list_id: i64,
body: DashboardListDeleteItemsRequest,
) -> Result<ResponseContent<DashboardListDeleteItemsResponse>, Error<DeleteDashboardListItemsError>>
pub async fn delete_dashboard_list_items_with_http_info( &self, dashboard_list_id: i64, body: DashboardListDeleteItemsRequest, ) -> Result<ResponseContent<DashboardListDeleteItemsResponse>, Error<DeleteDashboardListItemsError>>
Delete dashboards from an existing dashboard list.
Sourcepub async fn get_dashboard_list_items(
&self,
dashboard_list_id: i64,
) -> Result<DashboardListItems, Error<GetDashboardListItemsError>>
pub async fn get_dashboard_list_items( &self, dashboard_list_id: i64, ) -> Result<DashboardListItems, Error<GetDashboardListItemsError>>
Fetch the dashboard list’s dashboard definitions.
Examples found in repository?
examples/v2_dashboard-lists_GetDashboardListItems.rs (line 12)
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
12 .get_dashboard_list_items(dashboard_list_id.clone())
13 .await;
14 if let Ok(value) = resp {
15 println!("{:#?}", value);
16 } else {
17 println!("{:#?}", resp.unwrap_err());
18 }
19}
Sourcepub async fn get_dashboard_list_items_with_http_info(
&self,
dashboard_list_id: i64,
) -> Result<ResponseContent<DashboardListItems>, Error<GetDashboardListItemsError>>
pub async fn get_dashboard_list_items_with_http_info( &self, dashboard_list_id: i64, ) -> Result<ResponseContent<DashboardListItems>, Error<GetDashboardListItemsError>>
Fetch the dashboard list’s dashboard definitions.
Sourcepub async fn update_dashboard_list_items(
&self,
dashboard_list_id: i64,
body: DashboardListUpdateItemsRequest,
) -> Result<DashboardListUpdateItemsResponse, Error<UpdateDashboardListItemsError>>
pub async fn update_dashboard_list_items( &self, dashboard_list_id: i64, body: DashboardListUpdateItemsRequest, ) -> Result<DashboardListUpdateItemsResponse, Error<UpdateDashboardListItemsError>>
Update dashboards of an existing dashboard list.
Examples found in repository?
examples/v2_dashboard-lists_UpdateDashboardListItems.rs (line 23)
9async fn main() {
10 // there is a valid "dashboard_list" in the system
11 let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
12
13 // there is a valid "screenboard_dashboard" in the system
14 let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
15 let body =
16 DashboardListUpdateItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
17 screenboard_dashboard_id.clone(),
18 DashboardType::CUSTOM_SCREENBOARD,
19 )]);
20 let configuration = datadog::Configuration::new();
21 let api = DashboardListsAPI::with_config(configuration);
22 let resp = api
23 .update_dashboard_list_items(dashboard_list_id.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub async fn update_dashboard_list_items_with_http_info(
&self,
dashboard_list_id: i64,
body: DashboardListUpdateItemsRequest,
) -> Result<ResponseContent<DashboardListUpdateItemsResponse>, Error<UpdateDashboardListItemsError>>
pub async fn update_dashboard_list_items_with_http_info( &self, dashboard_list_id: i64, body: DashboardListUpdateItemsRequest, ) -> Result<ResponseContent<DashboardListUpdateItemsResponse>, Error<UpdateDashboardListItemsError>>
Update dashboards of an existing dashboard list.
Trait Implementations§
Source§impl Clone for DashboardListsAPI
impl Clone for DashboardListsAPI
Source§fn clone(&self) -> DashboardListsAPI
fn clone(&self) -> DashboardListsAPI
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 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