#[non_exhaustive]pub struct SharedDashboardUpdateRequest {
pub embeddable_domains: Option<Vec<String>>,
pub expiration: Option<Option<DateTime<Utc>>>,
pub global_time: Option<Option<SharedDashboardUpdateRequestGlobalTime>>,
pub global_time_selectable_enabled: Option<Option<bool>>,
pub invitees: Option<Vec<SharedDashboardInviteesItems>>,
pub selectable_template_vars: Option<Option<Vec<SelectableTemplateVariableItems>>>,
pub share_list: Option<Option<Vec<String>>>,
pub share_type: Option<Option<DashboardShareType>>,
pub status: Option<SharedDashboardStatus>,
pub title: Option<String>,
pub viewing_preferences: Option<ViewingPreferences>,
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
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.embeddable_domains: Option<Vec<String>>
The SharedDashboard
embeddable_domains
.
expiration: Option<Option<DateTime<Utc>>>
The time when an OPEN shared dashboard becomes publicly unavailable.
global_time: Option<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.
invitees: Option<Vec<SharedDashboardInviteesItems>>
The SharedDashboard
invitees
.
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).
status: Option<SharedDashboardStatus>
Active means the dashboard is publicly available. Paused means the dashboard is not publicly available.
title: Option<String>
Title of the shared dashboard.
viewing_preferences: Option<ViewingPreferences>
The viewing preferences for a shared dashboard.
additional_properties: BTreeMap<String, Value>
Implementations§
Sourcepub fn new() -> SharedDashboardUpdateRequest
pub fn new() -> SharedDashboardUpdateRequest
Examples found in repository?
10async fn main() {
11 // there is a valid "shared_dashboard" in the system
12 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
13 let body = SharedDashboardUpdateRequest::new()
14 .global_time(Some(
15 SharedDashboardUpdateRequestGlobalTime::new()
16 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
17 ))
18 .share_list(Some(vec![]))
19 .share_type(Some(DashboardShareType::OPEN));
20 let configuration = datadog::Configuration::new();
21 let api = DashboardsAPI::with_config(configuration);
22 let resp = api
23 .update_public_dashboard(shared_dashboard_token.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
More examples
11async fn main() {
12 // there is a valid "shared_dashboard" in the system
13 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
14 let body = SharedDashboardUpdateRequest::new()
15 .global_time(Some(
16 SharedDashboardUpdateRequestGlobalTime::new()
17 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
18 ))
19 .selectable_template_vars(Some(vec![SelectableTemplateVariableItems::new()
20 .default_value("*".to_string())
21 .name("group_by_var".to_string())
22 .type_(Some("group".to_string()))
23 .visible_tags(Some(vec![
24 "selectableValue1".to_string(),
25 "selectableValue2".to_string(),
26 ]))]))
27 .share_list(Some(vec![]))
28 .share_type(Some(DashboardShareType::OPEN));
29 let configuration = datadog::Configuration::new();
30 let api = DashboardsAPI::with_config(configuration);
31 let resp = api
32 .update_public_dashboard(shared_dashboard_token.clone(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn embeddable_domains(self, value: Vec<String>) -> Self
pub fn expiration(self, value: Option<DateTime<Utc>>) -> Self
Sourcepub fn global_time(
self,
value: Option<SharedDashboardUpdateRequestGlobalTime>,
) -> Self
pub fn global_time( self, value: Option<SharedDashboardUpdateRequestGlobalTime>, ) -> Self
Examples found in repository?
10async fn main() {
11 // there is a valid "shared_dashboard" in the system
12 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
13 let body = SharedDashboardUpdateRequest::new()
14 .global_time(Some(
15 SharedDashboardUpdateRequestGlobalTime::new()
16 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
17 ))
18 .share_list(Some(vec![]))
19 .share_type(Some(DashboardShareType::OPEN));
20 let configuration = datadog::Configuration::new();
21 let api = DashboardsAPI::with_config(configuration);
22 let resp = api
23 .update_public_dashboard(shared_dashboard_token.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
More examples
11async fn main() {
12 // there is a valid "shared_dashboard" in the system
13 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
14 let body = SharedDashboardUpdateRequest::new()
15 .global_time(Some(
16 SharedDashboardUpdateRequestGlobalTime::new()
17 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
18 ))
19 .selectable_template_vars(Some(vec![SelectableTemplateVariableItems::new()
20 .default_value("*".to_string())
21 .name("group_by_var".to_string())
22 .type_(Some("group".to_string()))
23 .visible_tags(Some(vec![
24 "selectableValue1".to_string(),
25 "selectableValue2".to_string(),
26 ]))]))
27 .share_list(Some(vec![]))
28 .share_type(Some(DashboardShareType::OPEN));
29 let configuration = datadog::Configuration::new();
30 let api = DashboardsAPI::with_config(configuration);
31 let resp = api
32 .update_public_dashboard(shared_dashboard_token.clone(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn global_time_selectable_enabled(self, value: Option<bool>) -> Self
pub fn invitees(self, value: Vec<SharedDashboardInviteesItems>) -> Self
Sourcepub fn selectable_template_vars(
self,
value: Option<Vec<SelectableTemplateVariableItems>>,
) -> Self
pub fn selectable_template_vars( self, value: Option<Vec<SelectableTemplateVariableItems>>, ) -> Self
Examples found in repository?
11async fn main() {
12 // there is a valid "shared_dashboard" in the system
13 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
14 let body = SharedDashboardUpdateRequest::new()
15 .global_time(Some(
16 SharedDashboardUpdateRequestGlobalTime::new()
17 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
18 ))
19 .selectable_template_vars(Some(vec![SelectableTemplateVariableItems::new()
20 .default_value("*".to_string())
21 .name("group_by_var".to_string())
22 .type_(Some("group".to_string()))
23 .visible_tags(Some(vec![
24 "selectableValue1".to_string(),
25 "selectableValue2".to_string(),
26 ]))]))
27 .share_list(Some(vec![]))
28 .share_type(Some(DashboardShareType::OPEN));
29 let configuration = datadog::Configuration::new();
30 let api = DashboardsAPI::with_config(configuration);
31 let resp = api
32 .update_public_dashboard(shared_dashboard_token.clone(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Examples found in repository?
10async fn main() {
11 // there is a valid "shared_dashboard" in the system
12 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
13 let body = SharedDashboardUpdateRequest::new()
14 .global_time(Some(
15 SharedDashboardUpdateRequestGlobalTime::new()
16 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
17 ))
18 .share_list(Some(vec![]))
19 .share_type(Some(DashboardShareType::OPEN));
20 let configuration = datadog::Configuration::new();
21 let api = DashboardsAPI::with_config(configuration);
22 let resp = api
23 .update_public_dashboard(shared_dashboard_token.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
More examples
11async fn main() {
12 // there is a valid "shared_dashboard" in the system
13 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
14 let body = SharedDashboardUpdateRequest::new()
15 .global_time(Some(
16 SharedDashboardUpdateRequestGlobalTime::new()
17 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
18 ))
19 .selectable_template_vars(Some(vec![SelectableTemplateVariableItems::new()
20 .default_value("*".to_string())
21 .name("group_by_var".to_string())
22 .type_(Some("group".to_string()))
23 .visible_tags(Some(vec![
24 "selectableValue1".to_string(),
25 "selectableValue2".to_string(),
26 ]))]))
27 .share_list(Some(vec![]))
28 .share_type(Some(DashboardShareType::OPEN));
29 let configuration = datadog::Configuration::new();
30 let api = DashboardsAPI::with_config(configuration);
31 let resp = api
32 .update_public_dashboard(shared_dashboard_token.clone(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Examples found in repository?
10async fn main() {
11 // there is a valid "shared_dashboard" in the system
12 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
13 let body = SharedDashboardUpdateRequest::new()
14 .global_time(Some(
15 SharedDashboardUpdateRequestGlobalTime::new()
16 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
17 ))
18 .share_list(Some(vec![]))
19 .share_type(Some(DashboardShareType::OPEN));
20 let configuration = datadog::Configuration::new();
21 let api = DashboardsAPI::with_config(configuration);
22 let resp = api
23 .update_public_dashboard(shared_dashboard_token.clone(), body)
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
More examples
11async fn main() {
12 // there is a valid "shared_dashboard" in the system
13 let shared_dashboard_token = std::env::var("SHARED_DASHBOARD_TOKEN").unwrap();
14 let body = SharedDashboardUpdateRequest::new()
15 .global_time(Some(
16 SharedDashboardUpdateRequestGlobalTime::new()
17 .live_span(DashboardGlobalTimeLiveSpan::PAST_FIFTEEN_MINUTES),
18 ))
19 .selectable_template_vars(Some(vec![SelectableTemplateVariableItems::new()
20 .default_value("*".to_string())
21 .name("group_by_var".to_string())
22 .type_(Some("group".to_string()))
23 .visible_tags(Some(vec![
24 "selectableValue1".to_string(),
25 "selectableValue2".to_string(),
26 ]))]))
27 .share_list(Some(vec![]))
28 .share_type(Some(DashboardShareType::OPEN));
29 let configuration = datadog::Configuration::new();
30 let api = DashboardsAPI::with_config(configuration);
31 let resp = api
32 .update_public_dashboard(shared_dashboard_token.clone(), body)
33 .await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn status(self, value: SharedDashboardStatus) -> Self
pub fn title(self, value: String) -> Self
pub fn viewing_preferences(self, value: ViewingPreferences) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§fn clone(&self) -> SharedDashboardUpdateRequest
fn clone(&self) -> SharedDashboardUpdateRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§fn eq(&self, other: &SharedDashboardUpdateRequest) -> bool
fn eq(&self, other: &SharedDashboardUpdateRequest) -> bool
self
and other
values to be equal, and is used by ==
.