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

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

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

package com.pulumi.awsnative.datasync.kotlin

import com.pulumi.awsnative.datasync.kotlin.outputs.LocationSmbMountOptions
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.outputs.LocationSmbMountOptions.Companion.toKotlin as locationSmbMountOptionsToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: LocationSmbArgs = LocationSmbArgs()

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

/**
 * Resource schema for AWS::DataSync::LocationSMB.
 */
public class LocationSmb internal constructor(
    override val javaResource: com.pulumi.awsnative.datasync.LocationSmb,
) : KotlinCustomResource(javaResource, LocationSmbMapper) {
    /**
     * The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
     */
    public val agentArns: Output>
        get() = javaResource.agentArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The name of the Windows domain that the SMB server belongs to.
     */
    public val domain: Output?
        get() = javaResource.domain().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

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

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

    /**
     * Specifies the version of the SMB protocol that DataSync uses to access your SMB file server.
     */
    public val mountOptions: Output?
        get() = javaResource.mountOptions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    locationSmbMountOptionsToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The password of the user who can mount the share and has the permissions to access files and folders in the SMB share.
     */
    public val password: Output?
        get() = javaResource.password().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server.
     */
    public val serverHostname: Output?
        get() = javaResource.serverHostname().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB 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)
        })

    /**
     * The user who can mount the share, has the permissions to access files and folders in the SMB share.
     */
    public val user: Output
        get() = javaResource.user().applyValue({ args0 -> args0 })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy