aws_sdk_amplify/client/create_app.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateApp`](crate::operation::create_app::builders::CreateAppFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_name):<br>required: **true**<br><p>The name of the Amplify app.</p><br>
7 /// - [`description(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_description):<br>required: **false**<br><p>The description of the Amplify app.</p><br>
8 /// - [`repository(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::repository) / [`set_repository(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_repository):<br>required: **false**<br><p>The Git repository for the Amplify app.</p><br>
9 /// - [`platform(Platform)`](crate::operation::create_app::builders::CreateAppFluentBuilder::platform) / [`set_platform(Option<Platform>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_platform):<br>required: **false**<br><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> <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><br>
10 /// - [`compute_role_arn(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::compute_role_arn) / [`set_compute_role_arn(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_compute_role_arn):<br>required: **false**<br><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><br>
11 /// - [`iam_service_role_arn(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::iam_service_role_arn) / [`set_iam_service_role_arn(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_iam_service_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p><br>
12 /// - [`oauth_token(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::oauth_token) / [`set_oauth_token(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_oauth_token):<br>required: **false**<br><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> <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> <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you create a new app.</p> <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><br>
13 /// - [`access_token(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::access_token) / [`set_access_token(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_access_token):<br>required: **false**<br><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> <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> <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you create a new app.</p> <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><br>
14 /// - [`environment_variables(impl Into<String>, impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::environment_variables) / [`set_environment_variables(Option<HashMap::<String, String>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_environment_variables):<br>required: **false**<br><p>The environment variables map for an Amplify app.</p> <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><br>
15 /// - [`enable_branch_auto_build(bool)`](crate::operation::create_app::builders::CreateAppFluentBuilder::enable_branch_auto_build) / [`set_enable_branch_auto_build(Option<bool>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_enable_branch_auto_build):<br>required: **false**<br><p>Enables the auto building of branches for an Amplify app.</p><br>
16 /// - [`enable_branch_auto_deletion(bool)`](crate::operation::create_app::builders::CreateAppFluentBuilder::enable_branch_auto_deletion) / [`set_enable_branch_auto_deletion(Option<bool>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_enable_branch_auto_deletion):<br>required: **false**<br><p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p><br>
17 /// - [`enable_basic_auth(bool)`](crate::operation::create_app::builders::CreateAppFluentBuilder::enable_basic_auth) / [`set_enable_basic_auth(Option<bool>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_enable_basic_auth):<br>required: **false**<br><p>Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app.</p><br>
18 /// - [`basic_auth_credentials(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::basic_auth_credentials) / [`set_basic_auth_credentials(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_basic_auth_credentials):<br>required: **false**<br><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><br>
19 /// - [`custom_rules(CustomRule)`](crate::operation::create_app::builders::CreateAppFluentBuilder::custom_rules) / [`set_custom_rules(Option<Vec::<CustomRule>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_custom_rules):<br>required: **false**<br><p>The custom rewrite and redirect rules for an Amplify app.</p><br>
20 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_tags):<br>required: **false**<br><p>The tag for an Amplify app.</p><br>
21 /// - [`build_spec(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::build_spec) / [`set_build_spec(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_build_spec):<br>required: **false**<br><p>The build specification (build spec) for an Amplify app.</p><br>
22 /// - [`custom_headers(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::custom_headers) / [`set_custom_headers(Option<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_custom_headers):<br>required: **false**<br><p>The custom HTTP headers for an Amplify app.</p><br>
23 /// - [`enable_auto_branch_creation(bool)`](crate::operation::create_app::builders::CreateAppFluentBuilder::enable_auto_branch_creation) / [`set_enable_auto_branch_creation(Option<bool>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_enable_auto_branch_creation):<br>required: **false**<br><p>Enables automated branch creation for an Amplify app.</p><br>
24 /// - [`auto_branch_creation_patterns(impl Into<String>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::auto_branch_creation_patterns) / [`set_auto_branch_creation_patterns(Option<Vec::<String>>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_auto_branch_creation_patterns):<br>required: **false**<br><p>The automated branch creation glob patterns for an Amplify app.</p><br>
25 /// - [`auto_branch_creation_config(AutoBranchCreationConfig)`](crate::operation::create_app::builders::CreateAppFluentBuilder::auto_branch_creation_config) / [`set_auto_branch_creation_config(Option<AutoBranchCreationConfig>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_auto_branch_creation_config):<br>required: **false**<br><p>The automated branch creation configuration for an Amplify app.</p><br>
26 /// - [`job_config(JobConfig)`](crate::operation::create_app::builders::CreateAppFluentBuilder::job_config) / [`set_job_config(Option<JobConfig>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_job_config):<br>required: **false**<br><p>Describes the configuration details that apply to the jobs for an Amplify app.</p><br>
27 /// - [`cache_config(CacheConfig)`](crate::operation::create_app::builders::CreateAppFluentBuilder::cache_config) / [`set_cache_config(Option<CacheConfig>)`](crate::operation::create_app::builders::CreateAppFluentBuilder::set_cache_config):<br>required: **false**<br><p>The cache configuration for the Amplify app.</p><br>
28 /// - On success, responds with [`CreateAppOutput`](crate::operation::create_app::CreateAppOutput) with field(s):
29 /// - [`app(Option<App>)`](crate::operation::create_app::CreateAppOutput::app): <p>Represents the different branches of a repository for building, deploying, and hosting an Amplify app.</p>
30 /// - On failure, responds with [`SdkError<CreateAppError>`](crate::operation::create_app::CreateAppError)
31 pub fn create_app(&self) -> crate::operation::create_app::builders::CreateAppFluentBuilder {
32 crate::operation::create_app::builders::CreateAppFluentBuilder::new(self.handle.clone())
33 }
34}