com.pulumi.cloudflare.kotlin.PagesProjectArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.PagesProjectArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectBuildConfigArgs
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectBuildConfigArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectDeploymentConfigsArgs
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectDeploymentConfigsArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectSourceArgs
import com.pulumi.cloudflare.kotlin.inputs.PagesProjectSourceArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Provides a resource which manages Cloudflare Pages projects.
* > If you are using a `source` block configuration, you must first have a
* connected GitHub or GitLab account connected to Cloudflare. See the
* [Getting Started with Pages] documentation on how to link your accounts.
* ## Import
* !> It is not possible to import a pages project with secret environment variables. If you have a secret environment variable, you must remove it from your project before importing it.
* ```sh
* $ pulumi import cloudflare:index/pagesProject:PagesProject example /
* ```
* @property accountId The account identifier to target for the resource.
* @property buildConfig Configuration for the project build process. Read more about the build configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/build-configuration).
* @property deploymentConfigs Configuration for deployments in a project.
* @property name Name of the project.
* @property productionBranch The name of the branch that is used for the production environment.
* @property source Configuration for the project source. Read more about the source configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/branch-build-controls/).
*/
public data class PagesProjectArgs(
public val accountId: Output? = null,
public val buildConfig: Output? = null,
public val deploymentConfigs: Output? = null,
public val name: Output? = null,
public val productionBranch: Output? = null,
public val source: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.PagesProjectArgs =
com.pulumi.cloudflare.PagesProjectArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.buildConfig(buildConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deploymentConfigs(deploymentConfigs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.productionBranch(productionBranch?.applyValue({ args0 -> args0 }))
.source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [PagesProjectArgs].
*/
@PulumiTagMarker
public class PagesProjectArgsBuilder internal constructor() {
private var accountId: Output? = null
private var buildConfig: Output? = null
private var deploymentConfigs: Output? = null
private var name: Output? = null
private var productionBranch: Output? = null
private var source: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("yailfnnqlxnpfdqv")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Configuration for the project build process. Read more about the build configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/build-configuration).
*/
@JvmName("itsbnvemwdmvqxaa")
public suspend fun buildConfig(`value`: Output) {
this.buildConfig = value
}
/**
* @param value Configuration for deployments in a project.
*/
@JvmName("aofxdyqinnfggpmb")
public suspend fun deploymentConfigs(`value`: Output) {
this.deploymentConfigs = value
}
/**
* @param value Name of the project.
*/
@JvmName("lgpoxlwngtnqumkk")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name of the branch that is used for the production environment.
*/
@JvmName("nluxjiggpdrjehej")
public suspend fun productionBranch(`value`: Output) {
this.productionBranch = value
}
/**
* @param value Configuration for the project source. Read more about the source configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/branch-build-controls/).
*/
@JvmName("wntjvfskcktmlfdb")
public suspend fun source(`value`: Output) {
this.source = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("pdanmulibkjfxmvy")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value Configuration for the project build process. Read more about the build configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/build-configuration).
*/
@JvmName("xfppquofiphhywoi")
public suspend fun buildConfig(`value`: PagesProjectBuildConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.buildConfig = mapped
}
/**
* @param argument Configuration for the project build process. Read more about the build configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/build-configuration).
*/
@JvmName("lepvkqbtokobgeny")
public suspend fun buildConfig(argument: suspend PagesProjectBuildConfigArgsBuilder.() -> Unit) {
val toBeMapped = PagesProjectBuildConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.buildConfig = mapped
}
/**
* @param value Configuration for deployments in a project.
*/
@JvmName("ypvwwrulpefxjfkg")
public suspend fun deploymentConfigs(`value`: PagesProjectDeploymentConfigsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deploymentConfigs = mapped
}
/**
* @param argument Configuration for deployments in a project.
*/
@JvmName("fbbnbncyehojqwxj")
public suspend fun deploymentConfigs(argument: suspend PagesProjectDeploymentConfigsArgsBuilder.() -> Unit) {
val toBeMapped = PagesProjectDeploymentConfigsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.deploymentConfigs = mapped
}
/**
* @param value Name of the project.
*/
@JvmName("cijcgekalxqtmaxv")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The name of the branch that is used for the production environment.
*/
@JvmName("ndxdwocwxintutuv")
public suspend fun productionBranch(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.productionBranch = mapped
}
/**
* @param value Configuration for the project source. Read more about the source configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/branch-build-controls/).
*/
@JvmName("vnegepbxunhjplsf")
public suspend fun source(`value`: PagesProjectSourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.source = mapped
}
/**
* @param argument Configuration for the project source. Read more about the source configuration in the [developer documentation](https://developers.cloudflare.com/pages/platform/branch-build-controls/).
*/
@JvmName("tusldevyslhkmwks")
public suspend fun source(argument: suspend PagesProjectSourceArgsBuilder.() -> Unit) {
val toBeMapped = PagesProjectSourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.source = mapped
}
internal fun build(): PagesProjectArgs = PagesProjectArgs(
accountId = accountId,
buildConfig = buildConfig,
deploymentConfigs = deploymentConfigs,
name = name,
productionBranch = productionBranch,
source = source,
)
}