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

com.pulumi.awsnative.datazone.kotlin.SubscriptionTarget.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.datazone.kotlin

import com.pulumi.awsnative.datazone.kotlin.outputs.SubscriptionTargetForm
import com.pulumi.awsnative.datazone.kotlin.outputs.SubscriptionTargetForm.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
import kotlin.collections.List

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

    public var args: SubscriptionTargetArgs = SubscriptionTargetArgs()

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

/**
 * Subscription targets enables one to access the data to which you have subscribed in your projects.
 */
public class SubscriptionTarget internal constructor(
    override val javaResource: com.pulumi.awsnative.datazone.SubscriptionTarget,
) : KotlinCustomResource(javaResource, SubscriptionTargetMapper) {
    /**
     * The asset types that can be included in the subscription target.
     */
    public val applicableAssetTypes: Output>
        get() = javaResource.applicableAssetTypes().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The authorized principals of the subscription target.
     */
    public val authorizedPrincipals: Output>
        get() = javaResource.authorizedPrincipals().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The ID of the subscription target.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The timestamp of when the subscription target was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The Amazon DataZone user who created the subscription target.
     */
    public val createdBy: Output
        get() = javaResource.createdBy().applyValue({ args0 -> args0 })

    /**
     * The ID of the Amazon DataZone domain in which subscription target is created.
     */
    public val domainId: Output
        get() = javaResource.domainId().applyValue({ args0 -> args0 })

    /**
     * The ID of the Amazon DataZone domain in which subscription target would be created.
     */
    public val domainIdentifier: Output
        get() = javaResource.domainIdentifier().applyValue({ args0 -> args0 })

    /**
     * The ID of the environment in which subscription target is created.
     */
    public val environmentId: Output
        get() = javaResource.environmentId().applyValue({ args0 -> args0 })

    /**
     * The ID of the environment in which subscription target would be created.
     */
    public val environmentIdentifier: Output
        get() = javaResource.environmentIdentifier().applyValue({ args0 -> args0 })

    /**
     * The manage access role that is used to create the subscription target.
     */
    public val manageAccessRole: Output
        get() = javaResource.manageAccessRole().applyValue({ args0 -> args0 })

    /**
     * The name of the subscription target.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The identifier of the project specified in the subscription target.
     */
    public val projectId: Output
        get() = javaResource.projectId().applyValue({ args0 -> args0 })

    /**
     * The provider of the subscription target.
     */
    public val provider: Output?
        get() = javaResource.provider().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The configuration of the subscription target.
     */
    public val subscriptionTargetConfig: Output>
        get() = javaResource.subscriptionTargetConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            })
        })

    /**
     * The type of the subscription target.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })

    /**
     * The timestamp of when the subscription target was updated.
     */
    public val updatedAt: Output
        get() = javaResource.updatedAt().applyValue({ args0 -> args0 })

    /**
     * The Amazon DataZone user who updated the subscription target.
     */
    public val updatedBy: Output
        get() = javaResource.updatedBy().applyValue({ args0 -> args0 })
}

public object SubscriptionTargetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.datazone.SubscriptionTarget::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy