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

com.pulumi.awsnative.iot.kotlin.JobTemplateArgs.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.iot.kotlin

import com.pulumi.awsnative.iot.JobTemplateArgs.builder
import com.pulumi.awsnative.iot.kotlin.inputs.AbortConfigPropertiesArgs
import com.pulumi.awsnative.iot.kotlin.inputs.AbortConfigPropertiesArgsBuilder
import com.pulumi.awsnative.iot.kotlin.inputs.JobExecutionsRetryConfigPropertiesArgs
import com.pulumi.awsnative.iot.kotlin.inputs.JobExecutionsRetryConfigPropertiesArgsBuilder
import com.pulumi.awsnative.iot.kotlin.inputs.JobExecutionsRolloutConfigPropertiesArgs
import com.pulumi.awsnative.iot.kotlin.inputs.JobExecutionsRolloutConfigPropertiesArgsBuilder
import com.pulumi.awsnative.iot.kotlin.inputs.JobTemplateMaintenanceWindowArgs
import com.pulumi.awsnative.iot.kotlin.inputs.JobTemplateMaintenanceWindowArgsBuilder
import com.pulumi.awsnative.iot.kotlin.inputs.PresignedUrlConfigPropertiesArgs
import com.pulumi.awsnative.iot.kotlin.inputs.PresignedUrlConfigPropertiesArgsBuilder
import com.pulumi.awsnative.iot.kotlin.inputs.TimeoutConfigPropertiesArgs
import com.pulumi.awsnative.iot.kotlin.inputs.TimeoutConfigPropertiesArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
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.collections.List
import kotlin.jvm.JvmName

/**
 * Job templates enable you to preconfigure jobs so that you can deploy them to multiple sets of target devices.
 * @property abortConfig The criteria that determine when and how a job abort takes place.
 * @property description A description of the Job Template.
 * @property destinationPackageVersions The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( `$package` ) when the job successfully completes.
 * *Note:* Up to 25 package version ARNS are allowed.
 * @property document The job document. Required if you don't specify a value for documentSource.
 * @property documentSource An S3 link to the job document to use in the template. Required if you don't specify a value for document.
 * @property jobArn Optional for copying a JobTemplate from a pre-existing Job configuration.
 * @property jobExecutionsRetryConfig Allows you to create the criteria to retry a job.
 * @property jobExecutionsRolloutConfig Allows you to create a staged rollout of a job.
 * @property jobTemplateId A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.
 * @property maintenanceWindows An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
 * @property presignedUrlConfig Configuration for pre-signed S3 URLs.
 * @property tags Metadata that can be used to manage the JobTemplate.
 * @property timeoutConfig Specifies the amount of time each device has to finish its execution of the job.
 */
