com.pulumi.awsnative.route53recoverycontrol.kotlin.ControlPanel.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.route53recoverycontrol.kotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.route53recoverycontrol.kotlin.enums.ControlPanelStatus
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin
import com.pulumi.awsnative.route53recoverycontrol.kotlin.enums.ControlPanelStatus.Companion.toKotlin as controlPanelStatusToKotlin
/**
* Builder for [ControlPanel].
*/
@PulumiTagMarker
public class ControlPanelResourceBuilder internal constructor() {
public var name: String? = null
public var args: ControlPanelArgs = ControlPanelArgs()
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 ControlPanelArgsBuilder.() -> Unit) {
val builder = ControlPanelArgsBuilder()
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(): ControlPanel {
val builtJavaResource =
com.pulumi.awsnative.route53recoverycontrol.ControlPanel(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ControlPanel(builtJavaResource)
}
}
/**
* AWS Route53 Recovery Control Control Panel resource schema .
*/
public class ControlPanel internal constructor(
override val javaResource: com.pulumi.awsnative.route53recoverycontrol.ControlPanel,
) : KotlinCustomResource(javaResource, ControlPanelMapper) {
/**
* Cluster to associate with the Control Panel
*/
public val clusterArn: Output?
get() = javaResource.clusterArn().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the cluster.
*/
public val controlPanelArn: Output
get() = javaResource.controlPanelArn().applyValue({ args0 -> args0 })
/**
* A flag that Amazon Route 53 Application Recovery Controller sets to true to designate the default control panel for a cluster. When you create a cluster, Amazon Route 53 Application Recovery Controller creates a control panel, and sets this flag for that control panel. If you create a control panel yourself, this flag is set to false.
*/
public val defaultControlPanel: Output
get() = javaResource.defaultControlPanel().applyValue({ args0 -> args0 })
/**
* The name of the control panel. You can use any non-white space character in the name.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Count of associated routing controls
*/
public val routingControlCount: Output
get() = javaResource.routingControlCount().applyValue({ args0 -> args0 })
/**
* The deployment status of control panel. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
controlPanelStatusToKotlin(args0)
})
})
/**
* A collection of tags associated with a resource
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> createOnlyTagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ControlPanelMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.route53recoverycontrol.ControlPanel::class == javaResource::class
override fun map(javaResource: Resource): ControlPanel = ControlPanel(
javaResource as
com.pulumi.awsnative.route53recoverycontrol.ControlPanel,
)
}
/**
* @see [ControlPanel].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ControlPanel].
*/
public suspend fun controlPanel(
name: String,
block: suspend ControlPanelResourceBuilder.() -> Unit,
): ControlPanel {
val builder = ControlPanelResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ControlPanel].
* @param name The _unique_ name of the resulting resource.
*/
public fun controlPanel(name: String): ControlPanel {
val builder = ControlPanelResourceBuilder()
builder.name(name)
return builder.build()
}