
com.pulumi.googlenative.accesscontextmanager.v1.kotlin.AccessLevel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.accesscontextmanager.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.accesscontextmanager.v1.kotlin.outputs.BasicLevelResponse
import com.pulumi.googlenative.accesscontextmanager.v1.kotlin.outputs.CustomLevelResponse
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
import com.pulumi.googlenative.accesscontextmanager.v1.kotlin.outputs.BasicLevelResponse.Companion.toKotlin as basicLevelResponseToKotlin
import com.pulumi.googlenative.accesscontextmanager.v1.kotlin.outputs.CustomLevelResponse.Companion.toKotlin as customLevelResponseToKotlin
/**
* Builder for [AccessLevel].
*/
@PulumiTagMarker
public class AccessLevelResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccessLevelArgs = AccessLevelArgs()
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 AccessLevelArgsBuilder.() -> Unit) {
val builder = AccessLevelArgsBuilder()
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(): AccessLevel {
val builtJavaResource =
com.pulumi.googlenative.accesscontextmanager.v1.AccessLevel(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AccessLevel(builtJavaResource)
}
}
/**
* Creates an access level. The long-running operation from this RPC has a successful status after the access level propagates to long-lasting storage. If access levels contain errors, an error response is returned for the first error encountered.
*/
public class AccessLevel internal constructor(
override val javaResource: com.pulumi.googlenative.accesscontextmanager.v1.AccessLevel,
) : KotlinCustomResource(javaResource, AccessLevelMapper) {
public val accessPolicyId: Output
get() = javaResource.accessPolicyId().applyValue({ args0 -> args0 })
/**
* A `BasicLevel` composed of `Conditions`.
*/
public val basic: Output
get() = javaResource.basic().applyValue({ args0 ->
args0.let({ args0 ->
basicLevelResponseToKotlin(args0)
})
})
/**
* A `CustomLevel` written in the Common Expression Language.
*/
public val custom: Output
get() = javaResource.custom().applyValue({ args0 ->
args0.let({ args0 ->
customLevelResponseToKotlin(args0)
})
})
/**
* Description of the `AccessLevel` and its use. Does not affect behavior.
*/
public val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
/**
* Resource name for the `AccessLevel`. Format: `accessPolicies/{access_policy}/accessLevels/{access_level}`. The `access_level` component must begin with a letter, followed by alphanumeric characters or `_`. Its maximum length is 50 characters. After you create an `AccessLevel`, you cannot change its `name`.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Human readable title. Must be unique within the Policy.
*/
public val title: Output
get() = javaResource.title().applyValue({ args0 -> args0 })
}
public object AccessLevelMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.accesscontextmanager.v1.AccessLevel::class == javaResource::class
override fun map(javaResource: Resource): AccessLevel = AccessLevel(
javaResource as
com.pulumi.googlenative.accesscontextmanager.v1.AccessLevel,
)
}
/**
* @see [AccessLevel].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AccessLevel].
*/
public suspend fun accessLevel(name: String, block: suspend AccessLevelResourceBuilder.() -> Unit): AccessLevel {
val builder = AccessLevelResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AccessLevel].
* @param name The _unique_ name of the resulting resource.
*/
public fun accessLevel(name: String): AccessLevel {
val builder = AccessLevelResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy