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

com.pulumi.awsnative.deadline.kotlin.Queue.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.deadline.kotlin

import com.pulumi.awsnative.deadline.kotlin.enums.QueueDefaultQueueBudgetAction
import com.pulumi.awsnative.deadline.kotlin.outputs.QueueJobAttachmentSettings
import com.pulumi.awsnative.deadline.kotlin.outputs.QueueJobRunAsUser
import com.pulumi.awsnative.kotlin.outputs.Tag
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.deadline.kotlin.enums.QueueDefaultQueueBudgetAction.Companion.toKotlin as queueDefaultQueueBudgetActionToKotlin
import com.pulumi.awsnative.deadline.kotlin.outputs.QueueJobAttachmentSettings.Companion.toKotlin as queueJobAttachmentSettingsToKotlin
import com.pulumi.awsnative.deadline.kotlin.outputs.QueueJobRunAsUser.Companion.toKotlin as queueJobRunAsUserToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [Queue].
 */
@PulumiTagMarker
public class QueueResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: QueueArgs = QueueArgs()

    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 QueueArgsBuilder.() -> Unit) {
        val builder = QueueArgsBuilder()
        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(): Queue {
        val builtJavaResource = com.pulumi.awsnative.deadline.Queue(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Queue(builtJavaResource)
    }
}

/**
 * Definition of AWS::Deadline::Queue Resource Type
 */
public class Queue internal constructor(
    override val javaResource: com.pulumi.awsnative.deadline.Queue,
) : KotlinCustomResource(javaResource, QueueMapper) {
    /**
     * The identifiers of the storage profiles that this queue can use to share assets between workers using different operating systems.
     */
    public val allowedStorageProfileIds: Output>?
        get() = javaResource.allowedStorageProfileIds().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the queue.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The default action taken on a queue summary if a budget wasn't configured.
     */
    public val defaultBudgetAction: Output?
        get() = javaResource.defaultBudgetAction().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> queueDefaultQueueBudgetActionToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A description of the queue that helps identify what the queue is used for.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The display name of the queue summary to update.
     * > This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.
     */
    public val displayName: Output
        get() = javaResource.displayName().applyValue({ args0 -> args0 })

    /**
     * The farm ID.
     */
    public val farmId: Output
        get() = javaResource.farmId().applyValue({ args0 -> args0 })

    /**
     * The job attachment settings. These are the Amazon S3 bucket name and the Amazon S3 prefix.
     */
    public val jobAttachmentSettings: Output?
        get() = javaResource.jobAttachmentSettings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> queueJobAttachmentSettingsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Identifies the user for a job.
     */
    public val jobRunAsUser: Output?
        get() = javaResource.jobRunAsUser().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    queueJobRunAsUserToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The queue ID.
     */
    public val queueId: Output
        get() = javaResource.queueId().applyValue({ args0 -> args0 })

    /**
     * The file system location that the queue uses.
     */
    public val requiredFileSystemLocationNames: Output>?
        get() = javaResource.requiredFileSystemLocationNames().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the IAM role that workers use when running jobs in this queue.
     */
    public val roleArn: Output?
        get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object QueueMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.deadline.Queue::class == javaResource::class

    override fun map(javaResource: Resource): Queue = Queue(
        javaResource as
            com.pulumi.awsnative.deadline.Queue,
    )
}

/**
 * @see [Queue].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Queue].
 */
public suspend fun queue(name: String, block: suspend QueueResourceBuilder.() -> Unit): Queue {
    val builder = QueueResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Queue].
 * @param name The _unique_ name of the resulting resource.
 */
public fun queue(name: String): Queue {
    val builder = QueueResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy