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

com.pulumi.gcp.dataplex.kotlin.inputs.TaskExecutionSpecArgs.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.dataplex.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataplex.inputs.TaskExecutionSpecArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property args The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${taskId} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument. An object containing a list of 'key': value pairs. Example: { 'name': 'wrench', 'mass': '1.3kg', 'count': '3' }.
 * @property kmsKey The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{locationId}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
 * - - -
 * @property maxJobExecutionLifetime The maximum duration after which the job execution is expired. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property serviceAccount Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
 */
public data class TaskExecutionSpecArgs(
    public val args: Output>? = null,
    public val kmsKey: Output? = null,
    public val maxJobExecutionLifetime: Output? = null,
    public val project: Output? = null,
    public val serviceAccount: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataplex.inputs.TaskExecutionSpecArgs =
        com.pulumi.gcp.dataplex.inputs.TaskExecutionSpecArgs.builder()
            .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .kmsKey(kmsKey?.applyValue({ args0 -> args0 }))
            .maxJobExecutionLifetime(maxJobExecutionLifetime?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TaskExecutionSpecArgs].
 */
@PulumiTagMarker
public class TaskExecutionSpecArgsBuilder internal constructor() {
    private var args: Output>? = null

    private var kmsKey: Output? = null

    private var maxJobExecutionLifetime: Output? = null

    private var project: Output? = null

    private var serviceAccount: Output? = null

    /**
     * @param value The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${taskId} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument. An object containing a list of 'key': value pairs. Example: { 'name': 'wrench', 'mass': '1.3kg', 'count': '3' }.
     */
    @JvmName("djxrpcnbalcccebl")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

    /**
     * @param value The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{locationId}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
     * - - -
     */
    @JvmName("mwdnvioyoctxkles")
    public suspend fun kmsKey(`value`: Output) {
        this.kmsKey = value
    }

    /**
     * @param value The maximum duration after which the job execution is expired. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
     */
    @JvmName("hifeihfukvxfvrfm")
    public suspend fun maxJobExecutionLifetime(`value`: Output) {
        this.maxJobExecutionLifetime = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("yvekfmcpovagwoos")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
     */
    @JvmName("cicibsrenglhjvgw")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${taskId} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument. An object containing a list of 'key': value pairs. Example: { 'name': 'wrench', 'mass': '1.3kg', 'count': '3' }.
     */
    @JvmName("sbxomgrgkxjghrqb")
    public suspend fun args(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${taskId} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument. An object containing a list of 'key': value pairs. Example: { 'name': 'wrench', 'mass': '1.3kg', 'count': '3' }.
     */
    @JvmName("ppyvgykcyeevburd")
    public fun args(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{locationId}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.
     * - - -
     */
    @JvmName("kvniskedeuqfjmjt")
    public suspend fun kmsKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKey = mapped
    }

    /**
     * @param value The maximum duration after which the job execution is expired. A duration in seconds with up to nine fractional digits, ending with 's'. Example: '3.5s'.
     */
    @JvmName("jadcroxxppjbundv")
    public suspend fun maxJobExecutionLifetime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxJobExecutionLifetime = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("twrxgjmktbpjvrcd")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Service account to use to execute a task. If not provided, the default Compute service account for the project is used.
     */
    @JvmName("hapcstpgrownacnp")
    public suspend fun serviceAccount(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    internal fun build(): TaskExecutionSpecArgs = TaskExecutionSpecArgs(
        args = args,
        kmsKey = kmsKey,
        maxJobExecutionLifetime = maxJobExecutionLifetime,
        project = project,
        serviceAccount = serviceAccount ?: throw PulumiNullFieldException("serviceAccount"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy