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

com.pulumi.awsnative.s3outposts.kotlin.Endpoint.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.s3outposts.kotlin

import com.pulumi.awsnative.s3outposts.kotlin.enums.EndpointAccessType
import com.pulumi.awsnative.s3outposts.kotlin.enums.EndpointStatus
import com.pulumi.awsnative.s3outposts.kotlin.outputs.EndpointFailedReason
import com.pulumi.awsnative.s3outposts.kotlin.outputs.EndpointNetworkInterface
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.s3outposts.kotlin.enums.EndpointAccessType.Companion.toKotlin as endpointAccessTypeToKotlin
import com.pulumi.awsnative.s3outposts.kotlin.enums.EndpointStatus.Companion.toKotlin as endpointStatusToKotlin
import com.pulumi.awsnative.s3outposts.kotlin.outputs.EndpointFailedReason.Companion.toKotlin as endpointFailedReasonToKotlin
import com.pulumi.awsnative.s3outposts.kotlin.outputs.EndpointNetworkInterface.Companion.toKotlin as endpointNetworkInterfaceToKotlin

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

    public var args: EndpointArgs = EndpointArgs()

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

/**
 * Resource Type Definition for AWS::S3Outposts::Endpoint
 */
public class Endpoint internal constructor(
    override val javaResource: com.pulumi.awsnative.s3outposts.Endpoint,
) : KotlinCustomResource(javaResource, EndpointMapper) {
    /**
     * The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool.
     */
    public val accessType: Output?
        get() = javaResource.accessType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    endpointAccessTypeToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the endpoint.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The ID of the endpoint.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The VPC CIDR committed by this endpoint.
     */
    public val cidrBlock: Output
        get() = javaResource.cidrBlock().applyValue({ args0 -> args0 })

    /**
     * The time the endpoint was created.
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

    /**
     * The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint.
     */
    public val customerOwnedIpv4Pool: Output?
        get() = javaResource.customerOwnedIpv4Pool().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The failure reason, if any, for a create or delete endpoint operation.
     */
    public val failedReason: Output?
        get() = javaResource.failedReason().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    endpointFailedReasonToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The network interfaces of the endpoint.
     */
    public val networkInterfaces: Output>
        get() = javaResource.networkInterfaces().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> endpointNetworkInterfaceToKotlin(args0) })
            })
        })

    /**
     * The id of the customer outpost on which the bucket resides.
     */
    public val outpostId: Output
        get() = javaResource.outpostId().applyValue({ args0 -> args0 })

    /**
     * The ID of the security group to use with the endpoint.
     */
    public val securityGroupId: Output
        get() = javaResource.securityGroupId().applyValue({ args0 -> args0 })

    /**
     * The status of the endpoint.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                endpointStatusToKotlin(args0)
            })
        })

    /**
     * The ID of the subnet in the selected VPC. The subnet must belong to the Outpost.
     */
    public val subnetId: Output
        get() = javaResource.subnetId().applyValue({ args0 -> args0 })
}

public object EndpointMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.s3outposts.Endpoint::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy