aws_sdk_cloudtrail/client/
create_dashboard.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateDashboard`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`name(impl Into<String>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::set_name):<br>required: **true**<br><p>The name of the dashboard. The name must be unique to your account.</p> <p>To create the Highlights dashboard, the name must be <code>AWSCloudTrail-Highlights</code>.</p><br>
7    ///   - [`refresh_schedule(RefreshSchedule)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::refresh_schedule) / [`set_refresh_schedule(Option<RefreshSchedule>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::set_refresh_schedule):<br>required: **false**<br><p>The refresh schedule configuration for the dashboard.</p> <p>To create the Highlights dashboard, you must set a refresh schedule and set the <code>Status</code> to <code>ENABLED</code>. The <code>Unit</code> for the refresh schedule must be <code>HOURS</code> and the <code>Value</code> must be <code>6</code>.</p><br>
8    ///   - [`tags_list(Tag)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::tags_list) / [`set_tags_list(Option<Vec::<Tag>>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::set_tags_list):<br>required: **false**<br><p>A list of tags.</p><br>
9    ///   - [`termination_protection_enabled(bool)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::termination_protection_enabled) / [`set_termination_protection_enabled(Option<bool>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::set_termination_protection_enabled):<br>required: **false**<br><p>Specifies whether termination protection is enabled for the dashboard. If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled.</p><br>
10    ///   - [`widgets(RequestWidget)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::widgets) / [`set_widgets(Option<Vec::<RequestWidget>>)`](crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::set_widgets):<br>required: **false**<br><p>An array of widgets for a custom dashboard. A custom dashboard can have a maximum of ten widgets.</p> <p>You do not need to specify widgets for the Highlights dashboard.</p><br>
11    /// - On success, responds with [`CreateDashboardOutput`](crate::operation::create_dashboard::CreateDashboardOutput) with field(s):
12    ///   - [`dashboard_arn(Option<String>)`](crate::operation::create_dashboard::CreateDashboardOutput::dashboard_arn): <p>The ARN for the dashboard.</p>
13    ///   - [`name(Option<String>)`](crate::operation::create_dashboard::CreateDashboardOutput::name): <p>The name of the dashboard.</p>
14    ///   - [`r#type(Option<DashboardType>)`](crate::operation::create_dashboard::CreateDashboardOutput::type): <p>The dashboard type.</p>
15    ///   - [`widgets(Option<Vec::<Widget>>)`](crate::operation::create_dashboard::CreateDashboardOutput::widgets): <p>An array of widgets for the dashboard.</p>
16    ///   - [`tags_list(Option<Vec::<Tag>>)`](crate::operation::create_dashboard::CreateDashboardOutput::tags_list): <p>A list of tags.</p>
17    ///   - [`refresh_schedule(Option<RefreshSchedule>)`](crate::operation::create_dashboard::CreateDashboardOutput::refresh_schedule): <p>The refresh schedule for the dashboard, if configured.</p>
18    ///   - [`termination_protection_enabled(Option<bool>)`](crate::operation::create_dashboard::CreateDashboardOutput::termination_protection_enabled): <p>Indicates whether termination protection is enabled for the dashboard.</p>
19    /// - On failure, responds with [`SdkError<CreateDashboardError>`](crate::operation::create_dashboard::CreateDashboardError)
20    pub fn create_dashboard(&self) -> crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder {
21        crate::operation::create_dashboard::builders::CreateDashboardFluentBuilder::new(self.handle.clone())
22    }
23}