
com.pulumi.awsnative.efs.kotlin.AccessPoint.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.efs.kotlin
import com.pulumi.awsnative.efs.kotlin.outputs.AccessPointPosixUser
import com.pulumi.awsnative.efs.kotlin.outputs.AccessPointRootDirectory
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import com.pulumi.awsnative.efs.kotlin.outputs.AccessPointPosixUser.Companion.toKotlin as accessPointPosixUserToKotlin
import com.pulumi.awsnative.efs.kotlin.outputs.AccessPointRootDirectory.Companion.toKotlin as accessPointRootDirectoryToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* 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.efs.AccessPoint(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AccessPoint(builtJavaResource)
}
}
/**
* The ``AWS::EFS::AccessPoint`` resource creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in its own directory and below. To learn more, see [Mounting a file system using EFS access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html).
* This operation requires permissions for the ``elasticfilesystem:CreateAccessPoint`` action.
*/
public class AccessPoint internal constructor(
override val javaResource: com.pulumi.awsnative.efs.AccessPoint,
) : KotlinCustomResource(javaResource, AccessPointMapper) {
/**
* The ID of the EFS access point.
*/
public val accessPointId: Output
get() = javaResource.accessPointId().applyValue({ args0 -> args0 })
/**
* An array of key-value pairs to apply to this resource.
* For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html).
*/
public val accessPointTags: Output>?
get() = javaResource.accessPointTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> tagToKotlin(args0) }) })
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the access point.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The opaque string specified in the request to ensure idempotent creation.
*/
public val clientToken: Output?
get() = javaResource.clientToken().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the EFS file system that the access point applies to. Accepts only the ID format for input when specifying a file system, for example ``fs-0123456789abcedf2``.
*/
public val fileSystemId: Output
get() = javaResource.fileSystemId().applyValue({ args0 -> args0 })
/**
* The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.
*/
public val posixUser: Output?
get() = javaResource.posixUser().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
accessPointPosixUserToKotlin(args0)
})
}).orElse(null)
})
/**
* The directory on the EFS file system that the access point exposes as the root directory to NFS clients using the access point.
*/
public val rootDirectory: Output?
get() = javaResource.rootDirectory().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> accessPointRootDirectoryToKotlin(args0) })
}).orElse(null)
})
}
public object AccessPointMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.efs.AccessPoint::class == javaResource::class
override fun map(javaResource: Resource): AccessPoint = AccessPoint(
javaResource as
com.pulumi.awsnative.efs.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()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy