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

com.pulumi.awsnative.route53recoverycontrol.kotlin.RoutingControl.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.route53recoverycontrol.kotlin

import com.pulumi.awsnative.route53recoverycontrol.kotlin.enums.RoutingControlStatus
import com.pulumi.awsnative.route53recoverycontrol.kotlin.enums.RoutingControlStatus.Companion.toKotlin
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

/**
 * Builder for [RoutingControl].
 */
@PulumiTagMarker
public class RoutingControlResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: RoutingControlArgs = RoutingControlArgs()

    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 RoutingControlArgsBuilder.() -> Unit) {
        val builder = RoutingControlArgsBuilder()
        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(): RoutingControl {
        val builtJavaResource =
            com.pulumi.awsnative.route53recoverycontrol.RoutingControl(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return RoutingControl(builtJavaResource)
    }
}

/**
 * AWS Route53 Recovery Control Routing Control resource schema .
 */
public class RoutingControl internal constructor(
    override val javaResource: com.pulumi.awsnative.route53recoverycontrol.RoutingControl,
) : KotlinCustomResource(javaResource, RoutingControlMapper) {
    /**
     * Arn associated with Control Panel
     */
    public val clusterArn: Output?
        get() = javaResource.clusterArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of the control panel.
     */
    public val controlPanelArn: Output?
        get() = javaResource.controlPanelArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the routing control. You can use any non-white space character in the name.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the routing control.
     */
    public val routingControlArn: Output
        get() = javaResource.routingControlArn().applyValue({ args0 -> args0 })

    /**
     * The deployment status of the routing control. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}

public object RoutingControlMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.route53recoverycontrol.RoutingControl::class == javaResource::class

    override fun map(javaResource: Resource): RoutingControl = RoutingControl(
        javaResource as
            com.pulumi.awsnative.route53recoverycontrol.RoutingControl,
    )
}

/**
 * @see [RoutingControl].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [RoutingControl].
 */
public suspend fun routingControl(
    name: String,
    block: suspend RoutingControlResourceBuilder.() -> Unit,
): RoutingControl {
    val builder = RoutingControlResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [RoutingControl].
 * @param name The _unique_ name of the resulting resource.
 */
public fun routingControl(name: String): RoutingControl {
    val builder = RoutingControlResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy