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

com.pulumi.awsnative.cloudformation.kotlin.HookVersion.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.cloudformation.kotlin

import com.pulumi.awsnative.cloudformation.kotlin.enums.HookVersionVisibility
import com.pulumi.awsnative.cloudformation.kotlin.outputs.HookVersionLoggingConfig
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 com.pulumi.awsnative.cloudformation.kotlin.enums.HookVersionVisibility.Companion.toKotlin as hookVersionVisibilityToKotlin
import com.pulumi.awsnative.cloudformation.kotlin.outputs.HookVersionLoggingConfig.Companion.toKotlin as hookVersionLoggingConfigToKotlin

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

    public var args: HookVersionArgs = HookVersionArgs()

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

/**
 * Publishes new or first hook version to AWS CloudFormation Registry.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class HookVersion internal constructor(
    override val javaResource: com.pulumi.awsnative.cloudformation.HookVersion,
) : KotlinCustomResource(javaResource, HookVersionMapper) {
    /**
     * The Amazon Resource Name (ARN) of the type, here the HookVersion. This is used to uniquely identify a HookVersion resource
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the IAM execution role to use to register the type. If your resource type calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS APIs, and provision that execution role in your account. CloudFormation then assumes that execution role to provide your resource type with the appropriate credentials.
     */
    public val executionRoleArn: Output?
        get() = javaResource.executionRoleArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Indicates if this type version is the current default version
     */
    public val isDefaultVersion: Output
        get() = javaResource.isDefaultVersion().applyValue({ args0 -> args0 })

    /**
     * Specifies logging configuration information for a type.
     */
    public val loggingConfig: Output?
        get() = javaResource.loggingConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> hookVersionLoggingConfigToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A url to the S3 bucket containing the schema handler package that contains the schema, event handlers, and associated files for the type you want to register.
     * For information on generating a schema handler package for the type you want to register, see submit in the CloudFormation CLI User Guide.
     */
    public val schemaHandlerPackage: Output
        get() = javaResource.schemaHandlerPackage().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the type without the versionID.
     */
    public val typeArn: Output
        get() = javaResource.typeArn().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 })

    /**
     * The ID of the version of the type represented by this hook instance.
     */
    public val versionId: Output
        get() = javaResource.versionId().applyValue({ args0 -> args0 })

    /**
     * The scope at which the type is visible and usable in CloudFormation operations.
     * Valid values include:
     * PRIVATE: The type is only visible and usable within the account in which it is registered. Currently, AWS CloudFormation marks any types you register as PRIVATE.
     * PUBLIC: The type is publically visible and usable within any Amazon account.
     */
    public val visibility: Output
        get() = javaResource.visibility().applyValue({ args0 ->
            args0.let({ args0 ->
                hookVersionVisibilityToKotlin(args0)
            })
        })
}

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy