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

com.pulumi.awsnative.servicecatalogappregistry.kotlin.ResourceAssociation.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.servicecatalogappregistry.kotlin

import com.pulumi.awsnative.servicecatalogappregistry.kotlin.enums.ResourceAssociationResourceType
import com.pulumi.awsnative.servicecatalogappregistry.kotlin.enums.ResourceAssociationResourceType.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 [ResourceAssociation].
 */
@PulumiTagMarker
public class ResourceAssociationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ResourceAssociationArgs = ResourceAssociationArgs()

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

/**
 * Resource Schema for AWS::ServiceCatalogAppRegistry::ResourceAssociation
 */
public class ResourceAssociation internal constructor(
    override val javaResource: com.pulumi.awsnative.servicecatalogappregistry.ResourceAssociation,
) : KotlinCustomResource(javaResource, ResourceAssociationMapper) {
    /**
     * The name or the Id of the Application.
     */
    public val application: Output
        get() = javaResource.application().applyValue({ args0 -> args0 })

    /**
     * The Amazon resource name (ARN) that specifies the application.
     */
    public val applicationArn: Output
        get() = javaResource.applicationArn().applyValue({ args0 -> args0 })

    /**
     * The name or the Id of the Resource.
     */
    public val resource: Output
        get() = javaResource.resource().applyValue({ args0 -> args0 })

    /**
     * The Amazon resource name (ARN) that specifies the resource.
     */
    public val resourceArn: Output
        get() = javaResource.resourceArn().applyValue({ args0 -> args0 })

    /**
     * The type of the CFN Resource for now it's enum CFN_STACK.
     */
    public val resourceType: Output
        get() = javaResource.resourceType().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
}

public object ResourceAssociationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.servicecatalogappregistry.ResourceAssociation::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy