com.pulumi.awsnative.s3express.kotlin.DirectoryBucket.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.s3express.kotlin
import com.pulumi.awsnative.s3express.kotlin.enums.DirectoryBucketDataRedundancy
import com.pulumi.awsnative.s3express.kotlin.enums.DirectoryBucketDataRedundancy.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
/**
* Builder for [DirectoryBucket].
*/
@PulumiTagMarker
public class DirectoryBucketResourceBuilder internal constructor() {
public var name: String? = null
public var args: DirectoryBucketArgs = DirectoryBucketArgs()
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 DirectoryBucketArgsBuilder.() -> Unit) {
val builder = DirectoryBucketArgsBuilder()
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(): DirectoryBucket {
val builtJavaResource = com.pulumi.awsnative.s3express.DirectoryBucket(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DirectoryBucket(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::S3Express::DirectoryBucket.
*/
public class DirectoryBucket internal constructor(
override val javaResource: com.pulumi.awsnative.s3express.DirectoryBucket,
) : KotlinCustomResource(javaResource, DirectoryBucketMapper) {
/**
* Returns the Amazon Resource Name (ARN) of the specified bucket.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies a name for the bucket. The bucket name must contain only lowercase letters, numbers, and hyphens (-). A directory bucket name must be unique in the chosen Availability Zone. The bucket name must also follow the format 'bucket_base_name--az_id--x-s3' (for example, 'DOC-EXAMPLE-BUCKET--usw2-az1--x-s3'). If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the bucket name.
*/
public val bucketName: Output?
get() = javaResource.bucketName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies the number of Availability Zone that's used for redundancy for the bucket.
*/
public val dataRedundancy: Output
get() = javaResource.dataRedundancy().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* Specifies the AZ ID of the Availability Zone where the directory bucket will be created. An example AZ ID value is 'use1-az5'.
*/
public val locationName: Output
get() = javaResource.locationName().applyValue({ args0 -> args0 })
}
public object DirectoryBucketMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.s3express.DirectoryBucket::class == javaResource::class
override fun map(javaResource: Resource): DirectoryBucket = DirectoryBucket(
javaResource as
com.pulumi.awsnative.s3express.DirectoryBucket,
)
}
/**
* @see [DirectoryBucket].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DirectoryBucket].
*/
public suspend fun directoryBucket(
name: String,
block: suspend DirectoryBucketResourceBuilder.() -> Unit,
): DirectoryBucket {
val builder = DirectoryBucketResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DirectoryBucket].
* @param name The _unique_ name of the resulting resource.
*/
public fun directoryBucket(name: String): DirectoryBucket {
val builder = DirectoryBucketResourceBuilder()
builder.name(name)
return builder.build()
}