#[non_exhaustive]pub struct SharedDashboard {Show 19 fields
pub author: Option<SharedDashboardAuthor>,
pub created: Option<DateTime<Utc>>,
pub dashboard_id: String,
pub dashboard_type: DashboardType,
pub embeddable_domains: Option<Vec<String>>,
pub expiration: Option<Option<DateTime<Utc>>>,
pub global_time: Option<DashboardGlobalTime>,
pub global_time_selectable_enabled: Option<Option<bool>>,
pub invitees: Option<Vec<SharedDashboardInviteesItems>>,
pub last_accessed: Option<Option<DateTime<Utc>>>,
pub public_url: Option<String>,
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 token: Option<String>,
pub viewing_preferences: Option<ViewingPreferences>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The metadata object associated with how a dashboard has been/will be shared.
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.User who shared the dashboard.
created: Option<DateTime<Utc>>
Date the dashboard was shared.
dashboard_id: String
ID of the dashboard to share.
dashboard_type: DashboardType
The type of the associated private dashboard.
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<DashboardGlobalTime>
Object containing the live span selection for the 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
.
last_accessed: Option<Option<DateTime<Utc>>>
The last time the shared dashboard was accessed. Null if never accessed.
public_url: Option<String>
URL of 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 receive an invitation to 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.
token: Option<String>
A unique token assigned to the shared dashboard.
viewing_preferences: Option<ViewingPreferences>
The viewing preferences for a shared dashboard.
additional_properties: BTreeMap<String, Value>
Implementations§
Sourcepub fn new(
dashboard_id: String,
dashboard_type: DashboardType,
) -> SharedDashboard
pub fn new( dashboard_id: String, dashboard_type: DashboardType, ) -> SharedDashboard
Examples found in repository?
11async fn main() {
12 // there is a valid "dashboard" in the system
13 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
14 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
15 .global_time(
16 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
17 )
18 .share_type(Some(DashboardShareType::OPEN));
19 let configuration = datadog::Configuration::new();
20 let api = DashboardsAPI::with_config(configuration);
21 let resp = api.create_public_dashboard(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
More examples
12async fn main() {
13 // there is a valid "dashboard" in the system
14 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
15 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
16 .global_time(
17 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
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_type(Some(DashboardShareType::OPEN));
28 let configuration = datadog::Configuration::new();
29 let api = DashboardsAPI::with_config(configuration);
30 let resp = api.create_public_dashboard(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
pub fn created(self, value: DateTime<Utc>) -> Self
pub fn embeddable_domains(self, value: Vec<String>) -> Self
pub fn expiration(self, value: Option<DateTime<Utc>>) -> Self
Sourcepub fn global_time(self, value: DashboardGlobalTime) -> Self
pub fn global_time(self, value: DashboardGlobalTime) -> Self
Examples found in repository?
11async fn main() {
12 // there is a valid "dashboard" in the system
13 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
14 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
15 .global_time(
16 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
17 )
18 .share_type(Some(DashboardShareType::OPEN));
19 let configuration = datadog::Configuration::new();
20 let api = DashboardsAPI::with_config(configuration);
21 let resp = api.create_public_dashboard(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
More examples
12async fn main() {
13 // there is a valid "dashboard" in the system
14 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
15 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
16 .global_time(
17 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
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_type(Some(DashboardShareType::OPEN));
28 let configuration = datadog::Configuration::new();
29 let api = DashboardsAPI::with_config(configuration);
30 let resp = api.create_public_dashboard(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
pub fn global_time_selectable_enabled(self, value: Option<bool>) -> Self
pub fn invitees(self, value: Vec<SharedDashboardInviteesItems>) -> Self
pub fn last_accessed(self, value: Option<DateTime<Utc>>) -> Self
pub fn public_url(self, value: String) -> 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?
12async fn main() {
13 // there is a valid "dashboard" in the system
14 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
15 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
16 .global_time(
17 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
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_type(Some(DashboardShareType::OPEN));
28 let configuration = datadog::Configuration::new();
29 let api = DashboardsAPI::with_config(configuration);
30 let resp = api.create_public_dashboard(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
Examples found in repository?
11async fn main() {
12 // there is a valid "dashboard" in the system
13 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
14 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
15 .global_time(
16 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
17 )
18 .share_type(Some(DashboardShareType::OPEN));
19 let configuration = datadog::Configuration::new();
20 let api = DashboardsAPI::with_config(configuration);
21 let resp = api.create_public_dashboard(body).await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
More examples
12async fn main() {
13 // there is a valid "dashboard" in the system
14 let dashboard_id = std::env::var("DASHBOARD_ID").unwrap();
15 let body = SharedDashboard::new(dashboard_id.clone(), DashboardType::CUSTOM_TIMEBOARD)
16 .global_time(
17 DashboardGlobalTime::new().live_span(DashboardGlobalTimeLiveSpan::PAST_ONE_HOUR),
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_type(Some(DashboardShareType::OPEN));
28 let configuration = datadog::Configuration::new();
29 let api = DashboardsAPI::with_config(configuration);
30 let resp = api.create_public_dashboard(body).await;
31 if let Ok(value) = resp {
32 println!("{:#?}", value);
33 } else {
34 println!("{:#?}", resp.unwrap_err());
35 }
36}
pub fn status(self, value: SharedDashboardStatus) -> Self
pub fn title(self, value: String) -> Self
pub fn token(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) -> SharedDashboard
fn clone(&self) -> SharedDashboard
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more