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

com.pulumi.gcp.clouddeploy.kotlin.inputs.TargetExecutionConfigArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.clouddeploy.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property artifactStorage Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.
 * @property executionTimeout Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
 * @property serviceAccount Optional. Google service account to use for execution. If unspecified, the project execution service account ([email protected]) is used.
 * @property usages Required. Usages when this configuration should be applied.
 * @property workerPool Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
 */
public data class TargetExecutionConfigArgs(
    public val artifactStorage: Output? = null,
    public val executionTimeout: Output? = null,
    public val serviceAccount: Output? = null,
    public val usages: Output>,
    public val workerPool: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs =
        com.pulumi.gcp.clouddeploy.inputs.TargetExecutionConfigArgs.builder()
            .artifactStorage(artifactStorage?.applyValue({ args0 -> args0 }))
            .executionTimeout(executionTimeout?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .usages(usages.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .workerPool(workerPool?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TargetExecutionConfigArgs].
 */
@PulumiTagMarker
public class TargetExecutionConfigArgsBuilder internal constructor() {
    private var artifactStorage: Output? = null

    private var executionTimeout: Output? = null

    private var serviceAccount: Output? = null

    private var usages: Output>? = null

    private var workerPool: Output? = null

    /**
     * @param value Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.
     */
    @JvmName("nppxepefwibfmmpd")
    public suspend fun artifactStorage(`value`: Output) {
        this.artifactStorage = value
    }

    /**
     * @param value Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
     */
    @JvmName("gxsneemfyntxsmcx")
    public suspend fun executionTimeout(`value`: Output) {
        this.executionTimeout = value
    }

    /**
     * @param value Optional. Google service account to use for execution. If unspecified, the project execution service account ([email protected]) is used.
     */
    @JvmName("hklkxrjqsdgmcgde")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value Required. Usages when this configuration should be applied.
     */
    @JvmName("iifgiikkgpstdxeb")
    public suspend fun usages(`value`: Output>) {
        this.usages = value
    }

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

    /**
     * @param values Required. Usages when this configuration should be applied.
     */
    @JvmName("bulpagjlblgmnebd")
    public suspend fun usages(values: List>) {
        this.usages = Output.all(values)
    }

    /**
     * @param value Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
     */
    @JvmName("kjpliklonfkjcoxd")
    public suspend fun workerPool(`value`: Output) {
        this.workerPool = value
    }

    /**
     * @param value Optional. Cloud Storage location in which to store execution outputs. This can either be a bucket ("gs://my-bucket") or a path within a bucket ("gs://my-bucket/my-dir"). If unspecified, a default bucket located in the same region will be used.
     */
    @JvmName("ahqnpenagtdyyhkj")
    public suspend fun artifactStorage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.artifactStorage = mapped
    }

    /**
     * @param value Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and 24h in seconds format. If unspecified, a default timeout of 1h is used.
     */
    @JvmName("ptuoxmawkhcolybp")
    public suspend fun executionTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionTimeout = mapped
    }

    /**
     * @param value Optional. Google service account to use for execution. If unspecified, the project execution service account ([email protected]) is used.
     */
    @JvmName("qcxabuswmyhjbtcm")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value Required. Usages when this configuration should be applied.
     */
    @JvmName("ndenfekrnodgiavl")
    public suspend fun usages(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.usages = mapped
    }

    /**
     * @param values Required. Usages when this configuration should be applied.
     */
    @JvmName("xthsdshxcmoiqrur")
    public suspend fun usages(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.usages = mapped
    }

    /**
     * @param value Optional. The resource name of the `WorkerPool`, with the format `projects/{project}/locations/{location}/workerPools/{worker_pool}`. If this optional field is unspecified, the default Cloud Build pool will be used.
     */
    @JvmName("hqpwdslbdmouhbku")
    public suspend fun workerPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerPool = mapped
    }

    internal fun build(): TargetExecutionConfigArgs = TargetExecutionConfigArgs(
        artifactStorage = artifactStorage,
        executionTimeout = executionTimeout,
        serviceAccount = serviceAccount,
        usages = usages ?: throw PulumiNullFieldException("usages"),
        workerPool = workerPool,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy