com.pulumi.gitlab.kotlin.DeployTokenArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.DeployTokenArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The `gitlab.DeployToken` resource allows to manage the lifecycle of group and project deploy tokens.
* **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/deploy_tokens.html)
* ## Import
* GitLab deploy tokens can be imported using an id made up of `{type}:{type_id}:{deploy_token_id}`, where type is one of: project, group.
* ```sh
* $ pulumi import gitlab:index/deployToken:DeployToken group_token group:1:3
* ```
* ```sh
* $ pulumi import gitlab:index/deployToken:DeployToken project_token project:1:4
* ```
* Note: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.
* @property expiresAt Time the token will expire it, RFC3339 format. Will not expire per default.
* @property group The name or id of the group to add the deploy token to.
* @property name A name to describe the deploy token with.
* @property project The name or id of the project to add the deploy token to.
* @property scopes Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
* @property username A username for the deploy token. Default is `gitlab+deploy-token-{n}`.
*/
public data class DeployTokenArgs(
public val expiresAt: Output? = null,
public val group: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
public val scopes: Output>? = null,
public val username: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.DeployTokenArgs =
com.pulumi.gitlab.DeployTokenArgs.builder()
.expiresAt(expiresAt?.applyValue({ args0 -> args0 }))
.group(group?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.scopes(scopes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.username(username?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DeployTokenArgs].
*/
@PulumiTagMarker
public class DeployTokenArgsBuilder internal constructor() {
private var expiresAt: Output? = null
private var group: Output? = null
private var name: Output? = null
private var project: Output? = null
private var scopes: Output>? = null
private var username: Output? = null
/**
* @param value Time the token will expire it, RFC3339 format. Will not expire per default.
*/
@JvmName("rouxmimqptnvglld")
public suspend fun expiresAt(`value`: Output) {
this.expiresAt = value
}
/**
* @param value The name or id of the group to add the deploy token to.
*/
@JvmName("wkavtqeuxxtnibkw")
public suspend fun group(`value`: Output) {
this.group = value
}
/**
* @param value A name to describe the deploy token with.
*/
@JvmName("gpxguturhhvlwujb")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name or id of the project to add the deploy token to.
*/
@JvmName("clwvpwmcaddjjgbn")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
*/
@JvmName("dbecctkhlvptwkfg")
public suspend fun scopes(`value`: Output>) {
this.scopes = value
}
@JvmName("qhyrbwtqsjtbhjgy")
public suspend fun scopes(vararg values: Output) {
this.scopes = Output.all(values.asList())
}
/**
* @param values Valid values: `read_repository`, `read_registry`, `read_package_registry`, `write_registry`, `write_package_registry`.
*/
@JvmName("lvalidgfjkiovxbn")
public suspend fun scopes(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy