aws_sdk_qbusiness/operation/create_application/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_application::_create_application_output::CreateApplicationOutputBuilder;
3
4pub use crate::operation::create_application::_create_application_input::CreateApplicationInputBuilder;
5
6impl crate::operation::create_application::builders::CreateApplicationInputBuilder {
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_application::CreateApplicationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_application::CreateApplicationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_application();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateApplication`.
24///
25/// <p>Creates an Amazon Q Business application.</p><note>
26/// <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are also available in Amazon Q Business Lite. For information on what's included in Amazon Q Business Lite and what's included in Amazon Q Business Pro, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#user-sub-tiers">Amazon Q Business tiers</a>. You must use the Amazon Q Business console to assign subscription tiers to users.</p>
27/// <p>An Amazon Q Apps service linked role will be created if it's absent in the Amazon Web Services account when <code>QAppsConfiguration</code> is enabled in the request. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles-qapps.html"> Using service-linked roles for Q Apps</a>.</p>
28/// <p>When you create an application, Amazon Q Business may securely transmit data for processing from your selected Amazon Web Services region, but within your geography. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/cross-region-inference.html">Cross region inference in Amazon Q Business</a>.</p>
29/// </note>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct CreateApplicationFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::create_application::builders::CreateApplicationInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::create_application::CreateApplicationOutput,
39        crate::operation::create_application::CreateApplicationError,
40    > for CreateApplicationFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::create_application::CreateApplicationOutput,
48            crate::operation::create_application::CreateApplicationError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl CreateApplicationFluentBuilder {
55    /// Creates a new `CreateApplicationFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the CreateApplication as a reference.
64    pub fn as_input(&self) -> &crate::operation::create_application::builders::CreateApplicationInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::create_application::CreateApplicationOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::create_application::CreateApplicationError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::create_application::CreateApplication::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::create_application::CreateApplication::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::create_application::CreateApplicationOutput,
101        crate::operation::create_application::CreateApplicationError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// <p>A name for the Amazon Q Business application.</p>
116    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.inner = self.inner.display_name(input.into());
118        self
119    }
120    /// <p>A name for the Amazon Q Business application.</p>
121    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.inner = self.inner.set_display_name(input);
123        self
124    }
125    /// <p>A name for the Amazon Q Business application.</p>
126    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
127        self.inner.get_display_name()
128    }
129    /// <p>The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions">service linked role (SLR)</a> and use it as the application's role.</p>
130    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.inner = self.inner.role_arn(input.into());
132        self
133    }
134    /// <p>The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions">service linked role (SLR)</a> and use it as the application's role.</p>
135    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.inner = self.inner.set_role_arn(input);
137        self
138    }
139    /// <p>The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions">service linked role (SLR)</a> and use it as the application's role.</p>
140    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
141        self.inner.get_role_arn()
142    }
143    /// <p>The authentication type being used by a Amazon Q Business application.</p>
144    pub fn identity_type(mut self, input: crate::types::IdentityType) -> Self {
145        self.inner = self.inner.identity_type(input);
146        self
147    }
148    /// <p>The authentication type being used by a Amazon Q Business application.</p>
149    pub fn set_identity_type(mut self, input: ::std::option::Option<crate::types::IdentityType>) -> Self {
150        self.inner = self.inner.set_identity_type(input);
151        self
152    }
153    /// <p>The authentication type being used by a Amazon Q Business application.</p>
154    pub fn get_identity_type(&self) -> &::std::option::Option<crate::types::IdentityType> {
155        self.inner.get_identity_type()
156    }
157    /// <p>The Amazon Resource Name (ARN) of an identity provider being used by an Amazon Q Business application.</p>
158    pub fn iam_identity_provider_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.iam_identity_provider_arn(input.into());
160        self
161    }
162    /// <p>The Amazon Resource Name (ARN) of an identity provider being used by an Amazon Q Business application.</p>
163    pub fn set_iam_identity_provider_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_iam_identity_provider_arn(input);
165        self
166    }
167    /// <p>The Amazon Resource Name (ARN) of an identity provider being used by an Amazon Q Business application.</p>
168    pub fn get_iam_identity_provider_arn(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_iam_identity_provider_arn()
170    }
171    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.</p>
172    pub fn identity_center_instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.inner = self.inner.identity_center_instance_arn(input.into());
174        self
175    }
176    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.</p>
177    pub fn set_identity_center_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.inner = self.inner.set_identity_center_instance_arn(input);
179        self
180    }
181    /// <p>The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.</p>
182    pub fn get_identity_center_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
183        self.inner.get_identity_center_instance_arn()
184    }
185    ///
186    /// Appends an item to `clientIdsForOIDC`.
187    ///
188    /// To override the contents of this collection use [`set_client_ids_for_oidc`](Self::set_client_ids_for_oidc).
189    ///
190    /// <p>The OIDC client ID for a Amazon Q Business application.</p>
191    pub fn client_ids_for_oidc(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192        self.inner = self.inner.client_ids_for_oidc(input.into());
193        self
194    }
195    /// <p>The OIDC client ID for a Amazon Q Business application.</p>
196    pub fn set_client_ids_for_oidc(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
197        self.inner = self.inner.set_client_ids_for_oidc(input);
198        self
199    }
200    /// <p>The OIDC client ID for a Amazon Q Business application.</p>
201    pub fn get_client_ids_for_oidc(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
202        self.inner.get_client_ids_for_oidc()
203    }
204    /// <p>A description for the Amazon Q Business application.</p>
205    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206        self.inner = self.inner.description(input.into());
207        self
208    }
209    /// <p>A description for the Amazon Q Business application.</p>
210    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211        self.inner = self.inner.set_description(input);
212        self
213    }
214    /// <p>A description for the Amazon Q Business application.</p>
215    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
216        self.inner.get_description()
217    }
218    /// <p>The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.</p>
219    pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
220        self.inner = self.inner.encryption_configuration(input);
221        self
222    }
223    /// <p>The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.</p>
224    pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
225        self.inner = self.inner.set_encryption_configuration(input);
226        self
227    }
228    /// <p>The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.</p>
229    pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
230        self.inner.get_encryption_configuration()
231    }
232    ///
233    /// Appends an item to `tags`.
234    ///
235    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
236    ///
237    /// <p>A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
238    pub fn tags(mut self, input: crate::types::Tag) -> Self {
239        self.inner = self.inner.tags(input);
240        self
241    }
242    /// <p>A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
243    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
244        self.inner = self.inner.set_tags(input);
245        self
246    }
247    /// <p>A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.</p>
248    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
249        self.inner.get_tags()
250    }
251    /// <p>A token that you provide to identify the request to create your Amazon Q Business application.</p>
252    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253        self.inner = self.inner.client_token(input.into());
254        self
255    }
256    /// <p>A token that you provide to identify the request to create your Amazon Q Business application.</p>
257    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.inner = self.inner.set_client_token(input);
259        self
260    }
261    /// <p>A token that you provide to identify the request to create your Amazon Q Business application.</p>
262    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
263        self.inner.get_client_token()
264    }
265    /// <p>An option to allow end users to upload files directly during chat.</p>
266    pub fn attachments_configuration(mut self, input: crate::types::AttachmentsConfiguration) -> Self {
267        self.inner = self.inner.attachments_configuration(input);
268        self
269    }
270    /// <p>An option to allow end users to upload files directly during chat.</p>
271    pub fn set_attachments_configuration(mut self, input: ::std::option::Option<crate::types::AttachmentsConfiguration>) -> Self {
272        self.inner = self.inner.set_attachments_configuration(input);
273        self
274    }
275    /// <p>An option to allow end users to upload files directly during chat.</p>
276    pub fn get_attachments_configuration(&self) -> &::std::option::Option<crate::types::AttachmentsConfiguration> {
277        self.inner.get_attachments_configuration()
278    }
279    /// <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
280    pub fn q_apps_configuration(mut self, input: crate::types::QAppsConfiguration) -> Self {
281        self.inner = self.inner.q_apps_configuration(input);
282        self
283    }
284    /// <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
285    pub fn set_q_apps_configuration(mut self, input: ::std::option::Option<crate::types::QAppsConfiguration>) -> Self {
286        self.inner = self.inner.set_q_apps_configuration(input);
287        self
288    }
289    /// <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
290    pub fn get_q_apps_configuration(&self) -> &::std::option::Option<crate::types::QAppsConfiguration> {
291        self.inner.get_q_apps_configuration()
292    }
293    /// <p>Configuration information about chat response personalization. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/personalizing-chat-responses.html">Personalizing chat responses</a></p>
294    pub fn personalization_configuration(mut self, input: crate::types::PersonalizationConfiguration) -> Self {
295        self.inner = self.inner.personalization_configuration(input);
296        self
297    }
298    /// <p>Configuration information about chat response personalization. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/personalizing-chat-responses.html">Personalizing chat responses</a></p>
299    pub fn set_personalization_configuration(mut self, input: ::std::option::Option<crate::types::PersonalizationConfiguration>) -> Self {
300        self.inner = self.inner.set_personalization_configuration(input);
301        self
302    }
303    /// <p>Configuration information about chat response personalization. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/personalizing-chat-responses.html">Personalizing chat responses</a></p>
304    pub fn get_personalization_configuration(&self) -> &::std::option::Option<crate::types::PersonalizationConfiguration> {
305        self.inner.get_personalization_configuration()
306    }
307    /// <p>The Amazon QuickSight configuration for an Amazon Q Business application that uses QuickSight for authentication. This configuration is required if your application uses QuickSight as the identity provider. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/create-quicksight-integrated-application.html">Creating an Amazon QuickSight integrated application</a>.</p>
308    pub fn quick_sight_configuration(mut self, input: crate::types::QuickSightConfiguration) -> Self {
309        self.inner = self.inner.quick_sight_configuration(input);
310        self
311    }
312    /// <p>The Amazon QuickSight configuration for an Amazon Q Business application that uses QuickSight for authentication. This configuration is required if your application uses QuickSight as the identity provider. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/create-quicksight-integrated-application.html">Creating an Amazon QuickSight integrated application</a>.</p>
313    pub fn set_quick_sight_configuration(mut self, input: ::std::option::Option<crate::types::QuickSightConfiguration>) -> Self {
314        self.inner = self.inner.set_quick_sight_configuration(input);
315        self
316    }
317    /// <p>The Amazon QuickSight configuration for an Amazon Q Business application that uses QuickSight for authentication. This configuration is required if your application uses QuickSight as the identity provider. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/create-quicksight-integrated-application.html">Creating an Amazon QuickSight integrated application</a>.</p>
318    pub fn get_quick_sight_configuration(&self) -> &::std::option::Option<crate::types::QuickSightConfiguration> {
319        self.inner.get_quick_sight_configuration()
320    }
321}