All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.keyvault.kotlin.ManagedHardwareSecurityModuleRoleDefinitionArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.keyvault.kotlin

import com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs.builder
import com.pulumi.azure.keyvault.kotlin.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs
import com.pulumi.azure.keyvault.kotlin.inputs.ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages a KeyVault Managed Hardware Security Module Role Definition. This resource works together with Managed hardware security module resource.
 * ## Example Usage
 * 
 * ```yaml
 * resources:
 *   example:
 *     type: azure:keyvault:ManagedHardwareSecurityModule
 *     properties:
 *       name: example
 *       resourceGroupName: ${exampleAzurermResourceGroup.name}
 *       location: ${exampleAzurermResourceGroup.location}
 *       skuName: Standard_B1
 *       tenantId: ${current.tenantId}
 *       adminObjectIds:
 *         - ${current.objectId}
 *       purgeProtectionEnabled: false
 *       activeConfig:
 *         - securityDomainCertificate:
 *             - ${cert[0].id}
 *             - ${cert[1].id}
 *             - ${cert[2].id}
 *           securityDomainQuorum: 2
 *   exampleManagedHardwareSecurityModuleRoleDefinition:
 *     type: azure:keyvault:ManagedHardwareSecurityModuleRoleDefinition
 *     name: example
 *     properties:
 *       name: 7d206142-bf01-11ed-80bc-00155d61ee9e
 *       vaultBaseUrl: ${example.hsmUri}
 *       description: desc foo
 *       permissions:
 *         - dataActions:
 *             - Microsoft.KeyVault/managedHsm/keys/read/action
 * ```
 * 
 * ## Import
 * KeyVaults can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition example https://0000.managedhsm.azure.net///RoleDefinition/00000000-0000-0000-0000-000000000000
 * ```
 * @property description Specifies a text description about this KeyVault Role Definition.
 * @property managedHsmId
 * @property name The name which should be used for this KeyVault Role Definition. Changing this forces a new KeyVault Role Definition to be created.
 * @property permissions One or more `permission` blocks as defined below.
 * @property roleName Specify a name for this KeyVault Role Definition.
 * @property vaultBaseUrl The base URL of the managed hardware security module resource. Changing this forces a new KeyVault Role Definition to be created.
 */
public data class ManagedHardwareSecurityModuleRoleDefinitionArgs(
    public val description: Output? = null,
    public val managedHsmId: Output? = null,
    public val name: Output? = null,
    public val permissions: Output>? =
        null,
    public val roleName: Output? = null,
    public val vaultBaseUrl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs =
        com.pulumi.azure.keyvault.ManagedHardwareSecurityModuleRoleDefinitionArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .managedHsmId(managedHsmId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .permissions(
                permissions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .roleName(roleName?.applyValue({ args0 -> args0 }))
            .vaultBaseUrl(vaultBaseUrl?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ManagedHardwareSecurityModuleRoleDefinitionArgs].
 */
@PulumiTagMarker
public class ManagedHardwareSecurityModuleRoleDefinitionArgsBuilder internal constructor() {
    private var description: Output? = null

    private var managedHsmId: Output? = null

    private var name: Output? = null

    private var permissions: Output>? =
        null

    private var roleName: Output? = null

    private var vaultBaseUrl: Output? = null

    /**
     * @param value Specifies a text description about this KeyVault Role Definition.
     */
    @JvmName("kupjnsdelrodtoiu")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value
     */
    @JvmName("vdmxjucllxcpuagj")
    public suspend fun managedHsmId(`value`: Output) {
        this.managedHsmId = value
    }

    /**
     * @param value The name which should be used for this KeyVault Role Definition. Changing this forces a new KeyVault Role Definition to be created.
     */
    @JvmName("xpklprxjadbgxjex")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value One or more `permission` blocks as defined below.
     */
    @JvmName("aecexnsjniwajuvx")
    public suspend fun permissions(`value`: Output>) {
        this.permissions = value
    }

    @JvmName("memndeyascnnsuje")
    public suspend fun permissions(vararg values: Output) {
        this.permissions = Output.all(values.asList())
    }

    /**
     * @param values One or more `permission` blocks as defined below.
     */
    @JvmName("ptfnuikfhutgptwr")
    public suspend fun permissions(values: List>) {
        this.permissions = Output.all(values)
    }

    /**
     * @param value Specify a name for this KeyVault Role Definition.
     */
    @JvmName("rrqkyuovlsfmjjsy")
    public suspend fun roleName(`value`: Output) {
        this.roleName = value
    }

    /**
     * @param value The base URL of the managed hardware security module resource. Changing this forces a new KeyVault Role Definition to be created.
     */
    @JvmName("gqjhcxkacyhiwbsq")
    public suspend fun vaultBaseUrl(`value`: Output) {
        this.vaultBaseUrl = value
    }

    /**
     * @param value Specifies a text description about this KeyVault Role Definition.
     */
    @JvmName("wksbncwodulhpbjr")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value
     */
    @JvmName("vkifyokobujattid")
    public suspend fun managedHsmId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.managedHsmId = mapped
    }

    /**
     * @param value The name which should be used for this KeyVault Role Definition. Changing this forces a new KeyVault Role Definition to be created.
     */
    @JvmName("wnuavxsivxggwbxt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value One or more `permission` blocks as defined below.
     */
    @JvmName("oflebxrlxkvafodo")
    public suspend fun permissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param argument One or more `permission` blocks as defined below.
     */
    @JvmName("rrvwjrqawegoandd")
    public suspend fun permissions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param argument One or more `permission` blocks as defined below.
     */
    @JvmName("ejrravgyxhakxjab")
    public suspend fun permissions(vararg argument: suspend ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param argument One or more `permission` blocks as defined below.
     */
    @JvmName("tdqgpilvdwdypnew")
    public suspend fun permissions(argument: suspend ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ManagedHardwareSecurityModuleRoleDefinitionPermissionArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param values One or more `permission` blocks as defined below.
     */
    @JvmName("xfxqxhcewllqomwv")
    public suspend fun permissions(vararg values: ManagedHardwareSecurityModuleRoleDefinitionPermissionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param value Specify a name for this KeyVault Role Definition.
     */
    @JvmName("guwtcqywttjulftq")
    public suspend fun roleName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleName = mapped
    }

    /**
     * @param value The base URL of the managed hardware security module resource. Changing this forces a new KeyVault Role Definition to be created.
     */
    @JvmName("iaqojcahpowrbbul")
    public suspend fun vaultBaseUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vaultBaseUrl = mapped
    }

    internal fun build(): ManagedHardwareSecurityModuleRoleDefinitionArgs =
        ManagedHardwareSecurityModuleRoleDefinitionArgs(
            description = description,
            managedHsmId = managedHsmId,
            name = name,
            permissions = permissions,
            roleName = roleName,
            vaultBaseUrl = vaultBaseUrl,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy