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

com.pulumi.awsnative.batch.kotlin.JobDefinitionArgs.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.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.batch.kotlin

import com.pulumi.awsnative.batch.JobDefinitionArgs.builder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionContainerPropertiesArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionContainerPropertiesArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionEcsPropertiesArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionEcsPropertiesArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionEksPropertiesArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionEksPropertiesArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionNodePropertiesArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionNodePropertiesArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionRetryStrategyArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionRetryStrategyArgsBuilder
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionTimeoutArgs
import com.pulumi.awsnative.batch.kotlin.inputs.JobDefinitionTimeoutArgsBuilder
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.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Batch::JobDefinition
 * @property containerProperties An object with properties specific to Amazon ECS-based jobs. When `containerProperties` is used in the job definition, it can't be used in addition to `eksProperties` , `ecsProperties` , or `nodeProperties` .
 * @property ecsProperties An object that contains the properties for the Amazon ECS resources of a job.When `ecsProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `eksProperties` , or `nodeProperties` .
 * @property eksProperties An object with properties that are specific to Amazon EKS-based jobs. When `eksProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `nodeProperties` .
 * @property jobDefinitionName The name of the job definition.
 * @property nodeProperties An object with properties that are specific to multi-node parallel jobs. When `nodeProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `eksProperties` .
 * > If the job runs on Fargate resources, don't specify `nodeProperties` . Use `containerProperties` instead.
 * @property parameters Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a `SubmitJob` request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see [Job definition parameters](https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html) in the *AWS Batch User Guide* .
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
 * @property platformCapabilities The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
 * @property propagateTags Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the `FAILED` state.
 * @property retryStrategy The retry strategy to use for failed jobs that are submitted with this job definition.
 * @property schedulingPriority The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
 * @property tags The tags that are applied to the job definition.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
 * @property timeout The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.
 * @property type The type of job definition. For more information about multi-node parallel jobs, see [Creating a multi-node parallel job definition](https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html) in the *AWS Batch User Guide* .
 * - If the value is `container` , then one of the following is required: `containerProperties` , `ecsProperties` , or `eksProperties` .
 * - If the value is `multinode` , then `nodeProperties` is required.
 * > If the job is run on Fargate resources, then `multinode` isn't supported.
 */
public data class JobDefinitionArgs(
    public val containerProperties: Output? = null,
    public val ecsProperties: Output? = null,
    public val eksProperties: Output? = null,
    public val jobDefinitionName: Output? = null,
    public val nodeProperties: Output? = null,
    public val parameters: Output? = null,
    public val platformCapabilities: Output>? = null,
    public val propagateTags: Output? = null,
    public val retryStrategy: Output? = null,
    public val schedulingPriority: Output? = null,
    public val tags: Output? = null,
    public val timeout: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.batch.JobDefinitionArgs =
        com.pulumi.awsnative.batch.JobDefinitionArgs.builder()
            .containerProperties(
                containerProperties?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .ecsProperties(ecsProperties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .eksProperties(eksProperties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .jobDefinitionName(jobDefinitionName?.applyValue({ args0 -> args0 }))
            .nodeProperties(nodeProperties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .parameters(parameters?.applyValue({ args0 -> args0 }))
            .platformCapabilities(platformCapabilities?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .propagateTags(propagateTags?.applyValue({ args0 -> args0 }))
            .retryStrategy(retryStrategy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schedulingPriority(schedulingPriority?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0 }))
            .timeout(timeout?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobDefinitionArgs].
 */
@PulumiTagMarker
public class JobDefinitionArgsBuilder internal constructor() {
    private var containerProperties: Output? = null

    private var ecsProperties: Output? = null

    private var eksProperties: Output? = null

    private var jobDefinitionName: Output? = null

    private var nodeProperties: Output? = null

    private var parameters: Output? = null

    private var platformCapabilities: Output>? = null

    private var propagateTags: Output? = null

    private var retryStrategy: Output? = null

    private var schedulingPriority: Output? = null

    private var tags: Output? = null

    private var timeout: Output? = null

    private var type: Output? = null

    /**
     * @param value An object with properties specific to Amazon ECS-based jobs. When `containerProperties` is used in the job definition, it can't be used in addition to `eksProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("xssrrcemqwghuqtn")
    public suspend fun containerProperties(`value`: Output) {
        this.containerProperties = value
    }

    /**
     * @param value An object that contains the properties for the Amazon ECS resources of a job.When `ecsProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `eksProperties` , or `nodeProperties` .
     */
    @JvmName("lntpcgpjpebaxmit")
    public suspend fun ecsProperties(`value`: Output) {
        this.ecsProperties = value
    }

    /**
     * @param value An object with properties that are specific to Amazon EKS-based jobs. When `eksProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("cqupnvfwhvaagjmg")
    public suspend fun eksProperties(`value`: Output) {
        this.eksProperties = value
    }

    /**
     * @param value The name of the job definition.
     */
    @JvmName("egoandarellesgny")
    public suspend fun jobDefinitionName(`value`: Output) {
        this.jobDefinitionName = value
    }

    /**
     * @param value An object with properties that are specific to multi-node parallel jobs. When `nodeProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `eksProperties` .
     * > If the job runs on Fargate resources, don't specify `nodeProperties` . Use `containerProperties` instead.
     */
    @JvmName("virxyqoddrrhghcy")
    public suspend fun nodeProperties(`value`: Output) {
        this.nodeProperties = value
    }

    /**
     * @param value Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a `SubmitJob` request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see [Job definition parameters](https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html) in the *AWS Batch User Guide* .
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
     */
    @JvmName("ekrhtgaskdaifhxy")
    public suspend fun parameters(`value`: Output) {
        this.parameters = value
    }

    /**
     * @param value The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
     */
    @JvmName("vaccxrbsbbhnwfoe")
    public suspend fun platformCapabilities(`value`: Output>) {
        this.platformCapabilities = value
    }

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

    /**
     * @param values The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
     */
    @JvmName("nhbmxcgdkrusunbv")
    public suspend fun platformCapabilities(values: List>) {
        this.platformCapabilities = Output.all(values)
    }

    /**
     * @param value Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the `FAILED` state.
     */
    @JvmName("pbscrygkehcikxqf")
    public suspend fun propagateTags(`value`: Output) {
        this.propagateTags = value
    }

    /**
     * @param value The retry strategy to use for failed jobs that are submitted with this job definition.
     */
    @JvmName("gllgofwudvruhaou")
    public suspend fun retryStrategy(`value`: Output) {
        this.retryStrategy = value
    }

    /**
     * @param value The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
     */
    @JvmName("hfjrfrpidrqjslva")
    public suspend fun schedulingPriority(`value`: Output) {
        this.schedulingPriority = value
    }

    /**
     * @param value The tags that are applied to the job definition.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
     */
    @JvmName("ndskhyftecwkndwi")
    public suspend fun tags(`value`: Output) {
        this.tags = value
    }

    /**
     * @param value The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.
     */
    @JvmName("oiwavdjexeoeeibi")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The type of job definition. For more information about multi-node parallel jobs, see [Creating a multi-node parallel job definition](https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html) in the *AWS Batch User Guide* .
     * - If the value is `container` , then one of the following is required: `containerProperties` , `ecsProperties` , or `eksProperties` .
     * - If the value is `multinode` , then `nodeProperties` is required.
     * > If the job is run on Fargate resources, then `multinode` isn't supported.
     */
    @JvmName("bfsjntdquefhgkhc")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value An object with properties specific to Amazon ECS-based jobs. When `containerProperties` is used in the job definition, it can't be used in addition to `eksProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("xxbcoqcpwwayyhnp")
    public suspend fun containerProperties(`value`: JobDefinitionContainerPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerProperties = mapped
    }

    /**
     * @param argument An object with properties specific to Amazon ECS-based jobs. When `containerProperties` is used in the job definition, it can't be used in addition to `eksProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("cxiihvnxtsypdovp")
    public suspend fun containerProperties(argument: suspend JobDefinitionContainerPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionContainerPropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.containerProperties = mapped
    }

    /**
     * @param value An object that contains the properties for the Amazon ECS resources of a job.When `ecsProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `eksProperties` , or `nodeProperties` .
     */
    @JvmName("aencfaychcvrlkug")
    public suspend fun ecsProperties(`value`: JobDefinitionEcsPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ecsProperties = mapped
    }

    /**
     * @param argument An object that contains the properties for the Amazon ECS resources of a job.When `ecsProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `eksProperties` , or `nodeProperties` .
     */
    @JvmName("oevopqvyxvmbhgrh")
    public suspend fun ecsProperties(argument: suspend JobDefinitionEcsPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionEcsPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ecsProperties = mapped
    }

    /**
     * @param value An object with properties that are specific to Amazon EKS-based jobs. When `eksProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("lojfqieqlwfcmkky")
    public suspend fun eksProperties(`value`: JobDefinitionEksPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eksProperties = mapped
    }

    /**
     * @param argument An object with properties that are specific to Amazon EKS-based jobs. When `eksProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `nodeProperties` .
     */
    @JvmName("fgfnlfldumkunpco")
    public suspend fun eksProperties(argument: suspend JobDefinitionEksPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionEksPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.eksProperties = mapped
    }

    /**
     * @param value The name of the job definition.
     */
    @JvmName("vfywsgqesaqfpwaa")
    public suspend fun jobDefinitionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobDefinitionName = mapped
    }

    /**
     * @param value An object with properties that are specific to multi-node parallel jobs. When `nodeProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `eksProperties` .
     * > If the job runs on Fargate resources, don't specify `nodeProperties` . Use `containerProperties` instead.
     */
    @JvmName("bcpjjrijlfgkfmsj")
    public suspend fun nodeProperties(`value`: JobDefinitionNodePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeProperties = mapped
    }

    /**
     * @param argument An object with properties that are specific to multi-node parallel jobs. When `nodeProperties` is used in the job definition, it can't be used in addition to `containerProperties` , `ecsProperties` , or `eksProperties` .
     * > If the job runs on Fargate resources, don't specify `nodeProperties` . Use `containerProperties` instead.
     */
    @JvmName("vecgjrbnbcsrjsud")
    public suspend fun nodeProperties(argument: suspend JobDefinitionNodePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionNodePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nodeProperties = mapped
    }

    /**
     * @param value Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a `SubmitJob` request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see [Job definition parameters](https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html) in the *AWS Batch User Guide* .
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
     */
    @JvmName("rwgngdfwrnrkfhns")
    public suspend fun parameters(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
     */
    @JvmName("ygbbqfpfenykatpo")
    public suspend fun platformCapabilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.platformCapabilities = mapped
    }

    /**
     * @param values The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
     */
    @JvmName("ntrcxoqyjjdjbrej")
    public suspend fun platformCapabilities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.platformCapabilities = mapped
    }

    /**
     * @param value Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the `FAILED` state.
     */
    @JvmName("csdchmhyalrgwtnp")
    public suspend fun propagateTags(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.propagateTags = mapped
    }

    /**
     * @param value The retry strategy to use for failed jobs that are submitted with this job definition.
     */
    @JvmName("hghbsjuoynqfmesx")
    public suspend fun retryStrategy(`value`: JobDefinitionRetryStrategyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retryStrategy = mapped
    }

    /**
     * @param argument The retry strategy to use for failed jobs that are submitted with this job definition.
     */
    @JvmName("crcreyfrplpnalbr")
    public suspend fun retryStrategy(argument: suspend JobDefinitionRetryStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionRetryStrategyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retryStrategy = mapped
    }

    /**
     * @param value The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.
     */
    @JvmName("grfuvahtoyhaseyt")
    public suspend fun schedulingPriority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedulingPriority = mapped
    }

    /**
     * @param value The tags that are applied to the job definition.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Batch::JobDefinition` for more information about the expected schema for this property.
     */
    @JvmName("lavnqumstqikhlyj")
    public suspend fun tags(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.
     */
    @JvmName("ntvtqumrvaqqpjvd")
    public suspend fun timeout(`value`: JobDefinitionTimeoutArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param argument The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren't finished.
     */
    @JvmName("afqkgjrjondarcli")
    public suspend fun timeout(argument: suspend JobDefinitionTimeoutArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionTimeoutArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeout = mapped
    }

    /**
     * @param value The type of job definition. For more information about multi-node parallel jobs, see [Creating a multi-node parallel job definition](https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html) in the *AWS Batch User Guide* .
     * - If the value is `container` , then one of the following is required: `containerProperties` , `ecsProperties` , or `eksProperties` .
     * - If the value is `multinode` , then `nodeProperties` is required.
     * > If the job is run on Fargate resources, then `multinode` isn't supported.
     */
    @JvmName("gtbnpyguqglegjcu")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): JobDefinitionArgs = JobDefinitionArgs(
        containerProperties = containerProperties,
        ecsProperties = ecsProperties,
        eksProperties = eksProperties,
        jobDefinitionName = jobDefinitionName,
        nodeProperties = nodeProperties,
        parameters = parameters,
        platformCapabilities = platformCapabilities,
        propagateTags = propagateTags,
        retryStrategy = retryStrategy,
        schedulingPriority = schedulingPriority,
        tags = tags,
        timeout = timeout,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy