aws_sdk_amplify/operation/create_app/
_create_app_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request structure used to create apps in Amplify.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct CreateAppInput {
7    /// <p>The name of the Amplify app.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The description of the Amplify app.</p>
10    pub description: ::std::option::Option<::std::string::String>,
11    /// <p>The Git repository for the Amplify app.</p>
12    pub repository: ::std::option::Option<::std::string::String>,
13    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
14    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code> and set the artifacts <code>baseDirectory</code> to <code>.next</code> in the application's build settings. For an example of the build specification settings, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14">Amplify build settings for a Next.js 14 SSG application</a> in the <i>Amplify Hosting User Guide</i>.</p>
15    pub platform: ::std::option::Option<crate::types::Platform>,
16    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
17    pub compute_role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
19    pub iam_service_role_arn: ::std::option::Option<::std::string::String>,
20    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
21    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
22    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p>
23    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
24    pub oauth_token: ::std::option::Option<::std::string::String>,
25    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
26    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
27    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p>
28    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
29    pub access_token: ::std::option::Option<::std::string::String>,
30    /// <p>The environment variables map for an Amplify app.</p>
31    /// <p>For a list of the environment variables that are accessible to Amplify by default, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html">Amplify Environment variables</a> in the <i>Amplify Hosting User Guide</i>.</p>
32    pub environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
33    /// <p>Enables the auto building of branches for an Amplify app.</p>
34    pub enable_branch_auto_build: ::std::option::Option<bool>,
35    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
36    pub enable_branch_auto_deletion: ::std::option::Option<bool>,
37    /// <p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p>
38    pub enable_basic_auth: ::std::option::Option<bool>,
39    /// <p>The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
40    pub basic_auth_credentials: ::std::option::Option<::std::string::String>,
41    /// <p>The custom rewrite and redirect rules for an Amplify app.</p>
42    pub custom_rules: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>,
43    /// <p>The tag for an Amplify app.</p>
44    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
45    /// <p>The build specification (build spec) for an Amplify app.</p>
46    pub build_spec: ::std::option::Option<::std::string::String>,
47    /// <p>The custom HTTP headers for an Amplify app.</p>
48    pub custom_headers: ::std::option::Option<::std::string::String>,
49    /// <p>Enables automated branch creation for an Amplify app.</p>
50    pub enable_auto_branch_creation: ::std::option::Option<bool>,
51    /// <p>The automated branch creation glob patterns for an Amplify app.</p>
52    pub auto_branch_creation_patterns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
53    /// <p>The automated branch creation configuration for an Amplify app.</p>
54    pub auto_branch_creation_config: ::std::option::Option<crate::types::AutoBranchCreationConfig>,
55    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
56    pub job_config: ::std::option::Option<crate::types::JobConfig>,
57    /// <p>The cache configuration for the Amplify app.</p>
58    pub cache_config: ::std::option::Option<crate::types::CacheConfig>,
59}
60impl CreateAppInput {
61    /// <p>The name of the Amplify app.</p>
62    pub fn name(&self) -> ::std::option::Option<&str> {
63        self.name.as_deref()
64    }
65    /// <p>The description of the Amplify app.</p>
66    pub fn description(&self) -> ::std::option::Option<&str> {
67        self.description.as_deref()
68    }
69    /// <p>The Git repository for the Amplify app.</p>
70    pub fn repository(&self) -> ::std::option::Option<&str> {
71        self.repository.as_deref()
72    }
73    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
74    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code> and set the artifacts <code>baseDirectory</code> to <code>.next</code> in the application's build settings. For an example of the build specification settings, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14">Amplify build settings for a Next.js 14 SSG application</a> in the <i>Amplify Hosting User Guide</i>.</p>
75    pub fn platform(&self) -> ::std::option::Option<&crate::types::Platform> {
76        self.platform.as_ref()
77    }
78    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
79    pub fn compute_role_arn(&self) -> ::std::option::Option<&str> {
80        self.compute_role_arn.as_deref()
81    }
82    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
83    pub fn iam_service_role_arn(&self) -> ::std::option::Option<&str> {
84        self.iam_service_role_arn.as_deref()
85    }
86    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
87    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
88    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p>
89    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
90    pub fn oauth_token(&self) -> ::std::option::Option<&str> {
91        self.oauth_token.as_deref()
92    }
93    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
94    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
95    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p>
96    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
97    pub fn access_token(&self) -> ::std::option::Option<&str> {
98        self.access_token.as_deref()
99    }
100    /// <p>The environment variables map for an Amplify app.</p>
101    /// <p>For a list of the environment variables that are accessible to Amplify by default, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html">Amplify Environment variables</a> in the <i>Amplify Hosting User Guide</i>.</p>
102    pub fn environment_variables(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
103        self.environment_variables.as_ref()
104    }
105    /// <p>Enables the auto building of branches for an Amplify app.</p>
106    pub fn enable_branch_auto_build(&self) -> ::std::option::Option<bool> {
107        self.enable_branch_auto_build
108    }
109    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
110    pub fn enable_branch_auto_deletion(&self) -> ::std::option::Option<bool> {
111        self.enable_branch_auto_deletion
112    }
113    /// <p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p>
114    pub fn enable_basic_auth(&self) -> ::std::option::Option<bool> {
115        self.enable_basic_auth
116    }
117    /// <p>The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
118    pub fn basic_auth_credentials(&self) -> ::std::option::Option<&str> {
119        self.basic_auth_credentials.as_deref()
120    }
121    /// <p>The custom rewrite and redirect rules for an Amplify app.</p>
122    ///
123    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.custom_rules.is_none()`.
124    pub fn custom_rules(&self) -> &[crate::types::CustomRule] {
125        self.custom_rules.as_deref().unwrap_or_default()
126    }
127    /// <p>The tag for an Amplify app.</p>
128    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
129        self.tags.as_ref()
130    }
131    /// <p>The build specification (build spec) for an Amplify app.</p>
132    pub fn build_spec(&self) -> ::std::option::Option<&str> {
133        self.build_spec.as_deref()
134    }
135    /// <p>The custom HTTP headers for an Amplify app.</p>
136    pub fn custom_headers(&self) -> ::std::option::Option<&str> {
137        self.custom_headers.as_deref()
138    }
139    /// <p>Enables automated branch creation for an Amplify app.</p>
140    pub fn enable_auto_branch_creation(&self) -> ::std::option::Option<bool> {
141        self.enable_auto_branch_creation
142    }
143    /// <p>The automated branch creation glob patterns for an Amplify app.</p>
144    ///
145    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.auto_branch_creation_patterns.is_none()`.
146    pub fn auto_branch_creation_patterns(&self) -> &[::std::string::String] {
147        self.auto_branch_creation_patterns.as_deref().unwrap_or_default()
148    }
149    /// <p>The automated branch creation configuration for an Amplify app.</p>
150    pub fn auto_branch_creation_config(&self) -> ::std::option::Option<&crate::types::AutoBranchCreationConfig> {
151        self.auto_branch_creation_config.as_ref()
152    }
153    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
154    pub fn job_config(&self) -> ::std::option::Option<&crate::types::JobConfig> {
155        self.job_config.as_ref()
156    }
157    /// <p>The cache configuration for the Amplify app.</p>
158    pub fn cache_config(&self) -> ::std::option::Option<&crate::types::CacheConfig> {
159        self.cache_config.as_ref()
160    }
161}
162impl ::std::fmt::Debug for CreateAppInput {
163    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
164        let mut formatter = f.debug_struct("CreateAppInput");
165        formatter.field("name", &self.name);
166        formatter.field("description", &self.description);
167        formatter.field("repository", &self.repository);
168        formatter.field("platform", &self.platform);
169        formatter.field("compute_role_arn", &self.compute_role_arn);
170        formatter.field("iam_service_role_arn", &self.iam_service_role_arn);
171        formatter.field("oauth_token", &"*** Sensitive Data Redacted ***");
172        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
173        formatter.field("environment_variables", &self.environment_variables);
174        formatter.field("enable_branch_auto_build", &self.enable_branch_auto_build);
175        formatter.field("enable_branch_auto_deletion", &self.enable_branch_auto_deletion);
176        formatter.field("enable_basic_auth", &self.enable_basic_auth);
177        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
178        formatter.field("custom_rules", &self.custom_rules);
179        formatter.field("tags", &self.tags);
180        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
181        formatter.field("custom_headers", &self.custom_headers);
182        formatter.field("enable_auto_branch_creation", &self.enable_auto_branch_creation);
183        formatter.field("auto_branch_creation_patterns", &self.auto_branch_creation_patterns);
184        formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config);
185        formatter.field("job_config", &self.job_config);
186        formatter.field("cache_config", &self.cache_config);
187        formatter.finish()
188    }
189}
190impl CreateAppInput {
191    /// Creates a new builder-style object to manufacture [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
192    pub fn builder() -> crate::operation::create_app::builders::CreateAppInputBuilder {
193        crate::operation::create_app::builders::CreateAppInputBuilder::default()
194    }
195}
196
197/// A builder for [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
198#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
199#[non_exhaustive]
200pub struct CreateAppInputBuilder {
201    pub(crate) name: ::std::option::Option<::std::string::String>,
202    pub(crate) description: ::std::option::Option<::std::string::String>,
203    pub(crate) repository: ::std::option::Option<::std::string::String>,
204    pub(crate) platform: ::std::option::Option<crate::types::Platform>,
205    pub(crate) compute_role_arn: ::std::option::Option<::std::string::String>,
206    pub(crate) iam_service_role_arn: ::std::option::Option<::std::string::String>,
207    pub(crate) oauth_token: ::std::option::Option<::std::string::String>,
208    pub(crate) access_token: ::std::option::Option<::std::string::String>,
209    pub(crate) environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
210    pub(crate) enable_branch_auto_build: ::std::option::Option<bool>,
211    pub(crate) enable_branch_auto_deletion: ::std::option::Option<bool>,
212    pub(crate) enable_basic_auth: ::std::option::Option<bool>,
213    pub(crate) basic_auth_credentials: ::std::option::Option<::std::string::String>,
214    pub(crate) custom_rules: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>,
215    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
216    pub(crate) build_spec: ::std::option::Option<::std::string::String>,
217    pub(crate) custom_headers: ::std::option::Option<::std::string::String>,
218    pub(crate) enable_auto_branch_creation: ::std::option::Option<bool>,
219    pub(crate) auto_branch_creation_patterns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
220    pub(crate) auto_branch_creation_config: ::std::option::Option<crate::types::AutoBranchCreationConfig>,
221    pub(crate) job_config: ::std::option::Option<crate::types::JobConfig>,
222    pub(crate) cache_config: ::std::option::Option<crate::types::CacheConfig>,
223}
224impl CreateAppInputBuilder {
225    /// <p>The name of the Amplify app.</p>
226    /// This field is required.
227    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.name = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The name of the Amplify app.</p>
232    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.name = input;
234        self
235    }
236    /// <p>The name of the Amplify app.</p>
237    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
238        &self.name
239    }
240    /// <p>The description of the Amplify app.</p>
241    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.description = ::std::option::Option::Some(input.into());
243        self
244    }
245    /// <p>The description of the Amplify app.</p>
246    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.description = input;
248        self
249    }
250    /// <p>The description of the Amplify app.</p>
251    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
252        &self.description
253    }
254    /// <p>The Git repository for the Amplify app.</p>
255    pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.repository = ::std::option::Option::Some(input.into());
257        self
258    }
259    /// <p>The Git repository for the Amplify app.</p>
260    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261        self.repository = input;
262        self
263    }
264    /// <p>The Git repository for the Amplify app.</p>
265    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
266        &self.repository
267    }
268    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
269    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code> and set the artifacts <code>baseDirectory</code> to <code>.next</code> in the application's build settings. For an example of the build specification settings, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14">Amplify build settings for a Next.js 14 SSG application</a> in the <i>Amplify Hosting User Guide</i>.</p>
270    pub fn platform(mut self, input: crate::types::Platform) -> Self {
271        self.platform = ::std::option::Option::Some(input);
272        self
273    }
274    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
275    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code> and set the artifacts <code>baseDirectory</code> to <code>.next</code> in the application's build settings. For an example of the build specification settings, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14">Amplify build settings for a Next.js 14 SSG application</a> in the <i>Amplify Hosting User Guide</i>.</p>
276    pub fn set_platform(mut self, input: ::std::option::Option<crate::types::Platform>) -> Self {
277        self.platform = input;
278        self
279    }
280    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
281    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code> and set the artifacts <code>baseDirectory</code> to <code>.next</code> in the application's build settings. For an example of the build specification settings, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14">Amplify build settings for a Next.js 14 SSG application</a> in the <i>Amplify Hosting User Guide</i>.</p>
282    pub fn get_platform(&self) -> &::std::option::Option<crate::types::Platform> {
283        &self.platform
284    }
285    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
286    pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287        self.compute_role_arn = ::std::option::Option::Some(input.into());
288        self
289    }
290    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
291    pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
292        self.compute_role_arn = input;
293        self
294    }
295    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
296    pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
297        &self.compute_role_arn
298    }
299    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
300    pub fn iam_service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
301        self.iam_service_role_arn = ::std::option::Option::Some(input.into());
302        self
303    }
304    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
305    pub fn set_iam_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
306        self.iam_service_role_arn = input;
307        self
308    }
309    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
310    pub fn get_iam_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
311        &self.iam_service_role_arn
312    }
313    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
314    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
315    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p>
316    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
317    pub fn oauth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
318        self.oauth_token = ::std::option::Option::Some(input.into());
319        self
320    }
321    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
322    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
323    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p>
324    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
325    pub fn set_oauth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326        self.oauth_token = input;
327        self
328    }
329    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
330    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
331    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p>
332    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
333    pub fn get_oauth_token(&self) -> &::std::option::Option<::std::string::String> {
334        &self.oauth_token
335    }
336    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
337    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
338    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p>
339    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
340    pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
341        self.access_token = ::std::option::Option::Some(input.into());
342        self
343    }
344    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
345    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
346    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p>
347    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
348    pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349        self.access_token = input;
350        self
351    }
352    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
353    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
354    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p>
355    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
356    pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
357        &self.access_token
358    }
359    /// Adds a key-value pair to `environment_variables`.
360    ///
361    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
362    ///
363    /// <p>The environment variables map for an Amplify app.</p>
364    /// <p>For a list of the environment variables that are accessible to Amplify by default, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html">Amplify Environment variables</a> in the <i>Amplify Hosting User Guide</i>.</p>
365    pub fn environment_variables(
366        mut self,
367        k: impl ::std::convert::Into<::std::string::String>,
368        v: impl ::std::convert::Into<::std::string::String>,
369    ) -> Self {
370        let mut hash_map = self.environment_variables.unwrap_or_default();
371        hash_map.insert(k.into(), v.into());
372        self.environment_variables = ::std::option::Option::Some(hash_map);
373        self
374    }
375    /// <p>The environment variables map for an Amplify app.</p>
376    /// <p>For a list of the environment variables that are accessible to Amplify by default, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html">Amplify Environment variables</a> in the <i>Amplify Hosting User Guide</i>.</p>
377    pub fn set_environment_variables(
378        mut self,
379        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
380    ) -> Self {
381        self.environment_variables = input;
382        self
383    }
384    /// <p>The environment variables map for an Amplify app.</p>
385    /// <p>For a list of the environment variables that are accessible to Amplify by default, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html">Amplify Environment variables</a> in the <i>Amplify Hosting User Guide</i>.</p>
386    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
387        &self.environment_variables
388    }
389    /// <p>Enables the auto building of branches for an Amplify app.</p>
390    pub fn enable_branch_auto_build(mut self, input: bool) -> Self {
391        self.enable_branch_auto_build = ::std::option::Option::Some(input);
392        self
393    }
394    /// <p>Enables the auto building of branches for an Amplify app.</p>
395    pub fn set_enable_branch_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
396        self.enable_branch_auto_build = input;
397        self
398    }
399    /// <p>Enables the auto building of branches for an Amplify app.</p>
400    pub fn get_enable_branch_auto_build(&self) -> &::std::option::Option<bool> {
401        &self.enable_branch_auto_build
402    }
403    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
404    pub fn enable_branch_auto_deletion(mut self, input: bool) -> Self {
405        self.enable_branch_auto_deletion = ::std::option::Option::Some(input);
406        self
407    }
408    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
409    pub fn set_enable_branch_auto_deletion(mut self, input: ::std::option::Option<bool>) -> Self {
410        self.enable_branch_auto_deletion = input;
411        self
412    }
413    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
414    pub fn get_enable_branch_auto_deletion(&self) -> &::std::option::Option<bool> {
415        &self.enable_branch_auto_deletion
416    }
417    /// <p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p>
418    pub fn enable_basic_auth(mut self, input: bool) -> Self {
419        self.enable_basic_auth = ::std::option::Option::Some(input);
420        self
421    }
422    /// <p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p>
423    pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
424        self.enable_basic_auth = input;
425        self
426    }
427    /// <p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p>
428    pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
429        &self.enable_basic_auth
430    }
431    /// <p>The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
432    pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
433        self.basic_auth_credentials = ::std::option::Option::Some(input.into());
434        self
435    }
436    /// <p>The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
437    pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
438        self.basic_auth_credentials = input;
439        self
440    }
441    /// <p>The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
442    pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
443        &self.basic_auth_credentials
444    }
445    /// Appends an item to `custom_rules`.
446    ///
447    /// To override the contents of this collection use [`set_custom_rules`](Self::set_custom_rules).
448    ///
449    /// <p>The custom rewrite and redirect rules for an Amplify app.</p>
450    pub fn custom_rules(mut self, input: crate::types::CustomRule) -> Self {
451        let mut v = self.custom_rules.unwrap_or_default();
452        v.push(input);
453        self.custom_rules = ::std::option::Option::Some(v);
454        self
455    }
456    /// <p>The custom rewrite and redirect rules for an Amplify app.</p>
457    pub fn set_custom_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>) -> Self {
458        self.custom_rules = input;
459        self
460    }
461    /// <p>The custom rewrite and redirect rules for an Amplify app.</p>
462    pub fn get_custom_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomRule>> {
463        &self.custom_rules
464    }
465    /// Adds a key-value pair to `tags`.
466    ///
467    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
468    ///
469    /// <p>The tag for an Amplify app.</p>
470    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
471        let mut hash_map = self.tags.unwrap_or_default();
472        hash_map.insert(k.into(), v.into());
473        self.tags = ::std::option::Option::Some(hash_map);
474        self
475    }
476    /// <p>The tag for an Amplify app.</p>
477    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
478        self.tags = input;
479        self
480    }
481    /// <p>The tag for an Amplify app.</p>
482    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
483        &self.tags
484    }
485    /// <p>The build specification (build spec) for an Amplify app.</p>
486    pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
487        self.build_spec = ::std::option::Option::Some(input.into());
488        self
489    }
490    /// <p>The build specification (build spec) for an Amplify app.</p>
491    pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
492        self.build_spec = input;
493        self
494    }
495    /// <p>The build specification (build spec) for an Amplify app.</p>
496    pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
497        &self.build_spec
498    }
499    /// <p>The custom HTTP headers for an Amplify app.</p>
500    pub fn custom_headers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
501        self.custom_headers = ::std::option::Option::Some(input.into());
502        self
503    }
504    /// <p>The custom HTTP headers for an Amplify app.</p>
505    pub fn set_custom_headers(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
506        self.custom_headers = input;
507        self
508    }
509    /// <p>The custom HTTP headers for an Amplify app.</p>
510    pub fn get_custom_headers(&self) -> &::std::option::Option<::std::string::String> {
511        &self.custom_headers
512    }
513    /// <p>Enables automated branch creation for an Amplify app.</p>
514    pub fn enable_auto_branch_creation(mut self, input: bool) -> Self {
515        self.enable_auto_branch_creation = ::std::option::Option::Some(input);
516        self
517    }
518    /// <p>Enables automated branch creation for an Amplify app.</p>
519    pub fn set_enable_auto_branch_creation(mut self, input: ::std::option::Option<bool>) -> Self {
520        self.enable_auto_branch_creation = input;
521        self
522    }
523    /// <p>Enables automated branch creation for an Amplify app.</p>
524    pub fn get_enable_auto_branch_creation(&self) -> &::std::option::Option<bool> {
525        &self.enable_auto_branch_creation
526    }
527    /// Appends an item to `auto_branch_creation_patterns`.
528    ///
529    /// To override the contents of this collection use [`set_auto_branch_creation_patterns`](Self::set_auto_branch_creation_patterns).
530    ///
531    /// <p>The automated branch creation glob patterns for an Amplify app.</p>
532    pub fn auto_branch_creation_patterns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
533        let mut v = self.auto_branch_creation_patterns.unwrap_or_default();
534        v.push(input.into());
535        self.auto_branch_creation_patterns = ::std::option::Option::Some(v);
536        self
537    }
538    /// <p>The automated branch creation glob patterns for an Amplify app.</p>
539    pub fn set_auto_branch_creation_patterns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
540        self.auto_branch_creation_patterns = input;
541        self
542    }
543    /// <p>The automated branch creation glob patterns for an Amplify app.</p>
544    pub fn get_auto_branch_creation_patterns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
545        &self.auto_branch_creation_patterns
546    }
547    /// <p>The automated branch creation configuration for an Amplify app.</p>
548    pub fn auto_branch_creation_config(mut self, input: crate::types::AutoBranchCreationConfig) -> Self {
549        self.auto_branch_creation_config = ::std::option::Option::Some(input);
550        self
551    }
552    /// <p>The automated branch creation configuration for an Amplify app.</p>
553    pub fn set_auto_branch_creation_config(mut self, input: ::std::option::Option<crate::types::AutoBranchCreationConfig>) -> Self {
554        self.auto_branch_creation_config = input;
555        self
556    }
557    /// <p>The automated branch creation configuration for an Amplify app.</p>
558    pub fn get_auto_branch_creation_config(&self) -> &::std::option::Option<crate::types::AutoBranchCreationConfig> {
559        &self.auto_branch_creation_config
560    }
561    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
562    pub fn job_config(mut self, input: crate::types::JobConfig) -> Self {
563        self.job_config = ::std::option::Option::Some(input);
564        self
565    }
566    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
567    pub fn set_job_config(mut self, input: ::std::option::Option<crate::types::JobConfig>) -> Self {
568        self.job_config = input;
569        self
570    }
571    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
572    pub fn get_job_config(&self) -> &::std::option::Option<crate::types::JobConfig> {
573        &self.job_config
574    }
575    /// <p>The cache configuration for the Amplify app.</p>
576    pub fn cache_config(mut self, input: crate::types::CacheConfig) -> Self {
577        self.cache_config = ::std::option::Option::Some(input);
578        self
579    }
580    /// <p>The cache configuration for the Amplify app.</p>
581    pub fn set_cache_config(mut self, input: ::std::option::Option<crate::types::CacheConfig>) -> Self {
582        self.cache_config = input;
583        self
584    }
585    /// <p>The cache configuration for the Amplify app.</p>
586    pub fn get_cache_config(&self) -> &::std::option::Option<crate::types::CacheConfig> {
587        &self.cache_config
588    }
589    /// Consumes the builder and constructs a [`CreateAppInput`](crate::operation::create_app::CreateAppInput).
590    pub fn build(self) -> ::std::result::Result<crate::operation::create_app::CreateAppInput, ::aws_smithy_types::error::operation::BuildError> {
591        ::std::result::Result::Ok(crate::operation::create_app::CreateAppInput {
592            name: self.name,
593            description: self.description,
594            repository: self.repository,
595            platform: self.platform,
596            compute_role_arn: self.compute_role_arn,
597            iam_service_role_arn: self.iam_service_role_arn,
598            oauth_token: self.oauth_token,
599            access_token: self.access_token,
600            environment_variables: self.environment_variables,
601            enable_branch_auto_build: self.enable_branch_auto_build,
602            enable_branch_auto_deletion: self.enable_branch_auto_deletion,
603            enable_basic_auth: self.enable_basic_auth,
604            basic_auth_credentials: self.basic_auth_credentials,
605            custom_rules: self.custom_rules,
606            tags: self.tags,
607            build_spec: self.build_spec,
608            custom_headers: self.custom_headers,
609            enable_auto_branch_creation: self.enable_auto_branch_creation,
610            auto_branch_creation_patterns: self.auto_branch_creation_patterns,
611            auto_branch_creation_config: self.auto_branch_creation_config,
612            job_config: self.job_config,
613            cache_config: self.cache_config,
614        })
615    }
616}
617impl ::std::fmt::Debug for CreateAppInputBuilder {
618    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
619        let mut formatter = f.debug_struct("CreateAppInputBuilder");
620        formatter.field("name", &self.name);
621        formatter.field("description", &self.description);
622        formatter.field("repository", &self.repository);
623        formatter.field("platform", &self.platform);
624        formatter.field("compute_role_arn", &self.compute_role_arn);
625        formatter.field("iam_service_role_arn", &self.iam_service_role_arn);
626        formatter.field("oauth_token", &"*** Sensitive Data Redacted ***");
627        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
628        formatter.field("environment_variables", &self.environment_variables);
629        formatter.field("enable_branch_auto_build", &self.enable_branch_auto_build);
630        formatter.field("enable_branch_auto_deletion", &self.enable_branch_auto_deletion);
631        formatter.field("enable_basic_auth", &self.enable_basic_auth);
632        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
633        formatter.field("custom_rules", &self.custom_rules);
634        formatter.field("tags", &self.tags);
635        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
636        formatter.field("custom_headers", &self.custom_headers);
637        formatter.field("enable_auto_branch_creation", &self.enable_auto_branch_creation);
638        formatter.field("auto_branch_creation_patterns", &self.auto_branch_creation_patterns);
639        formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config);
640        formatter.field("job_config", &self.job_config);
641        formatter.field("cache_config", &self.cache_config);
642        formatter.finish()
643    }
644}