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

com.pulumi.gitlab.kotlin.InstanceServiceAccountArgs.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.

The 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.InstanceServiceAccountArgs.builder
import com.pulumi.gitlab.kotlin.inputs.InstanceServiceAccountTimeoutsArgs
import com.pulumi.gitlab.kotlin.inputs.InstanceServiceAccountTimeoutsArgsBuilder
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.jvm.JvmName

/**
 * The `gitlab.InstanceServiceAccount` resource allows creating a GitLab instance service account.
 * > In order for a user to create a user account, they must have admin privileges at the instance level. This makes this feature unavailable on `gitlab.com`
 * **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/user_service_accounts.html)
 * @property name The name of the user. If not specified, the default Service account user name is used.
 * @property timeouts
 * @property username The username of the user. If not specified, it’s automatically generated.
 */
public data class InstanceServiceAccountArgs(
    public val name: Output? = null,
    public val timeouts: Output? = null,
    public val username: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.InstanceServiceAccountArgs =
        com.pulumi.gitlab.InstanceServiceAccountArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .username(username?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceServiceAccountArgs].
 */
@PulumiTagMarker
public class InstanceServiceAccountArgsBuilder internal constructor() {
    private var name: Output? = null

    private var timeouts: Output? = null

    private var username: Output? = null

    /**
     * @param value The name of the user. If not specified, the default Service account user name is used.
     */
    @JvmName("vawuxnpssnkdcwlt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("fcbmvyyhovfojpxj")
    public suspend fun timeouts(`value`: Output) {
        this.timeouts = value
    }

    /**
     * @param value The username of the user. If not specified, it’s automatically generated.
     */
    @JvmName("gxbsshgdogcregxv")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value The name of the user. If not specified, the default Service account user name is used.
     */
    @JvmName("cdbbutdmymiwxfvn")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("bmjumvacifmxtpmu")
    public suspend fun timeouts(`value`: InstanceServiceAccountTimeoutsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeouts = mapped
    }

    /**
     * @param argument
     */
    @JvmName("cthpxwkjrkfpwkji")
    public suspend fun timeouts(argument: suspend InstanceServiceAccountTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceServiceAccountTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    /**
     * @param value The username of the user. If not specified, it’s automatically generated.
     */
    @JvmName("kcnomsnjvcqjlthv")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): InstanceServiceAccountArgs = InstanceServiceAccountArgs(
        name = name,
        timeouts = timeouts,
        username = username,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy