com.pulumi.awsnative.oam.kotlin.Link.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.oam.kotlin
import com.pulumi.awsnative.oam.kotlin.enums.LinkResourceType
import com.pulumi.awsnative.oam.kotlin.outputs.LinkConfiguration
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
import kotlin.collections.Map
import com.pulumi.awsnative.oam.kotlin.enums.LinkResourceType.Companion.toKotlin as linkResourceTypeToKotlin
import com.pulumi.awsnative.oam.kotlin.outputs.LinkConfiguration.Companion.toKotlin as linkConfigurationToKotlin
/**
* Builder for [Link].
*/
@PulumiTagMarker
public class LinkResourceBuilder internal constructor() {
public var name: String? = null
public var args: LinkArgs = LinkArgs()
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 LinkArgsBuilder.() -> Unit) {
val builder = LinkArgsBuilder()
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(): Link {
val builtJavaResource = com.pulumi.awsnative.oam.Link(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Link(builtJavaResource)
}
}
/**
* Definition of AWS::Oam::Link Resource Type
*/
public class Link internal constructor(
override val javaResource: com.pulumi.awsnative.oam.Link,
) : KotlinCustomResource(javaResource, LinkMapper) {
/**
* The ARN of the link. For example, `arn:aws:oam:us-west-1:111111111111:link:abcd1234-a123-456a-a12b-a123b456c789`
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The friendly human-readable name used to identify this source account when it is viewed from the monitoring account. For example, `my-account1` .
*/
public val label: Output
get() = javaResource.label().applyValue({ args0 -> args0 })
/**
* 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`
*/
public val labelTemplate: Output?
get() = javaResource.labelTemplate().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val linkConfiguration: Output?
get() = javaResource.linkConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> linkConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* 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` .
*/
public val resourceTypes: Output>
get() = javaResource.resourceTypes().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> linkResourceTypeToKotlin(args0) })
})
})
/**
* 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.
*/
public val sinkIdentifier: Output
get() = javaResource.sinkIdentifier().applyValue({ args0 -> args0 })
/**
* Tags to apply to the link
*/
public val tags: Output