All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.efs.kotlin.AccessPointArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.efs.kotlin

import com.pulumi.aws.efs.AccessPointArgs.builder
import com.pulumi.aws.efs.kotlin.inputs.AccessPointPosixUserArgs
import com.pulumi.aws.efs.kotlin.inputs.AccessPointPosixUserArgsBuilder
import com.pulumi.aws.efs.kotlin.inputs.AccessPointRootDirectoryArgs
import com.pulumi.aws.efs.kotlin.inputs.AccessPointRootDirectoryArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an Elastic File System (EFS) access point.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.efs.AccessPoint("test", {fileSystemId: foo.id});
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.efs.AccessPoint("test", file_system_id=foo["id"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Efs.AccessPoint("test", new()
 *     {
 *         FileSystemId = foo.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := efs.NewAccessPoint(ctx, "test", &efs.AccessPointArgs{
 * 			FileSystemId: pulumi.Any(foo.Id),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.efs.AccessPoint;
 * import com.pulumi.aws.efs.AccessPointArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var test = new AccessPoint("test", AccessPointArgs.builder()
 *             .fileSystemId(foo.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:efs:AccessPoint
 *     properties:
 *       fileSystemId: ${foo.id}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import the EFS access points using the `id`. For example:
 * ```sh
 * $ pulumi import aws:efs/accessPoint:AccessPoint test fsap-52a643fb
 * ```
 * @property fileSystemId ID of the file system for which the access point is intended.
 * @property posixUser Operating system user and group applied to all file system requests made using the access point. Detailed below.
 * @property rootDirectory Directory on the Amazon EFS file system that the access point provides access to. Detailed below.
 * @property tags Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
 */
public data class AccessPointArgs(
    public val fileSystemId: Output? = null,
    public val posixUser: Output? = null,
    public val rootDirectory: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.efs.AccessPointArgs =
        com.pulumi.aws.efs.AccessPointArgs.builder()
            .fileSystemId(fileSystemId?.applyValue({ args0 -> args0 }))
            .posixUser(posixUser?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .rootDirectory(rootDirectory?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AccessPointArgs].
 */
@PulumiTagMarker
public class AccessPointArgsBuilder internal constructor() {
    private var fileSystemId: Output? = null

    private var posixUser: Output? = null

    private var rootDirectory: Output? = null

    private var tags: Output>? = null

    /**
     * @param value ID of the file system for which the access point is intended.
     */
    @JvmName("qtohunelifuqcrxt")
    public suspend fun fileSystemId(`value`: Output) {
        this.fileSystemId = value
    }

    /**
     * @param value Operating system user and group applied to all file system requests made using the access point. Detailed below.
     */
    @JvmName("naawasxpammpsvek")
    public suspend fun posixUser(`value`: Output) {
        this.posixUser = value
    }

    /**
     * @param value Directory on the Amazon EFS file system that the access point provides access to. Detailed below.
     */
    @JvmName("mkdxskolcmpqebko")
    public suspend fun rootDirectory(`value`: Output) {
        this.rootDirectory = value
    }

    /**
     * @param value Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
     */
    @JvmName("furvmitehgdmcwls")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value ID of the file system for which the access point is intended.
     */
    @JvmName("ntrfkyswqixavcwv")
    public suspend fun fileSystemId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fileSystemId = mapped
    }

    /**
     * @param value Operating system user and group applied to all file system requests made using the access point. Detailed below.
     */
    @JvmName("ibghrhfyldyrprcf")
    public suspend fun posixUser(`value`: AccessPointPosixUserArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.posixUser = mapped
    }

    /**
     * @param argument Operating system user and group applied to all file system requests made using the access point. Detailed below.
     */
    @JvmName("yxyrovypnjdgghes")
    public suspend fun posixUser(argument: suspend AccessPointPosixUserArgsBuilder.() -> Unit) {
        val toBeMapped = AccessPointPosixUserArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.posixUser = mapped
    }

    /**
     * @param value Directory on the Amazon EFS file system that the access point provides access to. Detailed below.
     */
    @JvmName("ixqiamhwwntharbj")
    public suspend fun rootDirectory(`value`: AccessPointRootDirectoryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rootDirectory = mapped
    }

    /**
     * @param argument Directory on the Amazon EFS file system that the access point provides access to. Detailed below.
     */
    @JvmName("wnknncfdmhruvarq")
    public suspend fun rootDirectory(argument: suspend AccessPointRootDirectoryArgsBuilder.() -> Unit) {
        val toBeMapped = AccessPointRootDirectoryArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.rootDirectory = mapped
    }

    /**
     * @param value Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
     */
    @JvmName("yrfbmfcjetculmym")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level
     */
    @JvmName("vtpewftcmanpymwn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AccessPointArgs = AccessPointArgs(
        fileSystemId = fileSystemId,
        posixUser = posixUser,
        rootDirectory = rootDirectory,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy