com.pulumi.awsnative.emr.kotlin.StudioSessionMapping.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.emr.kotlin
import com.pulumi.awsnative.emr.kotlin.enums.StudioSessionMappingIdentityType
import com.pulumi.awsnative.emr.kotlin.enums.StudioSessionMappingIdentityType.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 [StudioSessionMapping].
*/
@PulumiTagMarker
public class StudioSessionMappingResourceBuilder internal constructor() {
public var name: String? = null
public var args: StudioSessionMappingArgs = StudioSessionMappingArgs()
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 StudioSessionMappingArgsBuilder.() -> Unit) {
val builder = StudioSessionMappingArgsBuilder()
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(): StudioSessionMapping {
val builtJavaResource = com.pulumi.awsnative.emr.StudioSessionMapping(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return StudioSessionMapping(builtJavaResource)
}
}
/**
* An example resource schema demonstrating some basic constructs and validation rules.
*/
public class StudioSessionMapping internal constructor(
override val javaResource: com.pulumi.awsnative.emr.StudioSessionMapping,
) : KotlinCustomResource(javaResource, StudioSessionMappingMapper) {
/**
* The name of the user or group. For more information, see UserName and DisplayName in the AWS SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.
*/
public val identityName: Output
get() = javaResource.identityName().applyValue({ args0 -> args0 })
/**
* Specifies whether the identity to map to the Studio is a user or a group.
*/
public val identityType: Output
get() = javaResource.identityType().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. Session policies refine Studio user permissions without the need to use multiple IAM user roles.
*/
public val sessionPolicyArn: Output
get() = javaResource.sessionPolicyArn().applyValue({ args0 -> args0 })
/**
* The ID of the Amazon EMR Studio to which the user or group will be mapped.
*/
public val studioId: Output
get() = javaResource.studioId().applyValue({ args0 -> args0 })
}
public object StudioSessionMappingMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.emr.StudioSessionMapping::class == javaResource::class
override fun map(javaResource: Resource): StudioSessionMapping = StudioSessionMapping(
javaResource
as com.pulumi.awsnative.emr.StudioSessionMapping,
)
}
/**
* @see [StudioSessionMapping].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [StudioSessionMapping].
*/
public suspend fun studioSessionMapping(
name: String,
block: suspend StudioSessionMappingResourceBuilder.() -> Unit,
): StudioSessionMapping {
val builder = StudioSessionMappingResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [StudioSessionMapping].
* @param name The _unique_ name of the resulting resource.
*/
public fun studioSessionMapping(name: String): StudioSessionMapping {
val builder = StudioSessionMappingResourceBuilder()
builder.name(name)
return builder.build()
}