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

com.pulumi.awsnative.logs.kotlin.DeliverySourceArgs.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.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.logs.DeliverySourceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *  A delivery source is an AWS resource that sends logs to an AWS destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.
 * Only some AWS services support being configured as a delivery source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).
 * @property logType The type of logs being delivered. Only mandatory when the resourceArn could match more than one. In such a case, the error message will contain all the possible options.
 * @property name The unique name of the Log source.
 * @property resourceArn The ARN of the resource that will be sending the logs.
 * @property tags The tags that have been assigned to this delivery source.
 */
public data class DeliverySourceArgs(
    public val logType: Output? = null,
    public val name: Output? = null,
    public val resourceArn: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.logs.DeliverySourceArgs =
        com.pulumi.awsnative.logs.DeliverySourceArgs.builder()
            .logType(logType?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceArn(resourceArn?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DeliverySourceArgs].
 */
@PulumiTagMarker
public class DeliverySourceArgsBuilder internal constructor() {
    private var logType: Output? = null

    private var name: Output? = null

    private var resourceArn: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The type of logs being delivered. Only mandatory when the resourceArn could match more than one. In such a case, the error message will contain all the possible options.
     */
    @JvmName("skwedjceyrgdtxis")
    public suspend fun logType(`value`: Output) {
        this.logType = value
    }

    /**
     * @param value The unique name of the Log source.
     */
    @JvmName("fvvidgkgxpbkvtsx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ARN of the resource that will be sending the logs.
     */
    @JvmName("hhqeausrtqwbghuw")
    public suspend fun resourceArn(`value`: Output) {
        this.resourceArn = value
    }

    /**
     * @param value The tags that have been assigned to this delivery source.
     */
    @JvmName("henjcxwukmdjrjti")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("sdmtxusyismayppx")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values The tags that have been assigned to this delivery source.
     */
    @JvmName("xynninvrfaibaael")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The type of logs being delivered. Only mandatory when the resourceArn could match more than one. In such a case, the error message will contain all the possible options.
     */
    @JvmName("ymflincvcmigqkyb")
    public suspend fun logType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logType = mapped
    }

    /**
     * @param value The unique name of the Log source.
     */
    @JvmName("otcbdyolenvboujv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ARN of the resource that will be sending the logs.
     */
    @JvmName("avurhrxxelyanjnf")
    public suspend fun resourceArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceArn = mapped
    }

    /**
     * @param value The tags that have been assigned to this delivery source.
     */
    @JvmName("rwkacgcbqjbwurmf")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument The tags that have been assigned to this delivery source.
     */
    @JvmName("ftdnsudijmplaihi")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags that have been assigned to this delivery source.
     */
    @JvmName("ykbstimpaparnwdd")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument The tags that have been assigned to this delivery source.
     */
    @JvmName("sqcdqeloyncfarho")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values The tags that have been assigned to this delivery source.
     */
    @JvmName("hhpomqabxbraajgl")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DeliverySourceArgs = DeliverySourceArgs(
        logType = logType,
        name = name,
        resourceArn = resourceArn,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy