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

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

package com.pulumi.awsnative.ec2.kotlin

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

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

    public var args: VpcEndpointConnectionNotificationArgs = VpcEndpointConnectionNotificationArgs()

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

/**
 * Resource Type definition for AWS::EC2::VPCEndpointConnectionNotification
 */
public class VpcEndpointConnectionNotification internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.VpcEndpointConnectionNotification,
) : KotlinCustomResource(javaResource, VpcEndpointConnectionNotificationMapper) {
    /**
     * The endpoint events for which to receive notifications.
     */
    public val connectionEvents: Output>
        get() = javaResource.connectionEvents().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The ARN of the SNS topic for the notifications.
     */
    public val connectionNotificationArn: Output
        get() = javaResource.connectionNotificationArn().applyValue({ args0 -> args0 })

    /**
     * The ID of the endpoint service.
     */
    public val serviceId: Output?
        get() = javaResource.serviceId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * VPC Endpoint Connection ID generated by service
     */
    public val vpcEndpointConnectionNotificationId: Output
        get() = javaResource.vpcEndpointConnectionNotificationId().applyValue({ args0 -> args0 })

    /**
     * The ID of the endpoint.
     */
    public val vpcEndpointId: Output?
        get() = javaResource.vpcEndpointId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object VpcEndpointConnectionNotificationMapper :
    ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.ec2.VpcEndpointConnectionNotification::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy