Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.batch.kotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionContainerProperties
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionEcsProperties
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionEksProperties
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionNodeProperties
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionRetryStrategy
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionTimeout
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionContainerProperties.Companion.toKotlin as jobDefinitionContainerPropertiesToKotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionEcsProperties.Companion.toKotlin as jobDefinitionEcsPropertiesToKotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionEksProperties.Companion.toKotlin as jobDefinitionEksPropertiesToKotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionNodeProperties.Companion.toKotlin as jobDefinitionNodePropertiesToKotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionRetryStrategy.Companion.toKotlin as jobDefinitionRetryStrategyToKotlin
import com.pulumi.awsnative.batch.kotlin.outputs.JobDefinitionTimeout.Companion.toKotlin as jobDefinitionTimeoutToKotlin
/**
* Builder for [JobDefinition].
*/
@PulumiTagMarker
public class JobDefinitionResourceBuilder internal constructor() {
public var name: String? = null
public var args: JobDefinitionArgs = JobDefinitionArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend JobDefinitionArgsBuilder.() -> Unit) {
val builder = JobDefinitionArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): JobDefinition {
val builtJavaResource = com.pulumi.awsnative.batch.JobDefinition(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return JobDefinition(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::Batch::JobDefinition
*/
public class JobDefinition internal constructor(
override val javaResource: com.pulumi.awsnative.batch.JobDefinition,
) : KotlinCustomResource(javaResource, JobDefinitionMapper) {
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* 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` .
*/
public val containerProperties: Output?
get() = javaResource.containerProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> jobDefinitionContainerPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* 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` .
*/
public val ecsProperties: Output?
get() = javaResource.ecsProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> jobDefinitionEcsPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* 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` .
*/
public val eksProperties: Output?
get() = javaResource.eksProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> jobDefinitionEksPropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the job definition.
*/
public val jobDefinitionName: Output?
get() = javaResource.jobDefinitionName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val nodeProperties: Output?
get() = javaResource.nodeProperties().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> jobDefinitionNodePropertiesToKotlin(args0) })
}).orElse(null)
})
/**
* 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.
*/
public val parameters: Output?
get() = javaResource.parameters().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The platform capabilities required by the job definition. If no value is specified, it defaults to `EC2` . Jobs run on Fargate resources specify `FARGATE` .
*/
public val platformCapabilities: Output>?
get() = javaResource.platformCapabilities().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* 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.
*/
public val propagateTags: Output?
get() = javaResource.propagateTags().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The retry strategy to use for failed jobs that are submitted with this job definition.
*/
public val retryStrategy: Output?
get() = javaResource.retryStrategy().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> jobDefinitionRetryStrategyToKotlin(args0) })
}).orElse(null)
})
/**
* 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.
*/
public val schedulingPriority: Output?
get() = javaResource.schedulingPriority().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val tags: Output?
get() = javaResource.tags().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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.
*/
public val timeout: Output?
get() = javaResource.timeout().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
jobDefinitionTimeoutToKotlin(args0)
})
}).orElse(null)
})
/**
* 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 val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object JobDefinitionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.batch.JobDefinition::class == javaResource::class
override fun map(javaResource: Resource): JobDefinition = JobDefinition(
javaResource as
com.pulumi.awsnative.batch.JobDefinition,
)
}
/**
* @see [JobDefinition].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [JobDefinition].
*/
public suspend fun jobDefinition(
name: String,
block: suspend JobDefinitionResourceBuilder.() -> Unit,
): JobDefinition {
val builder = JobDefinitionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [JobDefinition].
* @param name The _unique_ name of the resulting resource.
*/
public fun jobDefinition(name: String): JobDefinition {
val builder = JobDefinitionResourceBuilder()
builder.name(name)
return builder.build()
}