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

com.pulumi.awsnative.appconfig.kotlin.ExtensionAssociation.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.appconfig.kotlin

import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map

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

    public var args: ExtensionAssociationArgs = ExtensionAssociationArgs()

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

/**
 * An example resource schema demonstrating some basic constructs and validation rules.
 */
public class ExtensionAssociation internal constructor(
    override val javaResource: com.pulumi.awsnative.appconfig.ExtensionAssociation,
) : KotlinCustomResource(javaResource, ExtensionAssociationMapper) {
    /**
     * The ARN of the extension defined in the association.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The system-generated ID for the association.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The ARN of the extension defined in the association.
     */
    public val extensionArn: Output
        get() = javaResource.extensionArn().applyValue({ args0 -> args0 })

    /**
     * The name, the ID, or the Amazon Resource Name (ARN) of the extension.
     */
    public val extensionIdentifier: Output?
        get() = javaResource.extensionIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The version number of the extension. If not specified, AWS AppConfig uses the maximum version of the extension.
     */
    public val extensionVersionNumber: Output?
        get() = javaResource.extensionVersionNumber().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The parameter names and values defined in the extensions. Extension parameters marked `Required` must be entered for this field.
     */
    public val parameters: Output>?
        get() = javaResource.parameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The ARNs of applications, configuration profiles, or environments defined in the association.
     */
    public val resourceArn: Output
        get() = javaResource.resourceArn().applyValue({ args0 -> args0 })

    /**
     * The ARN of an application, configuration profile, or environment.
     */
    public val resourceIdentifier: Output?
        get() = javaResource.resourceIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ExtensionAssociationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.appconfig.ExtensionAssociation::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy