All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.amplify.kotlin.AppArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.amplify.kotlin

import com.pulumi.awsnative.amplify.AppArgs.builder
import com.pulumi.awsnative.amplify.kotlin.enums.AppPlatform
import com.pulumi.awsnative.amplify.kotlin.inputs.AppAutoBranchCreationConfigArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.AppAutoBranchCreationConfigArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.AppBasicAuthConfigArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.AppBasicAuthConfigArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.AppCacheConfigArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.AppCacheConfigArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.AppCustomRuleArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.AppCustomRuleArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.AppEnvironmentVariableArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.AppEnvironmentVariableArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::Amplify::App resource creates Apps in the Amplify Console. An App is a collection of branches.
 * @property accessToken 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.
 * Use `AccessToken` for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use `OauthToken` .
 * You must specify either `AccessToken` or `OauthToken` when you create a new app.
 * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
 * @property autoBranchCreationConfig Sets the configuration for your automatic branch creation.
 * @property basicAuthConfig The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
 * @property buildSpec The build specification (build spec) for an Amplify app.
 * @property cacheConfig The cache configuration for the Amplify app. If you don't specify the cache configuration `type` , Amplify uses the default `AMPLIFY_MANAGED` setting.
 * @property customHeaders The custom HTTP headers for an Amplify app.
 * @property customRules The custom rewrite and redirect rules for an Amplify app.
 * @property description The description of the Amplify app.
 * @property enableBranchAutoDeletion Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
 * @property environmentVariables The environment variables for the Amplify app.
 * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
 * @property iamServiceRole AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
 * @property name The name of the Amplify app.
 * @property oauthToken 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.
 * Use `OauthToken` for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use `AccessToken` .
 * You must specify either `OauthToken` or `AccessToken` when you create a new app.
 * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
 * @property platform The platform for the Amplify app. For a static app, set the platform type to `WEB` . For a dynamic server-side rendered (SSR) app, set the platform type to `WEB_COMPUTE` . For an app requiring Amplify Hosting's original SSR support only, set the platform type to `WEB_DYNAMIC` .
 * If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to `WEB_COMPUTE` and set the artifacts `baseDirectory` to `.next` in the application's build settings. For an example of the build specification settings, see [Amplify build settings for a Next.js 14 SSG application](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14) in the *Amplify Hosting User Guide* .
 * @property repository The Git repository for the Amplify app.
 * @property tags The tag for an Amplify app.
 */
