com.pulumi.awsnative.amplify.kotlin.BranchArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.amplify.kotlin
import com.pulumi.awsnative.amplify.BranchArgs.builder
import com.pulumi.awsnative.amplify.kotlin.enums.BranchStage
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchBackendArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchBackendArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchBasicAuthConfigArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchBasicAuthConfigArgsBuilder
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchEnvironmentVariableArgs
import com.pulumi.awsnative.amplify.kotlin.inputs.BranchEnvironmentVariableArgsBuilder
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::Branch resource creates a new branch within an app.
* @property appId The unique ID for an Amplify app.
* @property backend The backend for a `Branch` of an Amplify app. Use for a backend created from an AWS CloudFormation stack.
* This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
* @property basicAuthConfig The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
* @property branchName The name for the branch.
* @property buildSpec The build specification (build spec) for the branch.
* @property description The description for the branch that is part of an Amplify app.
* @property enableAutoBuild Enables auto building for the branch.
* @property enablePerformanceMode Enables performance mode for the branch.
* Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
* @property enablePullRequestPreview Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
* To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property.
* For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* .
* @property environmentVariables The environment variables for the branch.
* @property framework The framework for the branch.
* @property pullRequestEnvironmentName If pull request previews are enabled for this branch, you can use this property to specify a dedicated backend environment for your previews. For example, you could specify an environment named `prod` , `test` , or `dev` that you initialized with the Amplify CLI and mapped to this branch.
* To enable pull request previews, set the `EnablePullRequestPreview` property to `true` .
* If you don't specify an environment, Amplify Hosting provides backend support for each preview by automatically provisioning a temporary backend environment. Amplify Hosting deletes this environment when the pull request is closed.
* For more information about creating backend environments, see [Feature Branch Deployments and Team Workflows](https://docs.aws.amazon.com/amplify/latest/userguide/multi-environments.html) in the *AWS Amplify Hosting User Guide* .
* @property stage Describes the current stage for the branch.
* @property tags The tag for the branch.
*/
public data class BranchArgs(
public val appId: Output? = null,
public val backend: Output? = null,
public val basicAuthConfig: Output? = null,
public val branchName: Output? = null,
public val buildSpec: Output? = null,
public val description: Output? = null,
public val enableAutoBuild: Output? = null,
public val enablePerformanceMode: Output? = null,
public val enablePullRequestPreview: Output? = null,
public val environmentVariables: Output>? = null,
public val framework: Output? = null,
public val pullRequestEnvironmentName: Output? = null,
public val stage: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.amplify.BranchArgs =
com.pulumi.awsnative.amplify.BranchArgs.builder()
.appId(appId?.applyValue({ args0 -> args0 }))
.backend(backend?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.basicAuthConfig(basicAuthConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.branchName(branchName?.applyValue({ args0 -> args0 }))
.buildSpec(buildSpec?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.enableAutoBuild(enableAutoBuild?.applyValue({ args0 -> args0 }))
.enablePerformanceMode(enablePerformanceMode?.applyValue({ args0 -> args0 }))
.enablePullRequestPreview(enablePullRequestPreview?.applyValue({ args0 -> args0 }))
.environmentVariables(
environmentVariables?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.framework(framework?.applyValue({ args0 -> args0 }))
.pullRequestEnvironmentName(pullRequestEnvironmentName?.applyValue({ args0 -> args0 }))
.stage(stage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [BranchArgs].
*/
@PulumiTagMarker
public class BranchArgsBuilder internal constructor() {
private var appId: Output? = null
private var backend: Output? = null
private var basicAuthConfig: Output? = null
private var branchName: Output? = null
private var buildSpec: Output? = null
private var description: Output? = null
private var enableAutoBuild: Output? = null
private var enablePerformanceMode: Output? = null
private var enablePullRequestPreview: Output? = null
private var environmentVariables: Output>? = null
private var framework: Output? = null
private var pullRequestEnvironmentName: Output? = null
private var stage: Output? = null
private var tags: Output>? = null
/**
* @param value The unique ID for an Amplify app.
*/
@JvmName("atcaohxacdniuntu")
public suspend fun appId(`value`: Output) {
this.appId = value
}
/**
* @param value The backend for a `Branch` of an Amplify app. Use for a backend created from an AWS CloudFormation stack.
* This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
*/
@JvmName("yxjnyihvuhjlkxvh")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format `user:password` .
*/
@JvmName("wongpkscgmnokwmd")
public suspend fun basicAuthConfig(`value`: Output) {
this.basicAuthConfig = value
}
/**
* @param value The name for the branch.
*/
@JvmName("abbcbcatsbxykpnq")
public suspend fun branchName(`value`: Output) {
this.branchName = value
}
/**
* @param value The build specification (build spec) for the branch.
*/
@JvmName("rgdixrrtghjhluun")
public suspend fun buildSpec(`value`: Output) {
this.buildSpec = value
}
/**
* @param value The description for the branch that is part of an Amplify app.
*/
@JvmName("fwyfahnutgaqeipd")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Enables auto building for the branch.
*/
@JvmName("rygndvbpmlsmcfqm")
public suspend fun enableAutoBuild(`value`: Output) {
this.enableAutoBuild = value
}
/**
* @param value Enables performance mode for the branch.
* Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.
*/
@JvmName("hcinuirrgcqveanr")
public suspend fun enablePerformanceMode(`value`: Output) {
this.enablePerformanceMode = value
}
/**
* @param value Specifies whether Amplify Hosting creates a preview for each pull request that is made for this branch. If this property is enabled, Amplify deploys your app to a unique preview URL after each pull request is opened. Development and QA teams can use this preview to test the pull request before it's merged into a production or integration branch.
* To provide backend support for your preview, Amplify automatically provisions a temporary backend environment that it deletes when the pull request is closed. If you want to specify a dedicated backend environment for your previews, use the `PullRequestEnvironmentName` property.
* For more information, see [Web Previews](https://docs.aws.amazon.com/amplify/latest/userguide/pr-previews.html) in the *AWS Amplify Hosting User Guide* .
*/
@JvmName("douoxbpdubarnwqv")
public suspend fun enablePullRequestPreview(`value`: Output) {
this.enablePullRequestPreview = value
}
/**
* @param value The environment variables for the branch.
*/
@JvmName("dwkwrkfbqmpwaoak")
public suspend fun environmentVariables(`value`: Output>) {
this.environmentVariables = value
}
@JvmName("ypunnvkrvcrnrapu")
public suspend fun environmentVariables(vararg values: Output) {
this.environmentVariables = Output.all(values.asList())
}
/**
* @param values The environment variables for the branch.
*/
@JvmName("htmmckkjecmkjinq")
public suspend fun environmentVariables(values: List