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

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

package com.pulumi.awsnative.cloudformation.kotlin

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 [HookDefaultVersion].
 */
@PulumiTagMarker
public class HookDefaultVersionResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: HookDefaultVersionArgs = HookDefaultVersionArgs()

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

/**
 * Set a version as default version for a hook in CloudFormation Registry.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class HookDefaultVersion internal constructor(
    override val javaResource: com.pulumi.awsnative.cloudformation.HookDefaultVersion,
) : KotlinCustomResource(javaResource, HookDefaultVersionMapper) {
    /**
     * The Amazon Resource Name (ARN) of the type. This is used to uniquely identify a HookDefaultVersion
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The name of the type being registered.
     * We recommend that type names adhere to the following pattern: company_or_organization::service::type.
     */
    public val typeName: Output?
        get() = javaResource.typeName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

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

    /**
     * The ID of an existing version of the hook to set as the default.
     */
    public val versionId: Output?
        get() = javaResource.versionId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object HookDefaultVersionMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.cloudformation.HookDefaultVersion::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy