com.pulumi.awsnative.datazone.kotlin.ProjectMembership.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.datazone.kotlin
import com.pulumi.awsnative.datazone.kotlin.enums.ProjectMembershipUserDesignation
import com.pulumi.awsnative.datazone.kotlin.enums.ProjectMembershipUserDesignation.Companion.toKotlin
import com.pulumi.awsnative.datazone.kotlin.outputs.ProjectMembershipMember0Properties
import com.pulumi.awsnative.datazone.kotlin.outputs.ProjectMembershipMember1Properties
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 [ProjectMembership].
*/
@PulumiTagMarker
public class ProjectMembershipResourceBuilder internal constructor() {
public var name: String? = null
public var args: ProjectMembershipArgs = ProjectMembershipArgs()
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 ProjectMembershipArgsBuilder.() -> Unit) {
val builder = ProjectMembershipArgsBuilder()
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(): ProjectMembership {
val builtJavaResource = com.pulumi.awsnative.datazone.ProjectMembership(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ProjectMembership(builtJavaResource)
}
}
/**
* Definition of AWS::DataZone::ProjectMembership Resource Type
*/
public class ProjectMembership internal constructor(
override val javaResource: com.pulumi.awsnative.datazone.ProjectMembership,
) : KotlinCustomResource(javaResource, ProjectMembershipMapper) {
/**
* The designated role of a project member.
*/
public val designation: Output
get() = javaResource.designation().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The ID of the Amazon DataZone domain in which project membership is created.
*/
public val domainIdentifier: Output
get() = javaResource.domainIdentifier().applyValue({ args0 -> args0 })
/**
* The details about a project member.
*/
public val member:
Output>
get() = javaResource.member().applyValue({ args0 ->
args0.transform(
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.datazone.kotlin.outputs.ProjectMembershipMember0Properties.Companion.toKotlin(args0)
})
},
{ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.datazone.kotlin.outputs.ProjectMembershipMember1Properties.Companion.toKotlin(args0)
})
},
)
})
/**
* The ID of the project for which this project membership was created.
*/
public val projectIdentifier: Output
get() = javaResource.projectIdentifier().applyValue({ args0 -> args0 })
}
public object ProjectMembershipMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.datazone.ProjectMembership::class == javaResource::class
override fun map(javaResource: Resource): ProjectMembership = ProjectMembership(
javaResource as
com.pulumi.awsnative.datazone.ProjectMembership,
)
}
/**
* @see [ProjectMembership].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ProjectMembership].
*/
public suspend fun projectMembership(
name: String,
block: suspend ProjectMembershipResourceBuilder.() -> Unit,
): ProjectMembership {
val builder = ProjectMembershipResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ProjectMembership].
* @param name The _unique_ name of the resulting resource.
*/
public fun projectMembership(name: String): ProjectMembership {
val builder = ProjectMembershipResourceBuilder()
builder.name(name)
return builder.build()
}