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)
6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.get_dashboard_list_items(dashboard_list_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v2_dashboard-lists_CreateDashboardListItems.rs (line 15)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
async fn main() {
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
"q5j-nti-fv6".to_string(),
DashboardType::HOST_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(9223372036854775807, body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_DeleteDashboardListItems.rs (line 16)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
async fn main() {
let body =
DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
"q5j-nti-fv6".to_string(),
DashboardType::HOST_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.delete_dashboard_list_items(9223372036854775807, body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs (line 21)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "dashboard" in the system
let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
dashboard_id.clone(),
DashboardType::CUSTOM_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs (line 22)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "dashboard" in the system
let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
let body =
DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
dashboard_id.clone(),
DashboardType::CUSTOM_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.delete_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs (line 21)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "screenboard_dashboard" in the system
let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
screenboard_dashboard_id.clone(),
DashboardType::CUSTOM_SCREENBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
async fn main() {
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
"q5j-nti-fv6".to_string(),
DashboardType::HOST_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(9223372036854775807, body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v2_dashboard-lists_CreateDashboardListItems_3995409989.rs (line 23)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "dashboard" in the system
let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
dashboard_id.clone(),
DashboardType::CUSTOM_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_CreateDashboardListItems_825696022.rs (line 23)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "screenboard_dashboard" in the system
let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
let body = DashboardListAddItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
screenboard_dashboard_id.clone(),
DashboardType::CUSTOM_SCREENBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.create_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
async fn main() {
let body =
DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
"q5j-nti-fv6".to_string(),
DashboardType::HOST_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.delete_dashboard_list_items(9223372036854775807, body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}More examples
examples/v2_dashboard-lists_DeleteDashboardListItems_2656706656.rs (line 24)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "dashboard" in the system
let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
let body =
DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
dashboard_id.clone(),
DashboardType::CUSTOM_TIMEBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.delete_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}examples/v2_dashboard-lists_DeleteDashboardListItems_3851624753.rs (line 24)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "screenboard_dashboard" in the system
let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
let body =
DashboardListDeleteItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
screenboard_dashboard_id.clone(),
DashboardType::CUSTOM_SCREENBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.delete_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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)
6 7 8 9 10 11 12 13 14 15 16 17 18 19
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.get_dashboard_list_items(dashboard_list_id.clone())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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)
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
async fn main() {
// there is a valid "dashboard_list" in the system
let dashboard_list_id: i64 = std::env::var("DASHBOARD_LIST_ID").unwrap().parse().unwrap();
// there is a valid "screenboard_dashboard" in the system
let screenboard_dashboard_id = std::env::var("SCREENBOARD_DASHBOARD_ID").unwrap();
let body =
DashboardListUpdateItemsRequest::new().dashboards(vec![DashboardListItemRequest::new(
screenboard_dashboard_id.clone(),
DashboardType::CUSTOM_SCREENBOARD,
)]);
let configuration = datadog::Configuration::new();
let api = DashboardListsAPI::with_config(configuration);
let resp = api
.update_dashboard_list_items(dashboard_list_id.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}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 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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit)