com.pulumi.awsnative.sso.kotlin.ApplicationAssignment.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.sso.kotlin
import com.pulumi.awsnative.sso.kotlin.enums.ApplicationAssignmentPrincipalType
import com.pulumi.awsnative.sso.kotlin.enums.ApplicationAssignmentPrincipalType.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 [ApplicationAssignment].
*/
@PulumiTagMarker
public class ApplicationAssignmentResourceBuilder internal constructor() {
public var name: String? = null
public var args: ApplicationAssignmentArgs = ApplicationAssignmentArgs()
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 ApplicationAssignmentArgsBuilder.() -> Unit) {
val builder = ApplicationAssignmentArgsBuilder()
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(): ApplicationAssignment {
val builtJavaResource = com.pulumi.awsnative.sso.ApplicationAssignment(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ApplicationAssignment(builtJavaResource)
}
}
/**
* Resource Type definition for SSO application access grant to a user or group.
*/
public class ApplicationAssignment internal constructor(
override val javaResource: com.pulumi.awsnative.sso.ApplicationAssignment,
) : KotlinCustomResource(javaResource, ApplicationAssignmentMapper) {
/**
* The ARN of the application.
*/
public val applicationArn: Output
get() = javaResource.applicationArn().applyValue({ args0 -> args0 })
/**
* An identifier for an object in IAM Identity Center, such as a user or group
*/
public val principalId: Output
get() = javaResource.principalId().applyValue({ args0 -> args0 })
/**
* The entity type for which the assignment will be created.
*/
public val principalType: Output
get() = javaResource.principalType().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
}
public object ApplicationAssignmentMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.sso.ApplicationAssignment::class == javaResource::class
override fun map(javaResource: Resource): ApplicationAssignment =
ApplicationAssignment(javaResource as com.pulumi.awsnative.sso.ApplicationAssignment)
}
/**
* @see [ApplicationAssignment].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ApplicationAssignment].
*/
public suspend fun applicationAssignment(
name: String,
block: suspend ApplicationAssignmentResourceBuilder.() -> Unit,
): ApplicationAssignment {
val builder = ApplicationAssignmentResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ApplicationAssignment].
* @param name The _unique_ name of the resulting resource.
*/
public fun applicationAssignment(name: String): ApplicationAssignment {
val builder = ApplicationAssignmentResourceBuilder()
builder.name(name)
return builder.build()
}