public data class AppArgs(
    public val accessToken: Output? = null,
    public val autoBranchCreationConfig: Output? = null,
    public val basicAuthConfig: Output? = null,
    public val buildSpec: Output? = null,
    public val cacheConfig: Output? = null,
    public val customHeaders: Output? = null,
    public val customRules: Output>? = null,
    public val description: Output? = null,
    public val enableBranchAutoDeletion: Output? = null,
    public val environmentVariables: Output>? = null,
    public val iamServiceRole: Output? = null,
    public val name: Output? = null,
    public val oauthToken: Output? = null,
    public val platform: Output? = null,
    public val repository: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.amplify.AppArgs =
        com.pulumi.awsnative.amplify.AppArgs.builder()
            .accessToken(accessToken?.applyValue({ args0 -> args0 }))
            .autoBranchCreationConfig(
                autoBranchCreationConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .basicAuthConfig(basicAuthConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .buildSpec(buildSpec?.applyValue({ args0 -> args0 }))
            .cacheConfig(cacheConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customHeaders(customHeaders?.applyValue({ args0 -> args0 }))
            .customRules(
                customRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .enableBranchAutoDeletion(enableBranchAutoDeletion?.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .iamServiceRole(iamServiceRole?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .oauthToken(oauthToken?.applyValue({ args0 -> args0 }))
            .platform(platform?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .repository(repository?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AppArgs].
 */
@PulumiTagMarker
public class AppArgsBuilder internal constructor() {
    private var accessToken: Output? = null

    private var autoBranchCreationConfig: Output? = null

    private var basicAuthConfig: Output? = null

    private var buildSpec: Output? = null

    private var cacheConfig: Output? = null

    private var customHeaders: Output? = null

    private var customRules: Output>? = null

    private var description: Output? = null

    private var enableBranchAutoDeletion: Output? = null

    private var environmentVariables: Output>? = null

    private var iamServiceRole: Output? = null

    private var name: Output? = null

    private var oauthToken: Output? = null

    private var platform: Output? = null

    private var repository: Output? = null

    private var tags: Output>? = null

    /**
     * @param value 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.
     * Use `AccessToken` for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use `OauthToken` .
     * You must specify either `AccessToken` or `OauthToken` when you create a new app.
     * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
     */
    @JvmName("vodgcvlywrraeipm")
    public suspend fun accessToken(`value`: Output) {
        this.accessToken = value
    }

    /**
     * @param value Sets the configuration for your automatic branch creation.
     */
    @JvmName("miiumoiwjigqshoe")
    public suspend fun autoBranchCreationConfig(`value`: Output) {
        this.autoBranchCreationConfig = value
    }

    /**
     * @param value The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
     */
    @JvmName("iupxwrleqdjdnysq")
    public suspend fun basicAuthConfig(`value`: Output) {
        this.basicAuthConfig = value
    }

    /**
     * @param value The build specification (build spec) for an Amplify app.
     */
    @JvmName("hdtyftqrbxkehfsh")
    public suspend fun buildSpec(`value`: Output) {
        this.buildSpec = value
    }

    /**
     * @param value The cache configuration for the Amplify app. If you don't specify the cache configuration `type` , Amplify uses the default `AMPLIFY_MANAGED` setting.
     */
    @JvmName("jesxyvuapiwsiiev")
    public suspend fun cacheConfig(`value`: Output) {
        this.cacheConfig = value
    }

    /**
     * @param value The custom HTTP headers for an Amplify app.
     */
    @JvmName("dxkcvhgxjtgeeonj")
    public suspend fun customHeaders(`value`: Output) {
        this.customHeaders = value
    }

    /**
     * @param value The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("ogwinqpqstcibrry")
    public suspend fun customRules(`value`: Output>) {
        this.customRules = value
    }

    @JvmName("smesiyybjhyjlgas")
    public suspend fun customRules(vararg values: Output) {
        this.customRules = Output.all(values.asList())
    }

    /**
     * @param values The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("uabckyldrbqbhhxd")
    public suspend fun customRules(values: List>) {
        this.customRules = Output.all(values)
    }

    /**
     * @param value The description of the Amplify app.
     */
    @JvmName("qfohpxkxpsasxqdt")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
     */
    @JvmName("fajdltsyycrsavum")
    public suspend fun enableBranchAutoDeletion(`value`: Output) {
        this.enableBranchAutoDeletion = value
    }

    /**
     * @param value The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("xqghhdfcihqvxsgr")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    @JvmName("srjjldehxojsyoit")
    public suspend fun environmentVariables(vararg values: Output) {
        this.environmentVariables = Output.all(values.asList())
    }

    /**
     * @param values The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("hxmffbboyvftbaxt")
    public suspend fun environmentVariables(values: List>) {
        this.environmentVariables = Output.all(values)
    }

    /**
     * @param value AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
     */
    @JvmName("xbkkvptjagacspyr")
    public suspend fun iamServiceRole(`value`: Output) {
        this.iamServiceRole = value
    }

    /**
     * @param value The name of the Amplify app.
     */
    @JvmName("pnhksjrisaydlaoh")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value 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.
     * Use `OauthToken` for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use `AccessToken` .
     * You must specify either `OauthToken` or `AccessToken` when you create a new app.
     * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
     */
    @JvmName("pdmmbvpcufxeqqrr")
    public suspend fun oauthToken(`value`: Output) {
        this.oauthToken = value
    }

    /**
     * @param value The platform for the Amplify app. For a static app, set the platform type to `WEB` . For a dynamic server-side rendered (SSR) app, set the platform type to `WEB_COMPUTE` . For an app requiring Amplify Hosting's original SSR support only, set the platform type to `WEB_DYNAMIC` .
     * If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to `WEB_COMPUTE` and set the artifacts `baseDirectory` to `.next` in the application's build settings. For an example of the build specification settings, see [Amplify build settings for a Next.js 14 SSG application](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14) in the *Amplify Hosting User Guide* .
     */
    @JvmName("ecwuudjxonlshhkh")
    public suspend fun platform(`value`: Output) {
        this.platform = value
    }

    /**
     * @param value The Git repository for the Amplify app.
     */
    @JvmName("irngieclhjygmgyk")
    public suspend fun repository(`value`: Output) {
        this.repository = value
    }

    /**
     * @param value The tag for an Amplify app.
     */
    @JvmName("vnjlogesbrcenwtb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("fvcuvhhevvltwylm")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values The tag for an Amplify app.
     */
    @JvmName("fkjpetmeudieohwj")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value 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.
     * Use `AccessToken` for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use `OauthToken` .
     * You must specify either `AccessToken` or `OauthToken` when you create a new app.
     * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
     */
    @JvmName("ywbkohyfkevkncbj")
    public suspend fun accessToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessToken = mapped
    }

    /**
     * @param value Sets the configuration for your automatic branch creation.
     */
    @JvmName("vgllhrmfychknwln")
    public suspend fun autoBranchCreationConfig(`value`: AppAutoBranchCreationConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoBranchCreationConfig = mapped
    }

    /**
     * @param argument Sets the configuration for your automatic branch creation.
     */
    @JvmName("rrveulbfkohnqsvs")
    public suspend fun autoBranchCreationConfig(argument: suspend AppAutoBranchCreationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = AppAutoBranchCreationConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoBranchCreationConfig = mapped
    }

    /**
     * @param value The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
     */
    @JvmName("qblhrhbvdnqhnpvc")
    public suspend fun basicAuthConfig(`value`: AppBasicAuthConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.basicAuthConfig = mapped
    }

    /**
     * @param argument The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
     */
    @JvmName("snhewoubyujoajin")
    public suspend fun basicAuthConfig(argument: suspend AppBasicAuthConfigArgsBuilder.() -> Unit) {
        val toBeMapped = AppBasicAuthConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.basicAuthConfig = mapped
    }

    /**
     * @param value The build specification (build spec) for an Amplify app.
     */
    @JvmName("wnvxajqxojiprbjm")
    public suspend fun buildSpec(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.buildSpec = mapped
    }

    /**
     * @param value The cache configuration for the Amplify app. If you don't specify the cache configuration `type` , Amplify uses the default `AMPLIFY_MANAGED` setting.
     */
    @JvmName("qdfpmfwdyokjrirv")
    public suspend fun cacheConfig(`value`: AppCacheConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cacheConfig = mapped
    }

    /**
     * @param argument The cache configuration for the Amplify app. If you don't specify the cache configuration `type` , Amplify uses the default `AMPLIFY_MANAGED` setting.
     */
    @JvmName("pwomfcbpwhadgwti")
    public suspend fun cacheConfig(argument: suspend AppCacheConfigArgsBuilder.() -> Unit) {
        val toBeMapped = AppCacheConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cacheConfig = mapped
    }

    /**
     * @param value The custom HTTP headers for an Amplify app.
     */
    @JvmName("qclgtmuulwugoenf")
    public suspend fun customHeaders(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customHeaders = mapped
    }

    /**
     * @param value The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("affcolvxpmnhudjv")
    public suspend fun customRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customRules = mapped
    }

    /**
     * @param argument The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("xsqithhnarhpynnv")
    public suspend fun customRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppCustomRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customRules = mapped
    }

    /**
     * @param argument The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("ejclfemrqjacanwl")
    public suspend fun customRules(vararg argument: suspend AppCustomRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppCustomRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.customRules = mapped
    }

    /**
     * @param argument The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("upixxvmnflajaydy")
    public suspend fun customRules(argument: suspend AppCustomRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppCustomRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.customRules = mapped
    }

    /**
     * @param values The custom rewrite and redirect rules for an Amplify app.
     */
    @JvmName("rnnnpdowsyxectaf")
    public suspend fun customRules(vararg values: AppCustomRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customRules = mapped
    }

    /**
     * @param value The description of the Amplify app.
     */
    @JvmName("gushtsqmdogvamga")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Automatically disconnect a branch in Amplify Hosting when you delete a branch from your Git repository.
     */
    @JvmName("wpnebcwjaxtaobqy")
    public suspend fun enableBranchAutoDeletion(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableBranchAutoDeletion = mapped
    }

    /**
     * @param value The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("tfcwepxuvgnqnbem")
    public suspend fun environmentVariables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("ewlxuwidodrxahfd")
    public suspend fun environmentVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppEnvironmentVariableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("ttwejwpjbhhynafi")
    public suspend fun environmentVariables(vararg argument: suspend AppEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppEnvironmentVariableArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param argument The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("fwxyfnofkybupuxn")
    public suspend fun environmentVariables(argument: suspend AppEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppEnvironmentVariableArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.environmentVariables = mapped
    }

    /**
     * @param values The environment variables for the Amplify app.
     * For a list of the environment variables that are accessible to Amplify by default, see [Amplify Environment variables](https://docs.aws.amazon.com/amplify/latest/userguide/amplify-console-environment-variables.html) in the *Amplify Hosting User Guide* .
     */
    @JvmName("qcjwevqsfcnmdipp")
    public suspend fun environmentVariables(vararg values: AppEnvironmentVariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value AWS Identity and Access Management ( IAM ) service role for the Amazon Resource Name (ARN) of the Amplify app.
     */
    @JvmName("jpjehwsjxbtdonde")
    public suspend fun iamServiceRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iamServiceRole = mapped
    }

    /**
     * @param value The name of the Amplify app.
     */
    @JvmName("qofajyxtjdgpxjbk")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value 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.
     * Use `OauthToken` for repository providers other than GitHub, such as Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use `AccessToken` .
     * You must specify either `OauthToken` or `AccessToken` when you create a new app.
     * 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 [Migrating an existing OAuth app to the Amplify GitHub App](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth) in the *Amplify User Guide* .
     */
    @JvmName("qdxgrwjbhnysdqxq")
    public suspend fun oauthToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.oauthToken = mapped
    }

    /**
     * @param value The platform for the Amplify app. For a static app, set the platform type to `WEB` . For a dynamic server-side rendered (SSR) app, set the platform type to `WEB_COMPUTE` . For an app requiring Amplify Hosting's original SSR support only, set the platform type to `WEB_DYNAMIC` .
     * If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to `WEB_COMPUTE` and set the artifacts `baseDirectory` to `.next` in the application's build settings. For an example of the build specification settings, see [Amplify build settings for a Next.js 14 SSG application](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-nextjs-app.html#build-setting-detection-ssg-14) in the *Amplify Hosting User Guide* .
     */
    @JvmName("nkhurvivafcvtrfa")
    public suspend fun platform(`value`: AppPlatform?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.platform = mapped
    }

    /**
     * @param value The Git repository for the Amplify app.
     */
    @JvmName("rdlugujfrtuumnsi")
    public suspend fun repository(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.repository = mapped
    }

    /**
     * @param value The tag for an Amplify app.
     */
    @JvmName("pvwmwxvwkvtleqpl")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tag for an Amplify app.
     */
    @JvmName("xyvxbnxfpigmvewi")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tag for an Amplify app.
     */
    @JvmName("qwxnfjgssfoejsaq")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tag for an Amplify app.
     */
    @JvmName("txsonubctlcldiuh")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tag for an Amplify app.
     */
    @JvmName("jrpbtlmpmbwfplnc")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AppArgs = AppArgs(
        accessToken = accessToken,
        autoBranchCreationConfig = autoBranchCreationConfig,
        basicAuthConfig = basicAuthConfig,
        buildSpec = buildSpec,
        cacheConfig = cacheConfig,
        customHeaders = customHeaders,
        customRules = customRules,
        description = description,
        enableBranchAutoDeletion = enableBranchAutoDeletion,
        environmentVariables = environmentVariables,
        iamServiceRole = iamServiceRole,
        name = name,
        oauthToken = oauthToken,
        platform = platform,
        repository = repository,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy