com.pulumi.awsnative.s3outposts.kotlin.AccessPoint.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3outposts.kotlin
import com.pulumi.awsnative.s3outposts.kotlin.outputs.AccessPointVpcConfiguration
import com.pulumi.awsnative.s3outposts.kotlin.outputs.AccessPointVpcConfiguration.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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AccessPoint].
*/
@PulumiTagMarker
public class AccessPointResourceBuilder internal constructor() {
public var name: String? = null
public var args: AccessPointArgs = AccessPointArgs()
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 AccessPointArgsBuilder.() -> Unit) {
val builder = AccessPointArgsBuilder()
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(): AccessPoint {
val builtJavaResource = com.pulumi.awsnative.s3outposts.AccessPoint(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AccessPoint(builtJavaResource)
}
}
/**
* Resource Type Definition for AWS::S3Outposts::AccessPoint
*/
public class AccessPoint internal constructor(
override val javaResource: com.pulumi.awsnative.s3outposts.AccessPoint,
) : KotlinCustomResource(javaResource, AccessPointMapper) {
/**
* The Amazon Resource Name (ARN) of the specified AccessPoint.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the bucket you want to associate this AccessPoint with.
*/
public val bucket: Output
get() = javaResource.bucket().applyValue({ args0 -> args0 })
/**
* A name for the AccessPoint.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The access point policy associated with this access point.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::S3Outposts::AccessPoint` for more information about the expected schema for this property.
*/
public val policy: Output?
get() = javaResource.policy().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Virtual Private Cloud (VPC) from which requests can be made to the AccessPoint.
*/
public val vpcConfiguration: Output
get() = javaResource.vpcConfiguration().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
}
public object AccessPointMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.s3outposts.AccessPoint::class == javaResource::class
override fun map(javaResource: Resource): AccessPoint = AccessPoint(
javaResource as
com.pulumi.awsnative.s3outposts.AccessPoint,
)
}
/**
* @see [AccessPoint].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AccessPoint].
*/
public suspend fun accessPoint(name: String, block: suspend AccessPointResourceBuilder.() -> Unit): AccessPoint {
val builder = AccessPointResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AccessPoint].
* @param name The _unique_ name of the resulting resource.
*/
public fun accessPoint(name: String): AccessPoint {
val builder = AccessPointResourceBuilder()
builder.name(name)
return builder.build()
}