public data class JobTemplateArgs(
    public val abortConfig: Output? = null,
    public val description: Output? = null,
    public val destinationPackageVersions: Output>? = null,
    public val document: Output? = null,
    public val documentSource: Output? = null,
    public val jobArn: Output? = null,
    public val jobExecutionsRetryConfig: Output? = null,
    public val jobExecutionsRolloutConfig: Output? = null,
    public val jobTemplateId: Output? = null,
    public val maintenanceWindows: Output>? = null,
    public val presignedUrlConfig: Output? = null,
    public val tags: Output>? = null,
    public val timeoutConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iot.JobTemplateArgs =
        com.pulumi.awsnative.iot.JobTemplateArgs.builder()
            .abortConfig(abortConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .destinationPackageVersions(
                destinationPackageVersions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .document(document?.applyValue({ args0 -> args0 }))
            .documentSource(documentSource?.applyValue({ args0 -> args0 }))
            .jobArn(jobArn?.applyValue({ args0 -> args0 }))
            .jobExecutionsRetryConfig(
                jobExecutionsRetryConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .jobExecutionsRolloutConfig(
                jobExecutionsRolloutConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .jobTemplateId(jobTemplateId?.applyValue({ args0 -> args0 }))
            .maintenanceWindows(
                maintenanceWindows?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .presignedUrlConfig(
                presignedUrlConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .timeoutConfig(timeoutConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [JobTemplateArgs].
 */
@PulumiTagMarker
public class JobTemplateArgsBuilder internal constructor() {
    private var abortConfig: Output? = null

    private var description: Output? = null

    private var destinationPackageVersions: Output>? = null

    private var document: Output? = null

    private var documentSource: Output? = null

    private var jobArn: Output? = null

    private var jobExecutionsRetryConfig: Output? = null

    private var jobExecutionsRolloutConfig: Output? = null

    private var jobTemplateId: Output? = null

    private var maintenanceWindows: Output>? = null

    private var presignedUrlConfig: Output? = null

    private var tags: Output>? = null

    private var timeoutConfig: Output? = null

    /**
     * @param value The criteria that determine when and how a job abort takes place.
     */
    @JvmName("uenndcxuknxsvcxl")
    public suspend fun abortConfig(`value`: Output) {
        this.abortConfig = value
    }

    /**
     * @param value A description of the Job Template.
     */
    @JvmName("edyhosmokuuayqir")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( `$package` ) when the job successfully completes.
     * *Note:* Up to 25 package version ARNS are allowed.
     */
    @JvmName("lfhmpqrigwtqgsce")
    public suspend fun destinationPackageVersions(`value`: Output>) {
        this.destinationPackageVersions = value
    }

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

    /**
     * @param values The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( `$package` ) when the job successfully completes.
     * *Note:* Up to 25 package version ARNS are allowed.
     */
    @JvmName("dprhppnhwunkfila")
    public suspend fun destinationPackageVersions(values: List>) {
        this.destinationPackageVersions = Output.all(values)
    }

    /**
     * @param value The job document. Required if you don't specify a value for documentSource.
     */
    @JvmName("dfolgofrfffkafww")
    public suspend fun document(`value`: Output) {
        this.document = value
    }

    /**
     * @param value An S3 link to the job document to use in the template. Required if you don't specify a value for document.
     */
    @JvmName("mltxlaugsufehmiu")
    public suspend fun documentSource(`value`: Output) {
        this.documentSource = value
    }

    /**
     * @param value Optional for copying a JobTemplate from a pre-existing Job configuration.
     */
    @JvmName("lejegyrtfijbyjyg")
    public suspend fun jobArn(`value`: Output) {
        this.jobArn = value
    }

    /**
     * @param value Allows you to create the criteria to retry a job.
     */
    @JvmName("yijiwruhofftmlko")
    public suspend fun jobExecutionsRetryConfig(`value`: Output) {
        this.jobExecutionsRetryConfig = value
    }

    /**
     * @param value Allows you to create a staged rollout of a job.
     */
    @JvmName("efwufdabwameakcn")
    public suspend fun jobExecutionsRolloutConfig(`value`: Output) {
        this.jobExecutionsRolloutConfig = value
    }

    /**
     * @param value A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.
     */
    @JvmName("uassnlwtabofdlje")
    public suspend fun jobTemplateId(`value`: Output) {
        this.jobTemplateId = value
    }

    /**
     * @param value An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("bbjetbpjaejbhjxs")
    public suspend fun maintenanceWindows(`value`: Output>) {
        this.maintenanceWindows = value
    }

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

    /**
     * @param values An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("gxknldpscgwkpiiy")
    public suspend fun maintenanceWindows(values: List>) {
        this.maintenanceWindows = Output.all(values)
    }

    /**
     * @param value Configuration for pre-signed S3 URLs.
     */
    @JvmName("gqsoywpnaswywhkm")
    public suspend fun presignedUrlConfig(`value`: Output) {
        this.presignedUrlConfig = value
    }

    /**
     * @param value Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("ljckqvomqrbhblbr")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("vrlhxqirwvgxstvl")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specifies the amount of time each device has to finish its execution of the job.
     */
    @JvmName("bavvlaqhnvoenaco")
    public suspend fun timeoutConfig(`value`: Output) {
        this.timeoutConfig = value
    }

    /**
     * @param value The criteria that determine when and how a job abort takes place.
     */
    @JvmName("raacoeqpbkwjbwxs")
    public suspend fun abortConfig(`value`: AbortConfigPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.abortConfig = mapped
    }

    /**
     * @param argument The criteria that determine when and how a job abort takes place.
     */
    @JvmName("grhcohlcyskaaxql")
    public suspend fun abortConfig(argument: suspend AbortConfigPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = AbortConfigPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.abortConfig = mapped
    }

    /**
     * @param value A description of the Job Template.
     */
    @JvmName("igseqrshdhcrlieq")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( `$package` ) when the job successfully completes.
     * *Note:* Up to 25 package version ARNS are allowed.
     */
    @JvmName("ieqytbqsskqotvdu")
    public suspend fun destinationPackageVersions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationPackageVersions = mapped
    }

    /**
     * @param values The package version Amazon Resource Names (ARNs) that are installed on the device’s reserved named shadow ( `$package` ) when the job successfully completes.
     * *Note:* Up to 25 package version ARNS are allowed.
     */
    @JvmName("kbhneruueacaauts")
    public suspend fun destinationPackageVersions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationPackageVersions = mapped
    }

    /**
     * @param value The job document. Required if you don't specify a value for documentSource.
     */
    @JvmName("rfwtnabcpowjaann")
    public suspend fun document(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.document = mapped
    }

    /**
     * @param value An S3 link to the job document to use in the template. Required if you don't specify a value for document.
     */
    @JvmName("xweurhmeyrhxsivp")
    public suspend fun documentSource(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.documentSource = mapped
    }

    /**
     * @param value Optional for copying a JobTemplate from a pre-existing Job configuration.
     */
    @JvmName("ordixjvnhqkungbq")
    public suspend fun jobArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobArn = mapped
    }

    /**
     * @param value Allows you to create the criteria to retry a job.
     */
    @JvmName("bkbjlhgfskonnkvm")
    public suspend fun jobExecutionsRetryConfig(`value`: JobExecutionsRetryConfigPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobExecutionsRetryConfig = mapped
    }

    /**
     * @param argument Allows you to create the criteria to retry a job.
     */
    @JvmName("kismanxvdbuqofri")
    public suspend fun jobExecutionsRetryConfig(argument: suspend JobExecutionsRetryConfigPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobExecutionsRetryConfigPropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.jobExecutionsRetryConfig = mapped
    }

    /**
     * @param value Allows you to create a staged rollout of a job.
     */
    @JvmName("daowpibcgeytfcwc")
    public suspend fun jobExecutionsRolloutConfig(`value`: JobExecutionsRolloutConfigPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobExecutionsRolloutConfig = mapped
    }

    /**
     * @param argument Allows you to create a staged rollout of a job.
     */
    @JvmName("vnubkmjmodqlwyql")
    public suspend fun jobExecutionsRolloutConfig(argument: suspend JobExecutionsRolloutConfigPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobExecutionsRolloutConfigPropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.jobExecutionsRolloutConfig = mapped
    }

    /**
     * @param value A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.
     */
    @JvmName("llhwvihabuxmprhj")
    public suspend fun jobTemplateId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobTemplateId = mapped
    }

    /**
     * @param value An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("vghnlsvmfrmjwsfo")
    public suspend fun maintenanceWindows(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenanceWindows = mapped
    }

    /**
     * @param argument An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("cppyxnhyvnmfqjvt")
    public suspend fun maintenanceWindows(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateMaintenanceWindowArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.maintenanceWindows = mapped
    }

    /**
     * @param argument An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("gwnrgwlhlrmyipue")
    public suspend fun maintenanceWindows(vararg argument: suspend JobTemplateMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateMaintenanceWindowArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.maintenanceWindows = mapped
    }

    /**
     * @param argument An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("adeeyrjdvgapnrwv")
    public suspend fun maintenanceWindows(argument: suspend JobTemplateMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateMaintenanceWindowArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.maintenanceWindows = mapped
    }

    /**
     * @param values An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
     */
    @JvmName("hecevwtfxjvhgbsx")
    public suspend fun maintenanceWindows(vararg values: JobTemplateMaintenanceWindowArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.maintenanceWindows = mapped
    }

    /**
     * @param value Configuration for pre-signed S3 URLs.
     */
    @JvmName("eugiqwcydcmduvdb")
    public suspend fun presignedUrlConfig(`value`: PresignedUrlConfigPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.presignedUrlConfig = mapped
    }

    /**
     * @param argument Configuration for pre-signed S3 URLs.
     */
    @JvmName("ykyxktimkrbeepqp")
    public suspend fun presignedUrlConfig(argument: suspend PresignedUrlConfigPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = PresignedUrlConfigPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.presignedUrlConfig = mapped
    }

    /**
     * @param value Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("kmbjpcijylaqaayv")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("bgghmujgrmsmavyc")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("bgbeamehdrgtqukj")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("vxntrbseganhukye")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Metadata that can be used to manage the JobTemplate.
     */
    @JvmName("cuviqbvogdunqmcx")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies the amount of time each device has to finish its execution of the job.
     */
    @JvmName("apgxomyoyvfijvkg")
    public suspend fun timeoutConfig(`value`: TimeoutConfigPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutConfig = mapped
    }

    /**
     * @param argument Specifies the amount of time each device has to finish its execution of the job.
     */
    @JvmName("lsduvsucwpsrkiqc")
    public suspend fun timeoutConfig(argument: suspend TimeoutConfigPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = TimeoutConfigPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeoutConfig = mapped
    }

    internal fun build(): JobTemplateArgs = JobTemplateArgs(
        abortConfig = abortConfig,
        description = description,
        destinationPackageVersions = destinationPackageVersions,
        document = document,
        documentSource = documentSource,
        jobArn = jobArn,
        jobExecutionsRetryConfig = jobExecutionsRetryConfig,
        jobExecutionsRolloutConfig = jobExecutionsRolloutConfig,
        jobTemplateId = jobTemplateId,
        maintenanceWindows = maintenanceWindows,
        presignedUrlConfig = presignedUrlConfig,
        tags = tags,
        timeoutConfig = timeoutConfig,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy