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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@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.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 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` .
 * @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 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 }))
            .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 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("akintxucvmqtlswb")
    public suspend fun accessToken(`value`: Output) {
        this.accessToken = value
    }

    /**
     * @param value Sets the configuration for your automatic branch creation.
     */
    @JvmName("lbsluvfrsjtmcrqb")
    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("cysdwtwqijdcffhh")
    public suspend fun basicAuthConfig(`value`: Output) {
        this.basicAuthConfig = value
    }

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

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

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

    @JvmName("fkiljqfqavaamcfd")
    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("fwjqjxrtconhfqvo")
    public suspend fun customRules(values: List>) {
        this.customRules = Output.all(values)
    }

    /**
     * @param value The description of the Amplify app.
     */
    @JvmName("kxefsupbywfgupcn")
    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("malktoewmgbdaymb")
    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("ijrjeirlstywlsmj")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    @JvmName("nptimtmsmhjmmwdh")
    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("mgserjxragkpuqhl")
    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("ntbnbnhpxfuvmncq")
    public suspend fun iamServiceRole(`value`: Output) {
        this.iamServiceRole = value
    }

    /**
     * @param value The name of the Amplify app.
     */
    @JvmName("llaxgndfdgjkpbhw")
    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("kkrxunkytuismnfu")
    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` .
     */
    @JvmName("tmjnqnxadxdvuwio")
    public suspend fun platform(`value`: Output) {
        this.platform = value
    }

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

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

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

    /**
     * @param values The tag for an Amplify app.
     */
    @JvmName("bnwfaobyctdddrvx")
    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("ksfnpgexhuapvyyb")
    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("xilfvtjbdwnlnecd")
    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("kdcuvsrujuwrfqxp")
    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("ogwuoomxumqxubdy")
    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("uajscwffdgemxori")
    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("aqpfilpwthpjntfu")
    public suspend fun buildSpec(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.buildSpec = mapped
    }

    /**
     * @param value The custom HTTP headers for an Amplify app.
     */
    @JvmName("yyovpwjxgyarspvy")
    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("urwslmbmredsbrpa")
    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("guhlhgtpjpccscne")
    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("xqxpdrythnqwilxi")
    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("aebcbthyaholervp")
    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("yeoppakqbdimuvfy")
    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("uanfdgogvucsywdk")
    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("xieyeovkfhufaraf")
    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("fojltlcmdpxulqnq")
    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("bhyawnyujhmqqfft")
    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("sgxhpwnibdwihgmu")
    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("pbukikhsphqcjrry")
    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("drcfvasuqlbxfwlp")
    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("rohoaxceafidfclq")
    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("frjkrfunynfruyty")
    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("vmhidsyopcmhtcwh")
    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` .
     */
    @JvmName("njawgecdcfmkhsan")
    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("cobvapklvbjmemgd")
    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("owkxcsrjacpbbmhl")
    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("cjwskkbedkxgcmfr")
    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("bynyteyvicpprnon")
    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("cywhajhnmshyywhs")
    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("bvpemjfemtvxirew")
    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,
        customHeaders = customHeaders,
        customRules = customRules,
        description = description,
        enableBranchAutoDeletion = enableBranchAutoDeletion,
        environmentVariables = environmentVariables,
        iamServiceRole = iamServiceRole,
        name = name,
        oauthToken = oauthToken,
        platform = platform,
        repository = repository,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy