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

com.pulumi.awsnative.transfer.kotlin.Connector.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.transfer.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.transfer.kotlin.outputs.As2ConfigProperties
import com.pulumi.awsnative.transfer.kotlin.outputs.SftpConfigProperties
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.transfer.kotlin.outputs.As2ConfigProperties.Companion.toKotlin as as2ConfigPropertiesToKotlin
import com.pulumi.awsnative.transfer.kotlin.outputs.SftpConfigProperties.Companion.toKotlin as sftpConfigPropertiesToKotlin

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

    public var args: ConnectorArgs = ConnectorArgs()

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

/**
 * Resource Type definition for AWS::Transfer::Connector
 */
public class Connector internal constructor(
    override val javaResource: com.pulumi.awsnative.transfer.Connector,
) : KotlinCustomResource(javaResource, ConnectorMapper) {
    /**
     * Specifies the access role for the connector.
     */
    public val accessRole: Output
        get() = javaResource.accessRole().applyValue({ args0 -> args0 })

    /**
     * Specifies the unique Amazon Resource Name (ARN) for the connector.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Configuration for an AS2 connector.
     */
    public val as2Config: Output?
        get() = javaResource.as2Config().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    as2ConfigPropertiesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A unique identifier for the connector.
     */
    public val connectorId: Output
        get() = javaResource.connectorId().applyValue({ args0 -> args0 })

    /**
     * Specifies the logging role for the connector.
     */
    public val loggingRole: Output?
        get() = javaResource.loggingRole().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Security policy for SFTP Connector
     */
    public val securityPolicyName: Output?
        get() = javaResource.securityPolicyName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The list of egress IP addresses of this connector. These IP addresses are assigned automatically when you create the connector.
     */
    public val serviceManagedEgressIpAddresses: Output>
        get() = javaResource.serviceManagedEgressIpAddresses().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            })
        })

    /**
     * Configuration for an SFTP connector.
     */
    public val sftpConfig: Output?
        get() = javaResource.sftpConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    sftpConfigPropertiesToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Key-value pairs that can be used to group and search for connectors. Tags are metadata attached to connectors for any purpose.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * URL for Connector
     */
    public val url: Output
        get() = javaResource.url().applyValue({ args0 -> args0 })
}

public object ConnectorMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.transfer.Connector::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy