com.pulumi.awsnative.verifiedpermissions.kotlin.IdentitySource.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.verifiedpermissions.kotlin
import com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceConfiguration0Properties
import com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceConfiguration1Properties
import com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceDetails
import com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceDetails.Companion.toKotlin
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
/**
* Builder for [IdentitySource].
*/
@PulumiTagMarker
public class IdentitySourceResourceBuilder internal constructor() {
public var name: String? = null
public var args: IdentitySourceArgs = IdentitySourceArgs()
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 IdentitySourceArgsBuilder.() -> Unit) {
val builder = IdentitySourceArgsBuilder()
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(): IdentitySource {
val builtJavaResource =
com.pulumi.awsnative.verifiedpermissions.IdentitySource(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IdentitySource(builtJavaResource)
}
}
/**
* Definition of AWS::VerifiedPermissions::IdentitySource Resource Type
* ## Example Usage
* ### Example
* No Java example available.
*/
public class IdentitySource internal constructor(
override val javaResource: com.pulumi.awsnative.verifiedpermissions.IdentitySource,
) : KotlinCustomResource(javaResource, IdentitySourceMapper) {
/**
* Contains configuration information used when creating a new identity source.
*/
public val configuration:
Output>
get() = javaResource.configuration().applyValue({ args0 ->
args0.transform(
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceConfiguration0Properties.Companion.toKotlin(args0)
})
},
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.verifiedpermissions.kotlin.outputs.IdentitySourceConfiguration1Properties.Companion.toKotlin(args0)
})
},
)
})
public val details: Output
get() = javaResource.details().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The unique ID of the new or updated identity store.
*/
public val identitySourceId: Output
get() = javaResource.identitySourceId().applyValue({ args0 -> args0 })
/**
* Specifies the ID of the policy store in which you want to store this identity source. Only policies and requests made using this policy store can reference identities from the identity provider configured in the new identity source.
*/
public val policyStoreId: Output
get() = javaResource.policyStoreId().applyValue({ args0 -> args0 })
/**
* Specifies the namespace and data type of the principals generated for identities authenticated by the new identity source.
*/
public val principalEntityType: Output?
get() = javaResource.principalEntityType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object IdentitySourceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.verifiedpermissions.IdentitySource::class == javaResource::class
override fun map(javaResource: Resource): IdentitySource = IdentitySource(
javaResource as
com.pulumi.awsnative.verifiedpermissions.IdentitySource,
)
}
/**
* @see [IdentitySource].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IdentitySource].
*/
public suspend fun identitySource(
name: String,
block: suspend IdentitySourceResourceBuilder.() -> Unit,
): IdentitySource {
val builder = IdentitySourceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IdentitySource].
* @param name The _unique_ name of the resulting resource.
*/
public fun identitySource(name: String): IdentitySource {
val builder = IdentitySourceResourceBuilder()
builder.name(name)
return builder.build()
}