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

com.pulumi.awsnative.datasync.kotlin.LocationEfs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.datasync.kotlin

import com.pulumi.awsnative.datasync.kotlin.enums.LocationEfsInTransitEncryption
import com.pulumi.awsnative.datasync.kotlin.outputs.LocationEfsEc2Config
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.datasync.kotlin.enums.LocationEfsInTransitEncryption.Companion.toKotlin as locationEfsInTransitEncryptionToKotlin
import com.pulumi.awsnative.datasync.kotlin.outputs.LocationEfsEc2Config.Companion.toKotlin as locationEfsEc2ConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [LocationEfs].
 */
@PulumiTagMarker
public class LocationEfsResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: LocationEfsArgs = LocationEfsArgs()

    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 LocationEfsArgsBuilder.() -> Unit) {
        val builder = LocationEfsArgsBuilder()
        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(): LocationEfs {
        val builtJavaResource = com.pulumi.awsnative.datasync.LocationEfs(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return LocationEfs(builtJavaResource)
    }
}

/**
 * Resource schema for AWS::DataSync::LocationEFS.
 */
public class LocationEfs internal constructor(
    override val javaResource: com.pulumi.awsnative.datasync.LocationEfs,
) : KotlinCustomResource(javaResource, LocationEfsMapper) {
    /**
     * The Amazon Resource Name (ARN) for the Amazon EFS Access point that DataSync uses when accessing the EFS file system.
     */
    public val accessPointArn: Output?
        get() = javaResource.accessPointArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the subnet and security groups DataSync uses to connect to one of your Amazon EFS file system's [mount targets](https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html) .
     */
    public val ec2Config: Output
        get() = javaResource.ec2Config().applyValue({ args0 ->
            args0.let({ args0 ->
                locationEfsEc2ConfigToKotlin(args0)
            })
        })

    /**
     * The Amazon Resource Name (ARN) for the Amazon EFS file system.
     */
    public val efsFilesystemArn: Output?
        get() = javaResource.efsFilesystemArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the AWS IAM role that the DataSync will assume when mounting the EFS file system.
     */
    public val fileSystemAccessRoleArn: Output?
        get() = javaResource.fileSystemAccessRoleArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Protocol that is used for encrypting the traffic exchanged between the DataSync Agent and the EFS file system.
     */
    public val inTransitEncryption: Output?
        get() = javaResource.inTransitEncryption().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> locationEfsInTransitEncryptionToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created.
     */
    public val locationArn: Output
        get() = javaResource.locationArn().applyValue({ args0 -> args0 })

    /**
     * The URL of the EFS location that was described.
     */
    public val locationUri: Output
        get() = javaResource.locationUri().applyValue({ args0 -> args0 })

    /**
     * A subdirectory in the location's path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination.
     */
    public val subdirectory: Output?
        get() = javaResource.subdirectory().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object LocationEfsMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.datasync.LocationEfs::class == javaResource::class

    override fun map(javaResource: Resource): LocationEfs = LocationEfs(
        javaResource as
            com.pulumi.awsnative.datasync.LocationEfs,
    )
}

/**
 * @see [LocationEfs].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [LocationEfs].
 */
public suspend fun locationEfs(name: String, block: suspend LocationEfsResourceBuilder.() -> Unit): LocationEfs {
    val builder = LocationEfsResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [LocationEfs].
 * @param name The _unique_ name of the resulting resource.
 */
public fun locationEfs(name: String): LocationEfs {
    val builder = LocationEfsResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy