com.pulumi.cloudflare.kotlin.ApiTokenArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.cloudflare.kotlin
import com.pulumi.cloudflare.ApiTokenArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.ApiTokenConditionArgs
import com.pulumi.cloudflare.kotlin.inputs.ApiTokenConditionArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.ApiTokenPolicyArgs
import com.pulumi.cloudflare.kotlin.inputs.ApiTokenPolicyArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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.collections.List
import kotlin.jvm.JvmName
/**
* Provides a resource which manages Cloudflare API tokens.
* Read more about permission groups and their applicable scopes in the
* [developer documentation](https://developers.cloudflare.com/api/tokens/create/permissions).
* @property condition Conditions under which the token should be considered valid.
* @property expiresOn The expiration time on or after which the token MUST NOT be accepted for processing.
* @property name Name of the API Token.
* @property notBefore The time before which the token MUST NOT be accepted for processing.
* @property policies Permissions policy. Multiple policy blocks can be defined.
*/
public data class ApiTokenArgs(
public val condition: Output? = null,
public val expiresOn: Output? = null,
public val name: Output? = null,
public val notBefore: Output? = null,
public val policies: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ApiTokenArgs =
com.pulumi.cloudflare.ApiTokenArgs.builder()
.condition(condition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.expiresOn(expiresOn?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.notBefore(notBefore?.applyValue({ args0 -> args0 }))
.policies(
policies?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ApiTokenArgs].
*/
@PulumiTagMarker
public class ApiTokenArgsBuilder internal constructor() {
private var condition: Output? = null
private var expiresOn: Output? = null
private var name: Output? = null
private var notBefore: Output? = null
private var policies: Output>? = null
/**
* @param value Conditions under which the token should be considered valid.
*/
@JvmName("iiixlxanvrinilmx")
public suspend fun condition(`value`: Output) {
this.condition = value
}
/**
* @param value The expiration time on or after which the token MUST NOT be accepted for processing.
*/
@JvmName("bubhipvwutmkymrl")
public suspend fun expiresOn(`value`: Output) {
this.expiresOn = value
}
/**
* @param value Name of the API Token.
*/
@JvmName("gfcrehwhpwjbuobt")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The time before which the token MUST NOT be accepted for processing.
*/
@JvmName("wynuuatadibaoegp")
public suspend fun notBefore(`value`: Output) {
this.notBefore = value
}
/**
* @param value Permissions policy. Multiple policy blocks can be defined.
*/
@JvmName("aklqrwbrgamnuqmy")
public suspend fun policies(`value`: Output>) {
this.policies = value
}
@JvmName("qnnrqoxmxwdncwys")
public suspend fun policies(vararg values: Output) {
this.policies = Output.all(values.asList())
}
/**
* @param values Permissions policy. Multiple policy blocks can be defined.
*/
@JvmName("vmhqipcafnvkbaiu")
public suspend fun policies(values: List