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

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

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

package com.pulumi.awsnative.datazone.kotlin

import com.pulumi.awsnative.datazone.kotlin.enums.DomainStatus
import com.pulumi.awsnative.datazone.kotlin.outputs.DomainSingleSignOn
import com.pulumi.awsnative.kotlin.outputs.Tag
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
import com.pulumi.awsnative.datazone.kotlin.enums.DomainStatus.Companion.toKotlin as domainStatusToKotlin
import com.pulumi.awsnative.datazone.kotlin.outputs.DomainSingleSignOn.Companion.toKotlin as domainSingleSignOnToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: DomainArgs = DomainArgs()

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

/**
 * A domain is an organizing entity for connecting together assets, users, and their projects
 */
public class Domain internal constructor(
    override val javaResource: com.pulumi.awsnative.datazone.Domain,
) : KotlinCustomResource(javaResource, DomainMapper) {
    /**
     * The ARN of the Amazon DataZone domain.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The id of the Amazon DataZone domain.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The timestamp of when the Amazon DataZone domain was last updated.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The description of the Amazon DataZone domain.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the AWS account that houses the Amazon DataZone domain.
     */
    public val domainExecutionRole: Output
        get() = javaResource.domainExecutionRole().applyValue({ args0 -> args0 })

    /**
     * The identifier of the AWS Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data.
     */
    public val kmsKeyIdentifier: Output?
        get() = javaResource.kmsKeyIdentifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The timestamp of when the Amazon DataZone domain was last updated.
     */
    public val lastUpdatedAt: Output
        get() = javaResource.lastUpdatedAt().applyValue({ args0 -> args0 })

    /**
     * The identifier of the AWS account that manages the domain.
     */
    public val managedAccountId: Output
        get() = javaResource.managedAccountId().applyValue({ args0 -> args0 })

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

    /**
     * The URL of the data portal for this Amazon DataZone domain.
     */
    public val portalUrl: Output
        get() = javaResource.portalUrl().applyValue({ args0 -> args0 })

    /**
     * The single-sign on configuration of the Amazon DataZone domain.
     */
    public val singleSignOn: Output?
        get() = javaResource.singleSignOn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    domainSingleSignOnToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The status of the Amazon DataZone domain.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                domainStatusToKotlin(args0)
            })
        })

    /**
     * The tags specified for the Amazon DataZone domain.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy