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

com.pulumi.awsnative.controltower.kotlin.LandingZone.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.controltower.kotlin

import com.pulumi.awsnative.controltower.kotlin.enums.LandingZoneDriftStatus
import com.pulumi.awsnative.controltower.kotlin.enums.LandingZoneStatus
import com.pulumi.awsnative.kotlin.outputs.Tag
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.controltower.kotlin.enums.LandingZoneDriftStatus.Companion.toKotlin as landingZoneDriftStatusToKotlin
import com.pulumi.awsnative.controltower.kotlin.enums.LandingZoneStatus.Companion.toKotlin as landingZoneStatusToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: LandingZoneArgs = LandingZoneArgs()

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

/**
 * Definition of AWS::ControlTower::LandingZone Resource Type
 */
public class LandingZone internal constructor(
    override val javaResource: com.pulumi.awsnative.controltower.LandingZone,
) : KotlinCustomResource(javaResource, LandingZoneMapper) {
    /**
     * The ARN of the landing zone.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The drift status of the landing zone.
     */
    public val driftStatus: Output
        get() = javaResource.driftStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                landingZoneDriftStatusToKotlin(args0)
            })
        })

    /**
     * The unique identifier of the landing zone.
     */
    public val landingZoneIdentifier: Output
        get() = javaResource.landingZoneIdentifier().applyValue({ args0 -> args0 })

    /**
     * The latest available version of the landing zone.
     */
    public val latestAvailableVersion: Output
        get() = javaResource.latestAvailableVersion().applyValue({ args0 -> args0 })

    /**
     * The landing zone manifest JSON text file that specifies the landing zone configurations.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::ControlTower::LandingZone` for more information about the expected schema for this property.
     */
    public val manifest: Output
        get() = javaResource.manifest().applyValue({ args0 -> args0 })

    /**
     * The landing zone deployment status. One of `ACTIVE` , `PROCESSING` , `FAILED` .
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                landingZoneStatusToKotlin(args0)
            })
        })

    /**
     * Tags to be applied to the landing zone.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The landing zone's current deployed version.
     */
    public val version: Output
        get() = javaResource.version().applyValue({ args0 -> args0 })
}

public object LandingZoneMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.controltower.LandingZone::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy