![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.route53.kotlin.HealthCheck.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.route53.kotlin
import com.pulumi.awsnative.route53.kotlin.outputs.HealthCheckConfigProperties
import com.pulumi.awsnative.route53.kotlin.outputs.HealthCheckTag
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 com.pulumi.awsnative.route53.kotlin.outputs.HealthCheckConfigProperties.Companion.toKotlin as healthCheckConfigPropertiesToKotlin
import com.pulumi.awsnative.route53.kotlin.outputs.HealthCheckTag.Companion.toKotlin as healthCheckTagToKotlin
/**
* Builder for [HealthCheck].
*/
@PulumiTagMarker
public class HealthCheckResourceBuilder internal constructor() {
public var name: String? = null
public var args: HealthCheckArgs = HealthCheckArgs()
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 HealthCheckArgsBuilder.() -> Unit) {
val builder = HealthCheckArgsBuilder()
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(): HealthCheck {
val builtJavaResource = com.pulumi.awsnative.route53.HealthCheck(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return HealthCheck(builtJavaResource)
}
}
/**
* Resource schema for AWS::Route53::HealthCheck.
*/
public class HealthCheck internal constructor(
override val javaResource: com.pulumi.awsnative.route53.HealthCheck,
) : KotlinCustomResource(javaResource, HealthCheckMapper) {
/**
* A complex type that contains information about the health check.
*/
public val healthCheckConfig: Output
get() = javaResource.healthCheckConfig().applyValue({ args0 ->
args0.let({ args0 ->
healthCheckConfigPropertiesToKotlin(args0)
})
})
/**
* The identifier that Amazon Route 53 assigned to the health check when you created it. When you add or update a resource record set, you use this value to specify which health check to use. The value can be up to 64 characters long.
*/
public val healthCheckId: Output
get() = javaResource.healthCheckId().applyValue({ args0 -> args0 })
/**
* An array of key-value pairs to apply to this resource.
*/
public val healthCheckTags: Output>?
get() = javaResource.healthCheckTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> healthCheckTagToKotlin(args0) }) })
}).orElse(null)
})
}
public object HealthCheckMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.route53.HealthCheck::class == javaResource::class
override fun map(javaResource: Resource): HealthCheck = HealthCheck(
javaResource as
com.pulumi.awsnative.route53.HealthCheck,
)
}
/**
* @see [HealthCheck].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [HealthCheck].
*/
public suspend fun healthCheck(name: String, block: suspend HealthCheckResourceBuilder.() -> Unit): HealthCheck {
val builder = HealthCheckResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [HealthCheck].
* @param name The _unique_ name of the resulting resource.
*/
public fun healthCheck(name: String): HealthCheck {
val builder = HealthCheckResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy