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

com.pulumi.gitlab.kotlin.RunnerArgs.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.4.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gitlab.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.RunnerArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The `gitlab.Runner` resource allows to manage the lifecycle of a runner.
 * A runner can either be registered at an instance level or group level.
 * The runner will be registered at a group level if the token used is from a group, or at an instance level if the token used is for the instance.
 * ~ > Using this resource will register a runner using the deprecated `registration_token` flow. To use the new `authentication_token` flow instead,
 * use the `gitlab.UserRunner` resource!
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner)
 * ## Import
 * A GitLab Runner can be imported using the runner's ID, eg
 * ```sh
 * $ pulumi import gitlab:index/runner:Runner this 1
 * ```
 * @property accessLevel The access_level of the runner. Valid values are: `not_protected`, `ref_protected`.
 * @property description The runner's description.
 * @property locked Whether the runner should be locked for current project.
 * @property maximumTimeout Maximum timeout set when this runner handles the job.
 * @property paused Whether the runner should ignore new jobs.
 * @property registrationToken The registration token used to register the runner.
 * @property runUntagged Whether the runner should handle untagged jobs.
 * @property tagLists List of runner’s tags.
 */
public data class RunnerArgs(
    public val accessLevel: Output? = null,
    public val description: Output? = null,
    public val locked: Output? = null,
    public val maximumTimeout: Output? = null,
    public val paused: Output? = null,
    public val registrationToken: Output? = null,
    public val runUntagged: Output? = null,
    public val tagLists: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.RunnerArgs = com.pulumi.gitlab.RunnerArgs.builder()
        .accessLevel(accessLevel?.applyValue({ args0 -> args0 }))
        .description(description?.applyValue({ args0 -> args0 }))
        .locked(locked?.applyValue({ args0 -> args0 }))
        .maximumTimeout(maximumTimeout?.applyValue({ args0 -> args0 }))
        .paused(paused?.applyValue({ args0 -> args0 }))
        .registrationToken(registrationToken?.applyValue({ args0 -> args0 }))
        .runUntagged(runUntagged?.applyValue({ args0 -> args0 }))
        .tagLists(tagLists?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [RunnerArgs].
 */
@PulumiTagMarker
public class RunnerArgsBuilder internal constructor() {
    private var accessLevel: Output? = null

    private var description: Output? = null

    private var locked: Output? = null

    private var maximumTimeout: Output? = null

    private var paused: Output? = null

    private var registrationToken: Output? = null

    private var runUntagged: Output? = null

    private var tagLists: Output>? = null

    /**
     * @param value The access_level of the runner. Valid values are: `not_protected`, `ref_protected`.
     */
    @JvmName("xfirawfycixrnqaj")
    public suspend fun accessLevel(`value`: Output) {
        this.accessLevel = value
    }

    /**
     * @param value The runner's description.
     */
    @JvmName("mvnrgqfwfoloifru")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Whether the runner should be locked for current project.
     */
    @JvmName("hxdsmjvirfmtygrw")
    public suspend fun locked(`value`: Output) {
        this.locked = value
    }

    /**
     * @param value Maximum timeout set when this runner handles the job.
     */
    @JvmName("abkfvdnfrwgqwwgl")
    public suspend fun maximumTimeout(`value`: Output) {
        this.maximumTimeout = value
    }

    /**
     * @param value Whether the runner should ignore new jobs.
     */
    @JvmName("inuxjubflwwwqhdj")
    public suspend fun paused(`value`: Output) {
        this.paused = value
    }

    /**
     * @param value The registration token used to register the runner.
     */
    @JvmName("tcioqqmxvuoruajx")
    public suspend fun registrationToken(`value`: Output) {
        this.registrationToken = value
    }

    /**
     * @param value Whether the runner should handle untagged jobs.
     */
    @JvmName("payqheuvnkmtjjew")
    public suspend fun runUntagged(`value`: Output) {
        this.runUntagged = value
    }

    /**
     * @param value List of runner’s tags.
     */
    @JvmName("xvklivuqthohryja")
    public suspend fun tagLists(`value`: Output>) {
        this.tagLists = value
    }

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

    /**
     * @param values List of runner’s tags.
     */
    @JvmName("vkiyblcqpystxpir")
    public suspend fun tagLists(values: List>) {
        this.tagLists = Output.all(values)
    }

    /**
     * @param value The access_level of the runner. Valid values are: `not_protected`, `ref_protected`.
     */
    @JvmName("thmspexlkofgqlfp")
    public suspend fun accessLevel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessLevel = mapped
    }

    /**
     * @param value The runner's description.
     */
    @JvmName("rlyunavbpdowlrel")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Whether the runner should be locked for current project.
     */
    @JvmName("ssymmfkybnsfhxtl")
    public suspend fun locked(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.locked = mapped
    }

    /**
     * @param value Maximum timeout set when this runner handles the job.
     */
    @JvmName("ccsbpdwytpaccywa")
    public suspend fun maximumTimeout(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumTimeout = mapped
    }

    /**
     * @param value Whether the runner should ignore new jobs.
     */
    @JvmName("cqhncbnokhycdxug")
    public suspend fun paused(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paused = mapped
    }

    /**
     * @param value The registration token used to register the runner.
     */
    @JvmName("pcntmvsqhkinubyv")
    public suspend fun registrationToken(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registrationToken = mapped
    }

    /**
     * @param value Whether the runner should handle untagged jobs.
     */
    @JvmName("ggvfopiicvadeepk")
    public suspend fun runUntagged(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runUntagged = mapped
    }

    /**
     * @param value List of runner’s tags.
     */
    @JvmName("ndyulchhqqvwvxfp")
    public suspend fun tagLists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagLists = mapped
    }

    /**
     * @param values List of runner’s tags.
     */
    @JvmName("qgrxlgvjnoqfptyj")
    public suspend fun tagLists(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tagLists = mapped
    }

    internal fun build(): RunnerArgs = RunnerArgs(
        accessLevel = accessLevel,
        description = description,
        locked = locked,
        maximumTimeout = maximumTimeout,
        paused = paused,
        registrationToken = registrationToken,
        runUntagged = runUntagged,
        tagLists = tagLists,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy