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

com.pulumi.awsnative.logs.kotlin.Delivery.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.logs.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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 [Delivery].
 */
@PulumiTagMarker
public class DeliveryResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: DeliveryArgs = DeliveryArgs()

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

/**
 * This structure contains information about one delivery in your account.
 * A delivery is a connection between a logical delivery source and a logical delivery destination.
 * For more information, see [CreateDelivery](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html).
 */
public class Delivery internal constructor(
    override val javaResource: com.pulumi.awsnative.logs.Delivery,
) : KotlinCustomResource(javaResource, DeliveryMapper) {
    /**
     * The Amazon Resource Name (ARN) that uniquely identifies this delivery.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The ARN of the delivery destination that is associated with this delivery.
     */
    public val deliveryDestinationArn: Output
        get() = javaResource.deliveryDestinationArn().applyValue({ args0 -> args0 })

    /**
     * Displays whether the delivery destination associated with this delivery is CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
     */
    public val deliveryDestinationType: Output
        get() = javaResource.deliveryDestinationType().applyValue({ args0 -> args0 })

    /**
     * The unique ID that identifies this delivery in your account.
     */
    public val deliveryId: Output
        get() = javaResource.deliveryId().applyValue({ args0 -> args0 })

    /**
     * The name of the delivery source that is associated with this delivery.
     */
    public val deliverySourceName: Output
        get() = javaResource.deliverySourceName().applyValue({ args0 -> args0 })

    /**
     * The tags that have been assigned to this delivery.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object DeliveryMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.logs.Delivery::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy