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

com.pulumi.awsnative.ec2.kotlin.NetworkInsightsPath.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.ec2.kotlin

import com.pulumi.awsnative.ec2.kotlin.enums.NetworkInsightsPathProtocol
import com.pulumi.awsnative.ec2.kotlin.outputs.NetworkInsightsPathPathFilter
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.ec2.kotlin.enums.NetworkInsightsPathProtocol.Companion.toKotlin as networkInsightsPathProtocolToKotlin
import com.pulumi.awsnative.ec2.kotlin.outputs.NetworkInsightsPathPathFilter.Companion.toKotlin as networkInsightsPathPathFilterToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: NetworkInsightsPathArgs = NetworkInsightsPathArgs()

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

/**
 * Resource schema for AWS::EC2::NetworkInsightsPath
 */
public class NetworkInsightsPath internal constructor(
    override val javaResource: com.pulumi.awsnative.ec2.NetworkInsightsPath,
) : KotlinCustomResource(javaResource, NetworkInsightsPathMapper) {
    /**
     * The time stamp when the path was created.
     */
    public val createdDate: Output
        get() = javaResource.createdDate().applyValue({ args0 -> args0 })

    /**
     * The ID or ARN of the destination. If the resource is in another account, you must specify an ARN.
     */
    public val destination: Output?
        get() = javaResource.destination().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The IP address of the destination.
     */
    public val destinationIp: Output?
        get() = javaResource.destinationIp().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The destination port.
     */
    public val destinationPort: Output?
        get() = javaResource.destinationPort().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Scopes the analysis to network paths that match specific filters at the destination. If you specify this parameter, you can't specify the parameter for the destination IP address.
     */
    public val filterAtDestination: Output?
        get() = javaResource.filterAtDestination().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> networkInsightsPathPathFilterToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Scopes the analysis to network paths that match specific filters at the source. If you specify this parameter, you can't specify the parameters for the source IP address or the destination port.
     */
    public val filterAtSource: Output?
        get() = javaResource.filterAtSource().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> networkInsightsPathPathFilterToKotlin(args0) })
            }).orElse(null)
        })

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

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

    /**
     * The protocol.
     */
    public val protocol: Output
        get() = javaResource.protocol().applyValue({ args0 ->
            args0.let({ args0 ->
                networkInsightsPathProtocolToKotlin(args0)
            })
        })

    /**
     * The ID or ARN of the source. If the resource is in another account, you must specify an ARN.
     */
    public val source: Output
        get() = javaResource.source().applyValue({ args0 -> args0 })

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

    /**
     * The IP address of the source.
     */
    public val sourceIp: Output?
        get() = javaResource.sourceIp().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The tags to add to the path.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy