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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.datazone.kotlin

import com.pulumi.awsnative.datazone.kotlin.enums.UserProfileStatus
import com.pulumi.awsnative.datazone.kotlin.enums.UserProfileType
import com.pulumi.awsnative.datazone.kotlin.enums.UserProfileUserType
import com.pulumi.awsnative.datazone.kotlin.outputs.UserProfileDetails0Properties
import com.pulumi.awsnative.datazone.kotlin.outputs.UserProfileDetails1Properties
import com.pulumi.core.Either
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.datazone.kotlin.enums.UserProfileStatus.Companion.toKotlin as userProfileStatusToKotlin
import com.pulumi.awsnative.datazone.kotlin.enums.UserProfileType.Companion.toKotlin as userProfileTypeToKotlin
import com.pulumi.awsnative.datazone.kotlin.enums.UserProfileUserType.Companion.toKotlin as userProfileUserTypeToKotlin

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

    public var args: UserProfileArgs = UserProfileArgs()

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

/**
 * A user profile represents Amazon DataZone users. Amazon DataZone supports both IAM roles and SSO identities to interact with the Amazon DataZone Management Console and the data portal for different purposes. Domain administrators use IAM roles to perform the initial administrative domain-related work in the Amazon DataZone Management Console, including creating new Amazon DataZone domains, configuring metadata form types, and implementing policies. Data workers use their SSO corporate identities via Identity Center to log into the Amazon DataZone Data Portal and access projects where they have memberships.
 */
public class UserProfile internal constructor(
    override val javaResource: com.pulumi.awsnative.datazone.UserProfile,
) : KotlinCustomResource(javaResource, UserProfileMapper) {
    /**
     * The ID of the Amazon DataZone user profile.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    public val details: Output>
        get() = javaResource.details().applyValue({ args0 ->
            args0.transform(
                { args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.datazone.kotlin.outputs.UserProfileDetails0Properties.Companion.toKotlin(args0)
                    })
                },
                { args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.datazone.kotlin.outputs.UserProfileDetails1Properties.Companion.toKotlin(args0)
                    })
                },
            )
        })

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

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

    /**
     * The status of the user profile.
     */
    public val status: Output?
        get() = javaResource.status().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    userProfileStatusToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The type of the user profile.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 ->
            args0.let({ args0 ->
                userProfileTypeToKotlin(args0)
            })
        })

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

    /**
     * The user type of the user for which the user profile is created.
     */
    public val userType: Output?
        get() = javaResource.userType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    userProfileUserTypeToKotlin(args0)
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy