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

com.pulumi.awsnative.pipes.kotlin.Pipe.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.pipes.kotlin

import com.pulumi.awsnative.pipes.kotlin.enums.PipeRequestedPipeState
import com.pulumi.awsnative.pipes.kotlin.enums.PipeState
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeEnrichmentParameters
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeLogConfiguration
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeSourceParameters
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeTargetParameters
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.Map
import com.pulumi.awsnative.pipes.kotlin.enums.PipeRequestedPipeState.Companion.toKotlin as pipeRequestedPipeStateToKotlin
import com.pulumi.awsnative.pipes.kotlin.enums.PipeState.Companion.toKotlin as pipeStateToKotlin
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeEnrichmentParameters.Companion.toKotlin as pipeEnrichmentParametersToKotlin
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeLogConfiguration.Companion.toKotlin as pipeLogConfigurationToKotlin
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeSourceParameters.Companion.toKotlin as pipeSourceParametersToKotlin
import com.pulumi.awsnative.pipes.kotlin.outputs.PipeTargetParameters.Companion.toKotlin as pipeTargetParametersToKotlin

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

    public var args: PipeArgs = PipeArgs()

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

/**
 * Definition of AWS::Pipes::Pipe Resource Type
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class Pipe internal constructor(
    override val javaResource: com.pulumi.awsnative.pipes.Pipe,
) : KotlinCustomResource(javaResource, PipeMapper) {
    /**
     * The ARN of the pipe.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

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

    /**
     * The state the pipe is in.
     */
    public val currentState: Output
        get() = javaResource.currentState().applyValue({ args0 ->
            args0.let({ args0 ->
                pipeStateToKotlin(args0)
            })
        })

    /**
     * A description of the pipe.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The state the pipe should be in.
     */
    public val desiredState: Output?
        get() = javaResource.desiredState().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    pipeRequestedPipeStateToKotlin(args0)
                })
            }).orElse(null)
        })

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

    /**
     * The parameters required to set up enrichment on your pipe.
     */
    public val enrichmentParameters: Output?
        get() = javaResource.enrichmentParameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> pipeEnrichmentParametersToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * When the pipe was last updated, in [ISO-8601 format](https://docs.aws.amazon.com/https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD).
     */
    public val lastModifiedTime: Output
        get() = javaResource.lastModifiedTime().applyValue({ args0 -> args0 })

    /**
     * The logging configuration settings for the pipe.
     */
    public val logConfiguration: Output?
        get() = javaResource.logConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> pipeLogConfigurationToKotlin(args0) })
            }).orElse(null)
        })

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

    /**
     * The ARN of the role that allows the pipe to send data to the target.
     */
    public val roleArn: Output
        get() = javaResource.roleArn().applyValue({ args0 -> args0 })

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

    /**
     * The parameters required to set up a source for your pipe.
     */
    public val sourceParameters: Output?
        get() = javaResource.sourceParameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> pipeSourceParametersToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The reason the pipe is in its current state.
     */
    public val stateReason: Output
        get() = javaResource.stateReason().applyValue({ args0 -> args0 })

    /**
     * The list of key-value pairs to associate with the pipe.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The ARN of the target resource.
     */
    public val target: Output
        get() = javaResource.target().applyValue({ args0 -> args0 })

    /**
     * The parameters required to set up a target for your pipe.
     * For more information about pipe target parameters, including how to use dynamic path parameters, see [Target parameters](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) in the *Amazon EventBridge User Guide* .
     */
    public val targetParameters: Output?
        get() = javaResource.targetParameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> pipeTargetParametersToKotlin(args0) })
            }).orElse(null)
        })
}

public object PipeMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.pipes.Pipe::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy