com.pulumi.googlenative.storage.v1.kotlin.BucketIamMember.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.storage.v1.kotlin
import com.pulumi.core.Output
import com.pulumi.googlenative.iam.v1.kotlin.outputs.Condition
import com.pulumi.googlenative.iam.v1.kotlin.outputs.Condition.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 [BucketIamMember].
*/
@PulumiTagMarker
public class BucketIamMemberResourceBuilder internal constructor() {
public var name: String? = null
public var args: BucketIamMemberArgs = BucketIamMemberArgs()
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 BucketIamMemberArgsBuilder.() -> Unit) {
val builder = BucketIamMemberArgsBuilder()
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(): BucketIamMember {
val builtJavaResource =
com.pulumi.googlenative.storage.v1.BucketIamMember(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BucketIamMember(builtJavaResource)
}
}
/**
* Updates an IAM policy for the specified bucket.
*/
public class BucketIamMember internal constructor(
override val javaResource: com.pulumi.googlenative.storage.v1.BucketIamMember,
) : KotlinCustomResource(javaResource, BucketIamMemberMapper) {
/**
* An IAM Condition for a given binding. See https://cloud.google.com/iam/docs/conditions-overview for additional details.
*/
public val condition: Output?
get() = javaResource.condition().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
}).orElse(null)
})
/**
* The etag of the resource's IAM policy.
*/
public val etag: Output
get() = javaResource.etag().applyValue({ args0 -> args0 })
/**
* A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
* - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
* - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
* - user:emailid — An email address that represents a specific account. For example, user:[email protected] or user:[email protected].
* - serviceAccount:emailid — An email address that represents a service account. For example, serviceAccount:[email protected] .
* - group:emailid — An email address that represents a Google group. For example, group:[email protected].
* - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
* - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
* - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
* - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
*/
public val member: Output
get() = javaResource.member().applyValue({ args0 -> args0 })
/**
* The name of the resource to manage IAM policies for.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The project in which the resource belongs. If it is not provided, a default will be supplied.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.
* The new IAM roles are:
* - roles/storage.admin — Full control of Google Cloud Storage resources.
* - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
* - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
* - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. The legacy IAM roles are:
* - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
* - roles/storage.legacyObjectOwner — Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
* - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
* - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
* - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.
*/
public val role: Output
get() = javaResource.role().applyValue({ args0 -> args0 })
}
public object BucketIamMemberMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.googlenative.storage.v1.BucketIamMember::class == javaResource::class
override fun map(javaResource: Resource): BucketIamMember = BucketIamMember(
javaResource as
com.pulumi.googlenative.storage.v1.BucketIamMember,
)
}
/**
* @see [BucketIamMember].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BucketIamMember].
*/
public suspend fun bucketIamMember(
name: String,
block: suspend BucketIamMemberResourceBuilder.() -> Unit,
): BucketIamMember {
val builder = BucketIamMemberResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BucketIamMember].
* @param name The _unique_ name of the resulting resource.
*/
public fun bucketIamMember(name: String): BucketIamMember {
val builder = BucketIamMemberResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy