com.pulumi.nomad.kotlin.AclPolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-nomad-kotlin Show documentation
Show all versions of pulumi-nomad-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.nomad.kotlin
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 com.pulumi.nomad.AclPolicyArgs.builder
import com.pulumi.nomad.kotlin.inputs.AclPolicyJobAclArgs
import com.pulumi.nomad.kotlin.inputs.AclPolicyJobAclArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Manages an ACL policy registered in Nomad.
* @property description `(string: "")` - A description of the policy.
* @property jobAcl `(``JobACL``: )` - Options for assigning the ACL rules to a job, group, or task.
* @property name `(string: )` - A unique name for the policy.
* @property rulesHcl `(string: )` - The contents of the policy to register,
* as HCL or JSON.
*/
public data class AclPolicyArgs(
public val description: Output? = null,
public val jobAcl: Output? = null,
public val name: Output? = null,
public val rulesHcl: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.nomad.AclPolicyArgs = com.pulumi.nomad.AclPolicyArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.jobAcl(jobAcl?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.rulesHcl(rulesHcl?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AclPolicyArgs].
*/
@PulumiTagMarker
public class AclPolicyArgsBuilder internal constructor() {
private var description: Output? = null
private var jobAcl: Output? = null
private var name: Output? = null
private var rulesHcl: Output? = null
/**
* @param value `(string: "")` - A description of the policy.
*/
@JvmName("hafwwrguctkhjqxd")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value `(``JobACL``: )` - Options for assigning the ACL rules to a job, group, or task.
*/
@JvmName("rqakmkvrrscbewil")
public suspend fun jobAcl(`value`: Output) {
this.jobAcl = value
}
/**
* @param value `(string: )` - A unique name for the policy.
*/
@JvmName("xkewacurenukmnqf")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value `(string: )` - The contents of the policy to register,
* as HCL or JSON.
*/
@JvmName("ekegmqafujoenjpb")
public suspend fun rulesHcl(`value`: Output) {
this.rulesHcl = value
}
/**
* @param value `(string: "")` - A description of the policy.
*/
@JvmName("xwhuormuynmknumb")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value `(``JobACL``: )` - Options for assigning the ACL rules to a job, group, or task.
*/
@JvmName("mwouwwivgdnmvcxh")
public suspend fun jobAcl(`value`: AclPolicyJobAclArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.jobAcl = mapped
}
/**
* @param argument `(``JobACL``: )` - Options for assigning the ACL rules to a job, group, or task.
*/
@JvmName("oslnfarlfnlaoqkg")
public suspend fun jobAcl(argument: suspend AclPolicyJobAclArgsBuilder.() -> Unit) {
val toBeMapped = AclPolicyJobAclArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.jobAcl = mapped
}
/**
* @param value `(string: )` - A unique name for the policy.
*/
@JvmName("awvkdtftmxwnhwvf")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value `(string: )` - The contents of the policy to register,
* as HCL or JSON.
*/
@JvmName("auquwevyicwedrtt")
public suspend fun rulesHcl(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rulesHcl = mapped
}
internal fun build(): AclPolicyArgs = AclPolicyArgs(
description = description,
jobAcl = jobAcl,
name = name,
rulesHcl = rulesHcl,
)
}