Struct datadog_api_client::datadogV1::model::model_shared_dashboard_update_request::SharedDashboardUpdateRequest
source · #[non_exhaustive]pub struct SharedDashboardUpdateRequest {
pub global_time: Option<SharedDashboardUpdateRequestGlobalTime>,
pub global_time_selectable_enabled: Option<Option<bool>>,
pub selectable_template_vars: Option<Option<Vec<SelectableTemplateVariableItems>>>,
pub share_list: Option<Option<Vec<String>>>,
pub share_type: Option<Option<DashboardShareType>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Update a shared dashboard’s settings.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.global_time: Option<SharedDashboardUpdateRequestGlobalTime>Timeframe setting for the shared dashboard.
global_time_selectable_enabled: Option<Option<bool>>Whether to allow viewers to select a different global time setting for the shared dashboard.
selectable_template_vars: Option<Option<Vec<SelectableTemplateVariableItems>>>List of objects representing template variables on the shared dashboard which can have selectable values.
List of email addresses that can be given access to the shared dashboard.
Type of sharing access (either open to anyone who has the public URL or invite-only).
additional_properties: BTreeMap<String, Value>Implementations§
sourcepub fn new(
global_time: Option<SharedDashboardUpdateRequestGlobalTime>,
) -> SharedDashboardUpdateRequest
pub fn new( global_time: Option<SharedDashboardUpdateRequestGlobalTime>, ) -> SharedDashboardUpdateRequest
Examples found in repository?
examples/v1_dashboards_UpdatePublicDashboard.rs (lines 13-16)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
async fn main() {
// there is a valid "shared_dashboard" in the system
let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
let body = SharedDashboardUpdateRequest::new(Some(
SharedDashboardUpdateRequestGlobalTime::new()
.live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
))
.share_list(Some(vec![]))
.share_type(Some(DashboardShareType::OPEN));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api
.update_public_dashboard(shared_dashboard_token.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn global_time_selectable_enabled(self, value: Option<bool>) -> Self
pub fn selectable_template_vars( self, value: Option<Vec<SelectableTemplateVariableItems>>, ) -> Self
Examples found in repository?
examples/v1_dashboards_UpdatePublicDashboard.rs (line 17)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
async fn main() {
// there is a valid "shared_dashboard" in the system
let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
let body = SharedDashboardUpdateRequest::new(Some(
SharedDashboardUpdateRequestGlobalTime::new()
.live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
))
.share_list(Some(vec![]))
.share_type(Some(DashboardShareType::OPEN));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api
.update_public_dashboard(shared_dashboard_token.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}Examples found in repository?
examples/v1_dashboards_UpdatePublicDashboard.rs (line 18)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
async fn main() {
// there is a valid "shared_dashboard" in the system
let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
let body = SharedDashboardUpdateRequest::new(Some(
SharedDashboardUpdateRequestGlobalTime::new()
.live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
))
.share_list(Some(vec![]))
.share_type(Some(DashboardShareType::OPEN));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api
.update_public_dashboard(shared_dashboard_token.clone(), body)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§fn clone(&self) -> SharedDashboardUpdateRequest
fn clone(&self) -> SharedDashboardUpdateRequest
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§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§fn eq(&self, other: &SharedDashboardUpdateRequest) -> bool
fn eq(&self, other: &SharedDashboardUpdateRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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)