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

com.pulumi.awsnative.oam.kotlin.LinkArgs.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.oam.kotlin

import com.pulumi.awsnative.oam.LinkArgs.builder
import com.pulumi.awsnative.oam.kotlin.enums.LinkResourceType
import com.pulumi.awsnative.oam.kotlin.inputs.LinkConfigurationArgs
import com.pulumi.awsnative.oam.kotlin.inputs.LinkConfigurationArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Oam::Link Resource Type
 * @property labelTemplate Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.
 * You can include the following variables in your template:
 * - `$AccountName` is the name of the account
 * - `$AccountEmail` is a globally-unique email address, which includes the email domain, such as `[email protected]`
 * - `$AccountEmailNoDomain` is an email address without the domain name, such as `mariagarcia`
 * @property linkConfiguration Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.
 * @property resourceTypes An array of strings that define which types of data that the source account shares with the monitoring account. Valid values are `AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor` .
 * @property sinkIdentifier The ARN of the sink in the monitoring account that you want to link to. You can use [ListSinks](https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html) to find the ARNs of sinks.
 * @property tags Tags to apply to the link
 */
public data class LinkArgs(
    public val labelTemplate: Output? = null,
    public val linkConfiguration: Output? = null,
    public val resourceTypes: Output>? = null,
    public val sinkIdentifier: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.oam.LinkArgs =
        com.pulumi.awsnative.oam.LinkArgs.builder()
            .labelTemplate(labelTemplate?.applyValue({ args0 -> args0 }))
            .linkConfiguration(linkConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceTypes(
                resourceTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sinkIdentifier(sinkIdentifier?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LinkArgs].
 */
@PulumiTagMarker
public class LinkArgsBuilder internal constructor() {
    private var labelTemplate: Output? = null

    private var linkConfiguration: Output? = null

    private var resourceTypes: Output>? = null

    private var sinkIdentifier: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.
     * You can include the following variables in your template:
     * - `$AccountName` is the name of the account
     * - `$AccountEmail` is a globally-unique email address, which includes the email domain, such as `[email protected]`
     * - `$AccountEmailNoDomain` is an email address without the domain name, such as `mariagarcia`
     */
    @JvmName("ipomkaugyjsfngup")
    public suspend fun labelTemplate(`value`: Output) {
        this.labelTemplate = value
    }

    /**
     * @param value Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.
     */
    @JvmName("udpcbaxtnybenvwd")
    public suspend fun linkConfiguration(`value`: Output) {
        this.linkConfiguration = value
    }

    /**
     * @param value An array of strings that define which types of data that the source account shares with the monitoring account. Valid values are `AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor` .
     */
    @JvmName("qreugxcylriauucg")
    public suspend fun resourceTypes(`value`: Output>) {
        this.resourceTypes = value
    }

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

    /**
     * @param values An array of strings that define which types of data that the source account shares with the monitoring account. Valid values are `AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor` .
     */
    @JvmName("neietvygejjkgjjf")
    public suspend fun resourceTypes(values: List>) {
        this.resourceTypes = Output.all(values)
    }

    /**
     * @param value The ARN of the sink in the monitoring account that you want to link to. You can use [ListSinks](https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html) to find the ARNs of sinks.
     */
    @JvmName("xkrtobcnejyyrchm")
    public suspend fun sinkIdentifier(`value`: Output) {
        this.sinkIdentifier = value
    }

    /**
     * @param value Tags to apply to the link
     */
    @JvmName("pytyvpgnlrpbjxnn")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specify a friendly human-readable name to use to identify this source account when you are viewing data from it in the monitoring account.
     * You can include the following variables in your template:
     * - `$AccountName` is the name of the account
     * - `$AccountEmail` is a globally-unique email address, which includes the email domain, such as `[email protected]`
     * - `$AccountEmailNoDomain` is an email address without the domain name, such as `mariagarcia`
     */
    @JvmName("gohwqfkfvmxhvrsr")
    public suspend fun labelTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labelTemplate = mapped
    }

    /**
     * @param value Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.
     */
    @JvmName("ocfvrfvxjhpmddgw")
    public suspend fun linkConfiguration(`value`: LinkConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.linkConfiguration = mapped
    }

    /**
     * @param argument Use this structure to optionally create filters that specify that only some metric namespaces or log groups are to be shared from the source account to the monitoring account.
     */
    @JvmName("gxrjdbfcgqjpfiql")
    public suspend fun linkConfiguration(argument: suspend LinkConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = LinkConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.linkConfiguration = mapped
    }

    /**
     * @param value An array of strings that define which types of data that the source account shares with the monitoring account. Valid values are `AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor` .
     */
    @JvmName("dlhidqhtkesxoiqe")
    public suspend fun resourceTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceTypes = mapped
    }

    /**
     * @param values An array of strings that define which types of data that the source account shares with the monitoring account. Valid values are `AWS::CloudWatch::Metric | AWS::Logs::LogGroup | AWS::XRay::Trace | AWS::ApplicationInsights::Application | AWS::InternetMonitor::Monitor` .
     */
    @JvmName("nascpqtmmrtbyltq")
    public suspend fun resourceTypes(vararg values: LinkResourceType) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceTypes = mapped
    }

    /**
     * @param value The ARN of the sink in the monitoring account that you want to link to. You can use [ListSinks](https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html) to find the ARNs of sinks.
     */
    @JvmName("xksbcaqaptmjsrrs")
    public suspend fun sinkIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sinkIdentifier = mapped
    }

    /**
     * @param value Tags to apply to the link
     */
    @JvmName("cafwuetuagfwkgxp")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Tags to apply to the link
     */
    @JvmName("bxqrvtpcgkanrpds")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LinkArgs = LinkArgs(
        labelTemplate = labelTemplate,
        linkConfiguration = linkConfiguration,
        resourceTypes = resourceTypes,
        sinkIdentifier = sinkIdentifier,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy