com.pulumi.gcp.bigtable.kotlin.AuthorizedView.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.bigtable.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.bigtable.kotlin.outputs.AuthorizedViewSubsetView
import com.pulumi.gcp.bigtable.kotlin.outputs.AuthorizedViewSubsetView.Companion.toKotlin
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 [AuthorizedView].
*/
@PulumiTagMarker
public class AuthorizedViewResourceBuilder internal constructor() {
public var name: String? = null
public var args: AuthorizedViewArgs = AuthorizedViewArgs()
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 AuthorizedViewArgsBuilder.() -> Unit) {
val builder = AuthorizedViewArgsBuilder()
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(): AuthorizedView {
val builtJavaResource = com.pulumi.gcp.bigtable.AuthorizedView(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AuthorizedView(builtJavaResource)
}
}
/**
* ## Example Usage
* ## Import
* Bigtable Authorized Views can be imported using any of these accepted formats:
* * `projects/{{project}}/instances/{{instance_name}}/tables/{{table_name}}/authorizedViews/{{name}}`
* * `{{project}}/{{instance_name}}/{{table_name}}/{{name}}`
* * `{{instance_name}}/{{table_name}}/{{name}}`
* When using the `pulumi import` command, Bigtable Authorized Views can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default projects/{{project}}/instances/{{instance_name}}/tables/{{table_name}}/authorizedViews/{{name}}
* ```
* ```sh
* $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{project}}/{{instance_name}}/{{table_name}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:bigtable/authorizedView:AuthorizedView default {{instance_name}}/{{table_name}}/{{name}}
* ```
*/
public class AuthorizedView internal constructor(
override val javaResource: com.pulumi.gcp.bigtable.AuthorizedView,
) : KotlinCustomResource(javaResource, AuthorizedViewMapper) {
public val deletionProtection: Output
get() = javaResource.deletionProtection().applyValue({ args0 -> args0 })
/**
* The name of the Bigtable instance in which the authorized view belongs.
*/
public val instanceName: Output
get() = javaResource.instanceName().applyValue({ args0 -> args0 })
/**
* The name of the authorized view. Must be 1-50 characters and must only contain hyphens, underscores, periods, letters and numbers.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* An AuthorizedView permitting access to an explicit subset of a Table. Structure is documented below.
* -----
*/
public val subsetView: Output?
get() = javaResource.subsetView().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
/**
* The name of the Bigtable table in which the authorized view belongs.
*/
public val tableName: Output
get() = javaResource.tableName().applyValue({ args0 -> args0 })
}
public object AuthorizedViewMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.bigtable.AuthorizedView::class == javaResource::class
override fun map(javaResource: Resource): AuthorizedView = AuthorizedView(
javaResource as
com.pulumi.gcp.bigtable.AuthorizedView,
)
}
/**
* @see [AuthorizedView].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AuthorizedView].
*/
public suspend fun authorizedView(
name: String,
block: suspend AuthorizedViewResourceBuilder.() -> Unit,
): AuthorizedView {
val builder = AuthorizedViewResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AuthorizedView].
* @param name The _unique_ name of the resulting resource.
*/
public fun authorizedView(name: String): AuthorizedView {
val builder = AuthorizedViewResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy