com.pulumi.awsnative.lakeformation.kotlin.PrincipalPermissions.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.lakeformation.kotlin
import com.pulumi.awsnative.lakeformation.kotlin.enums.PrincipalPermissionsPermission
import com.pulumi.awsnative.lakeformation.kotlin.outputs.PrincipalPermissionsDataLakePrincipal
import com.pulumi.awsnative.lakeformation.kotlin.outputs.PrincipalPermissionsResource
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 kotlin.collections.List
import com.pulumi.awsnative.lakeformation.kotlin.enums.PrincipalPermissionsPermission.Companion.toKotlin as principalPermissionsPermissionToKotlin
import com.pulumi.awsnative.lakeformation.kotlin.outputs.PrincipalPermissionsDataLakePrincipal.Companion.toKotlin as principalPermissionsDataLakePrincipalToKotlin
import com.pulumi.awsnative.lakeformation.kotlin.outputs.PrincipalPermissionsResource.Companion.toKotlin as principalPermissionsResourceToKotlin
/**
* Builder for [PrincipalPermissions].
*/
@PulumiTagMarker
public class PrincipalPermissionsResourceBuilder internal constructor() {
public var name: String? = null
public var args: PrincipalPermissionsArgs = PrincipalPermissionsArgs()
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 PrincipalPermissionsArgsBuilder.() -> Unit) {
val builder = PrincipalPermissionsArgsBuilder()
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(): PrincipalPermissions {
val builtJavaResource =
com.pulumi.awsnative.lakeformation.PrincipalPermissions(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PrincipalPermissions(builtJavaResource)
}
}
/**
* The ``AWS::LakeFormation::PrincipalPermissions`` resource represents the permissions that a principal has on a GLUDC resource (such as GLUlong databases or GLUlong tables). When you create a ``PrincipalPermissions`` resource, the permissions are granted via the LFlong ``GrantPermissions`` API operation. When you delete a ``PrincipalPermissions`` resource, the permissions on principal-resource pair are revoked via the LFlong ``RevokePermissions`` API operation.
*/
public class PrincipalPermissions internal constructor(
override val javaResource: com.pulumi.awsnative.lakeformation.PrincipalPermissions,
) : KotlinCustomResource(javaResource, PrincipalPermissionsMapper) {
/**
* The identifier for the GLUDC. By default, the account ID. The GLUDC is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
*/
public val catalog: Output?
get() = javaResource.catalog().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The permissions granted or revoked.
*/
public val permissions: Output>
get() = javaResource.permissions().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
principalPermissionsPermissionToKotlin(args0)
})
})
})
/**
* Indicates the ability to grant permissions (as a subset of permissions granted).
*/
public val permissionsWithGrantOption: Output>
get() = javaResource.permissionsWithGrantOption().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> principalPermissionsPermissionToKotlin(args0) })
})
})
/**
* The principal to be granted a permission.
*/
public val principal: Output
get() = javaResource.principal().applyValue({ args0 ->
args0.let({ args0 ->
principalPermissionsDataLakePrincipalToKotlin(args0)
})
})
/**
* Json encoding of the input principal. For example: `{"DataLakePrincipalIdentifier":"arn:aws:iam::123456789012:role/ExampleRole"}`
*/
public val principalIdentifier: Output
get() = javaResource.principalIdentifier().applyValue({ args0 -> args0 })
/**
* The resource to be granted or revoked permissions.
*/
public val resource: Output
get() = javaResource.resource().applyValue({ args0 ->
args0.let({ args0 ->
principalPermissionsResourceToKotlin(args0)
})
})
/**
* Json encoding of the input resource. For example: `{"Catalog":null,"Database":null,"Table":null,"TableWithColumns":null,"DataLocation":null,"DataCellsFilter":{"TableCatalogId":"123456789012","DatabaseName":"ExampleDatabase","TableName":"ExampleTable","Name":"ExampleFilter"},"LFTag":null,"LFTagPolicy":null}`
*/
public val resourceIdentifier: Output
get() = javaResource.resourceIdentifier().applyValue({ args0 -> args0 })
}
public object PrincipalPermissionsMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.lakeformation.PrincipalPermissions::class == javaResource::class
override fun map(javaResource: Resource): PrincipalPermissions = PrincipalPermissions(
javaResource
as com.pulumi.awsnative.lakeformation.PrincipalPermissions,
)
}
/**
* @see [PrincipalPermissions].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PrincipalPermissions].
*/
public suspend fun principalPermissions(
name: String,
block: suspend PrincipalPermissionsResourceBuilder.() -> Unit,
): PrincipalPermissions {
val builder = PrincipalPermissionsResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PrincipalPermissions].
* @param name The _unique_ name of the resulting resource.
*/
public fun principalPermissions(name: String): PrincipalPermissions {
val builder = PrincipalPermissionsResourceBuilder()
builder.name(name)
return builder.build()
}