aws_sdk_quicksight/operation/create_dashboard/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_dashboard::_create_dashboard_output::CreateDashboardOutputBuilder;
3
4pub use crate::operation::create_dashboard::_create_dashboard_input::CreateDashboardInputBuilder;
5
6impl crate::operation::create_dashboard::builders::CreateDashboardInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_dashboard::CreateDashboardOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_dashboard::CreateDashboardError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_dashboard();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateDashboard`.
24///
25/// <p>Creates a dashboard from either a template or directly with a <code>DashboardDefinition</code>. To first create a template, see the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation.</p>
26/// <p>A dashboard is an entity in Amazon QuickSight that identifies Amazon QuickSight reports, created from analyses. You can share Amazon QuickSight dashboards. With the right permissions, you can create scheduled email reports from them. If you have the correct permissions, you can create a dashboard from a template that exists in a different Amazon Web Services account.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateDashboardFluentBuilder {
29    handle: ::std::sync::Arc<crate::client::Handle>,
30    inner: crate::operation::create_dashboard::builders::CreateDashboardInputBuilder,
31    config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34    crate::client::customize::internal::CustomizableSend<
35        crate::operation::create_dashboard::CreateDashboardOutput,
36        crate::operation::create_dashboard::CreateDashboardError,
37    > for CreateDashboardFluentBuilder
38{
39    fn send(
40        self,
41        config_override: crate::config::Builder,
42    ) -> crate::client::customize::internal::BoxFuture<
43        crate::client::customize::internal::SendResult<
44            crate::operation::create_dashboard::CreateDashboardOutput,
45            crate::operation::create_dashboard::CreateDashboardError,
46        >,
47    > {
48        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49    }
50}
51impl CreateDashboardFluentBuilder {
52    /// Creates a new `CreateDashboardFluentBuilder`.
53    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54        Self {
55            handle,
56            inner: ::std::default::Default::default(),
57            config_override: ::std::option::Option::None,
58        }
59    }
60    /// Access the CreateDashboard as a reference.
61    pub fn as_input(&self) -> &crate::operation::create_dashboard::builders::CreateDashboardInputBuilder {
62        &self.inner
63    }
64    /// Sends the request and returns the response.
65    ///
66    /// If an error occurs, an `SdkError` will be returned with additional details that
67    /// can be matched against.
68    ///
69    /// By default, any retryable failures will be retried twice. Retry behavior
70    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71    /// set when configuring the client.
72    pub async fn send(
73        self,
74    ) -> ::std::result::Result<
75        crate::operation::create_dashboard::CreateDashboardOutput,
76        ::aws_smithy_runtime_api::client::result::SdkError<
77            crate::operation::create_dashboard::CreateDashboardError,
78            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79        >,
80    > {
81        let input = self
82            .inner
83            .build()
84            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85        let runtime_plugins = crate::operation::create_dashboard::CreateDashboard::operation_runtime_plugins(
86            self.handle.runtime_plugins.clone(),
87            &self.handle.conf,
88            self.config_override,
89        );
90        crate::operation::create_dashboard::CreateDashboard::orchestrate(&runtime_plugins, input).await
91    }
92
93    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94    pub fn customize(
95        self,
96    ) -> crate::client::customize::CustomizableOperation<
97        crate::operation::create_dashboard::CreateDashboardOutput,
98        crate::operation::create_dashboard::CreateDashboardError,
99        Self,
100    > {
101        crate::client::customize::CustomizableOperation::new(self)
102    }
103    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104        self.set_config_override(::std::option::Option::Some(config_override.into()));
105        self
106    }
107
108    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109        self.config_override = config_override;
110        self
111    }
112    /// <p>The ID of the Amazon Web Services account where you want to create the dashboard.</p>
113    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114        self.inner = self.inner.aws_account_id(input.into());
115        self
116    }
117    /// <p>The ID of the Amazon Web Services account where you want to create the dashboard.</p>
118    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119        self.inner = self.inner.set_aws_account_id(input);
120        self
121    }
122    /// <p>The ID of the Amazon Web Services account where you want to create the dashboard.</p>
123    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
124        self.inner.get_aws_account_id()
125    }
126    /// <p>The ID for the dashboard, also added to the IAM policy.</p>
127    pub fn dashboard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.dashboard_id(input.into());
129        self
130    }
131    /// <p>The ID for the dashboard, also added to the IAM policy.</p>
132    pub fn set_dashboard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_dashboard_id(input);
134        self
135    }
136    /// <p>The ID for the dashboard, also added to the IAM policy.</p>
137    pub fn get_dashboard_id(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_dashboard_id()
139    }
140    /// <p>The display name of the dashboard.</p>
141    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.name(input.into());
143        self
144    }
145    /// <p>The display name of the dashboard.</p>
146    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_name(input);
148        self
149    }
150    /// <p>The display name of the dashboard.</p>
151    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_name()
153    }
154    /// <p>The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
155    pub fn parameters(mut self, input: crate::types::Parameters) -> Self {
156        self.inner = self.inner.parameters(input);
157        self
158    }
159    /// <p>The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
160    pub fn set_parameters(mut self, input: ::std::option::Option<crate::types::Parameters>) -> Self {
161        self.inner = self.inner.set_parameters(input);
162        self
163    }
164    /// <p>The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values.</p>
165    pub fn get_parameters(&self) -> &::std::option::Option<crate::types::Parameters> {
166        self.inner.get_parameters()
167    }
168    ///
169    /// Appends an item to `Permissions`.
170    ///
171    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
172    ///
173    /// <p>A structure that contains the permissions of the dashboard. You can use this structure for granting permissions by providing a list of IAM action information for each principal ARN.</p>
174    /// <p>To specify no permissions, omit the permissions list.</p>
175    pub fn permissions(mut self, input: crate::types::ResourcePermission) -> Self {
176        self.inner = self.inner.permissions(input);
177        self
178    }
179    /// <p>A structure that contains the permissions of the dashboard. You can use this structure for granting permissions by providing a list of IAM action information for each principal ARN.</p>
180    /// <p>To specify no permissions, omit the permissions list.</p>
181    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>) -> Self {
182        self.inner = self.inner.set_permissions(input);
183        self
184    }
185    /// <p>A structure that contains the permissions of the dashboard. You can use this structure for granting permissions by providing a list of IAM action information for each principal ARN.</p>
186    /// <p>To specify no permissions, omit the permissions list.</p>
187    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>> {
188        self.inner.get_permissions()
189    }
190    /// <p>The entity that you are using as a source when you create the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only create a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to create a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code>ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
191    /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
192    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
193    pub fn source_entity(mut self, input: crate::types::DashboardSourceEntity) -> Self {
194        self.inner = self.inner.source_entity(input);
195        self
196    }
197    /// <p>The entity that you are using as a source when you create the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only create a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to create a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code>ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
198    /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
199    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
200    pub fn set_source_entity(mut self, input: ::std::option::Option<crate::types::DashboardSourceEntity>) -> Self {
201        self.inner = self.inner.set_source_entity(input);
202        self
203    }
204    /// <p>The entity that you are using as a source when you create the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only create a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to create a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code>ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region.</p>
205    /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
206    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
207    pub fn get_source_entity(&self) -> &::std::option::Option<crate::types::DashboardSourceEntity> {
208        self.inner.get_source_entity()
209    }
210    ///
211    /// Appends an item to `Tags`.
212    ///
213    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
214    ///
215    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dashboard.</p>
216    pub fn tags(mut self, input: crate::types::Tag) -> Self {
217        self.inner = self.inner.tags(input);
218        self
219    }
220    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dashboard.</p>
221    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
222        self.inner = self.inner.set_tags(input);
223        self
224    }
225    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dashboard.</p>
226    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
227        self.inner.get_tags()
228    }
229    /// <p>A description for the first version of the dashboard being created.</p>
230    pub fn version_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
231        self.inner = self.inner.version_description(input.into());
232        self
233    }
234    /// <p>A description for the first version of the dashboard being created.</p>
235    pub fn set_version_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.inner = self.inner.set_version_description(input);
237        self
238    }
239    /// <p>A description for the first version of the dashboard being created.</p>
240    pub fn get_version_description(&self) -> &::std::option::Option<::std::string::String> {
241        self.inner.get_version_description()
242    }
243    /// <p>Options for publishing the dashboard when you create it:</p>
244    /// <ul>
245    /// <li>
246    /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
247    /// <li>
248    /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
249    /// <li>
250    /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
251    /// </ul>
252    pub fn dashboard_publish_options(mut self, input: crate::types::DashboardPublishOptions) -> Self {
253        self.inner = self.inner.dashboard_publish_options(input);
254        self
255    }
256    /// <p>Options for publishing the dashboard when you create it:</p>
257    /// <ul>
258    /// <li>
259    /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
260    /// <li>
261    /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
262    /// <li>
263    /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
264    /// </ul>
265    pub fn set_dashboard_publish_options(mut self, input: ::std::option::Option<crate::types::DashboardPublishOptions>) -> Self {
266        self.inner = self.inner.set_dashboard_publish_options(input);
267        self
268    }
269    /// <p>Options for publishing the dashboard when you create it:</p>
270    /// <ul>
271    /// <li>
272    /// <p><code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default.</p></li>
273    /// <li>
274    /// <p><code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p></li>
275    /// <li>
276    /// <p><code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default.</p></li>
277    /// </ul>
278    pub fn get_dashboard_publish_options(&self) -> &::std::option::Option<crate::types::DashboardPublishOptions> {
279        self.inner.get_dashboard_publish_options()
280    }
281    /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that is used in the source entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
282    pub fn theme_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.inner = self.inner.theme_arn(input.into());
284        self
285    }
286    /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that is used in the source entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
287    pub fn set_theme_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288        self.inner = self.inner.set_theme_arn(input);
289        self
290    }
291    /// <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that is used in the source entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
292    pub fn get_theme_arn(&self) -> &::std::option::Option<::std::string::String> {
293        self.inner.get_theme_arn()
294    }
295    /// <p>The definition of a dashboard.</p>
296    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
297    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
298    pub fn definition(mut self, input: crate::types::DashboardVersionDefinition) -> Self {
299        self.inner = self.inner.definition(input);
300        self
301    }
302    /// <p>The definition of a dashboard.</p>
303    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
304    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
305    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::DashboardVersionDefinition>) -> Self {
306        self.inner = self.inner.set_definition(input);
307        self
308    }
309    /// <p>The definition of a dashboard.</p>
310    /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
311    /// <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
312    pub fn get_definition(&self) -> &::std::option::Option<crate::types::DashboardVersionDefinition> {
313        self.inner.get_definition()
314    }
315    /// <p>The option to relax the validation needed to create a dashboard with definition objects. This option skips the validation step for specific errors.</p>
316    pub fn validation_strategy(mut self, input: crate::types::ValidationStrategy) -> Self {
317        self.inner = self.inner.validation_strategy(input);
318        self
319    }
320    /// <p>The option to relax the validation needed to create a dashboard with definition objects. This option skips the validation step for specific errors.</p>
321    pub fn set_validation_strategy(mut self, input: ::std::option::Option<crate::types::ValidationStrategy>) -> Self {
322        self.inner = self.inner.set_validation_strategy(input);
323        self
324    }
325    /// <p>The option to relax the validation needed to create a dashboard with definition objects. This option skips the validation step for specific errors.</p>
326    pub fn get_validation_strategy(&self) -> &::std::option::Option<crate::types::ValidationStrategy> {
327        self.inner.get_validation_strategy()
328    }
329    ///
330    /// Appends an item to `FolderArns`.
331    ///
332    /// To override the contents of this collection use [`set_folder_arns`](Self::set_folder_arns).
333    ///
334    /// <p>When you create the dashboard, Amazon QuickSight adds the dashboard to these folders.</p>
335    pub fn folder_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336        self.inner = self.inner.folder_arns(input.into());
337        self
338    }
339    /// <p>When you create the dashboard, Amazon QuickSight adds the dashboard to these folders.</p>
340    pub fn set_folder_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
341        self.inner = self.inner.set_folder_arns(input);
342        self
343    }
344    /// <p>When you create the dashboard, Amazon QuickSight adds the dashboard to these folders.</p>
345    pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
346        self.inner.get_folder_arns()
347    }
348    /// <p>A structure that contains the permissions of a shareable link to the dashboard.</p>
349    pub fn link_sharing_configuration(mut self, input: crate::types::LinkSharingConfiguration) -> Self {
350        self.inner = self.inner.link_sharing_configuration(input);
351        self
352    }
353    /// <p>A structure that contains the permissions of a shareable link to the dashboard.</p>
354    pub fn set_link_sharing_configuration(mut self, input: ::std::option::Option<crate::types::LinkSharingConfiguration>) -> Self {
355        self.inner = self.inner.set_link_sharing_configuration(input);
356        self
357    }
358    /// <p>A structure that contains the permissions of a shareable link to the dashboard.</p>
359    pub fn get_link_sharing_configuration(&self) -> &::std::option::Option<crate::types::LinkSharingConfiguration> {
360        self.inner.get_link_sharing_configuration()
361    }
362    ///
363    /// Appends an item to `LinkEntities`.
364    ///
365    /// To override the contents of this collection use [`set_link_entities`](Self::set_link_entities).
366    ///
367    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
368    pub fn link_entities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369        self.inner = self.inner.link_entities(input.into());
370        self
371    }
372    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
373    pub fn set_link_entities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
374        self.inner = self.inner.set_link_entities(input);
375        self
376    }
377    /// <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>
378    pub fn get_link_entities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
379        self.inner.get_link_entities()
380    }
381}