com.pulumi.nomad.kotlin.AclBindingRule.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.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AclBindingRule].
*/
@PulumiTagMarker
public class AclBindingRuleResourceBuilder internal constructor() {
public var name: String? = null
public var args: AclBindingRuleArgs = AclBindingRuleArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AclBindingRuleArgsBuilder.() -> Unit) {
val builder = AclBindingRuleArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AclBindingRule {
val builtJavaResource = com.pulumi.nomad.AclBindingRule(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AclBindingRule(builtJavaResource)
}
}
public class AclBindingRule internal constructor(
override val javaResource: com.pulumi.nomad.AclBindingRule,
) : KotlinCustomResource(javaResource, AclBindingRuleMapper) {
/**
* `(string: )` - Name of the auth method for which this
* rule applies to.
*/
public val authMethod: Output
get() = javaResource.authMethod().applyValue({ args0 -> args0 })
/**
* `(string: )` - Target of the binding. If `bind_type` is
* `role` or `policy` then `bind_name` is required. If `bind_type` is
* `management` than `bind_name` must not be defined.
*/
public val bindName: Output?
get() = javaResource.bindName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* `(string: )` - Adjusts how this binding rule is applied
* at login time. Valid values are `role`, `policy`, and `management`.
*/
public val bindType: Output
get() = javaResource.bindType().applyValue({ args0 -> args0 })
/**
* `(string: "")` - Description for this ACL binding rule.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* `(string: "")` - A boolean expression that matches against verified
* identity attributes returned from the auth method during login.
*/
public val selector: Output?
get() = javaResource.selector().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object AclBindingRuleMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.nomad.AclBindingRule::class == javaResource::class
override fun map(javaResource: Resource): AclBindingRule = AclBindingRule(
javaResource as
com.pulumi.nomad.AclBindingRule,
)
}
/**
* @see [AclBindingRule].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AclBindingRule].
*/
public suspend fun aclBindingRule(
name: String,
block: suspend AclBindingRuleResourceBuilder.() -> Unit,
): AclBindingRule {
val builder = AclBindingRuleResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AclBindingRule].
* @param name The _unique_ name of the resulting resource.
*/
public fun aclBindingRule(name: String): AclBindingRule {
val builder = AclBindingRuleResourceBuilder()
builder.name(name)
return builder.build()
}