com.pulumi.awsnative.s3.kotlin.AccessGrantsInstance.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin
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
import kotlin.collections.List
/**
* Builder for [AccessGrantsInstance].
*/
@PulumiTagMarker
public class AccessGrantsInstanceResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccessGrantsInstanceArgs = AccessGrantsInstanceArgs()
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 AccessGrantsInstanceArgsBuilder.() -> Unit) {
val builder = AccessGrantsInstanceArgsBuilder()
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(): AccessGrantsInstance {
val builtJavaResource = com.pulumi.awsnative.s3.AccessGrantsInstance(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AccessGrantsInstance(builtJavaResource)
}
}
/**
* The AWS::S3::AccessGrantsInstance resource is an Amazon S3 resource type that hosts Access Grants and their associated locations
*/
public class AccessGrantsInstance internal constructor(
override val javaResource: com.pulumi.awsnative.s3.AccessGrantsInstance,
) : KotlinCustomResource(javaResource, AccessGrantsInstanceMapper) {
/**
* The Amazon Resource Name (ARN) of the specified Access Grants instance.
*/
public val accessGrantsInstanceArn: Output
get() = javaResource.accessGrantsInstanceArn().applyValue({ args0 -> args0 })
/**
* A unique identifier for the specified access grants instance.
*/
public val accessGrantsInstanceId: Output
get() = javaResource.accessGrantsInstanceId().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the specified AWS Identity Center.
*/
public val identityCenterArn: Output?
get() = javaResource.identityCenterArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The AWS resource tags that you are adding to the S3 Access Grants instance. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object AccessGrantsInstanceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.s3.AccessGrantsInstance::class == javaResource::class
override fun map(javaResource: Resource): AccessGrantsInstance = AccessGrantsInstance(
javaResource
as com.pulumi.awsnative.s3.AccessGrantsInstance,
)
}
/**
* @see [AccessGrantsInstance].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AccessGrantsInstance].
*/
public suspend fun accessGrantsInstance(
name: String,
block: suspend AccessGrantsInstanceResourceBuilder.() -> Unit,
): AccessGrantsInstance {
val builder = AccessGrantsInstanceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AccessGrantsInstance].
* @param name The _unique_ name of the resulting resource.
*/
public fun accessGrantsInstance(name: String): AccessGrantsInstance {
val builder = AccessGrantsInstanceResourceBuilder()
builder.name(name)
return builder.build()
}