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

com.pulumi.azure.keyvault.kotlin.inputs.KeyVaultAccessPolicyArgs.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.inputs

import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property applicationId The object ID of an Application in Azure Active Directory.
 * @property certificatePermissions List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`.
 * @property keyPermissions List of key permissions. Possible values are `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
 * @property objectId The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
 * @property secretPermissions List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
 * @property storagePermissions List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`.
 * @property tenantId The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Must match the `tenant_id` used above.
 */
public data class KeyVaultAccessPolicyArgs(
    public val applicationId: Output? = null,
    public val certificatePermissions: Output>? = null,
    public val keyPermissions: Output>? = null,
    public val objectId: Output,
    public val secretPermissions: Output>? = null,
    public val storagePermissions: Output>? = null,
    public val tenantId: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs =
        com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs.builder()
            .applicationId(applicationId?.applyValue({ args0 -> args0 }))
            .certificatePermissions(
                certificatePermissions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .keyPermissions(keyPermissions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .objectId(objectId.applyValue({ args0 -> args0 }))
            .secretPermissions(secretPermissions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .storagePermissions(storagePermissions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tenantId(tenantId.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [KeyVaultAccessPolicyArgs].
 */
@PulumiTagMarker
public class KeyVaultAccessPolicyArgsBuilder internal constructor() {
    private var applicationId: Output? = null

    private var certificatePermissions: Output>? = null

    private var keyPermissions: Output>? = null

    private var objectId: Output? = null

    private var secretPermissions: Output>? = null

    private var storagePermissions: Output>? = null

    private var tenantId: Output? = null

    /**
     * @param value The object ID of an Application in Azure Active Directory.
     */
    @JvmName("dqhctapspdvlqefs")
    public suspend fun applicationId(`value`: Output) {
        this.applicationId = value
    }

    /**
     * @param value List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`.
     */
    @JvmName("wbqsporkarnowkkd")
    public suspend fun certificatePermissions(`value`: Output>) {
        this.certificatePermissions = value
    }

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

    /**
     * @param values List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`.
     */
    @JvmName("jmqbwnefaepfchik")
    public suspend fun certificatePermissions(values: List>) {
        this.certificatePermissions = Output.all(values)
    }

    /**
     * @param value List of key permissions. Possible values are `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     */
    @JvmName("uxapmthlpyokbubk")
    public suspend fun keyPermissions(`value`: Output>) {
        this.keyPermissions = value
    }

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

    /**
     * @param values List of key permissions. Possible values are `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     */
    @JvmName("fbedllkyyttaotwg")
    public suspend fun keyPermissions(values: List>) {
        this.keyPermissions = Output.all(values)
    }

    /**
     * @param value The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
     */
    @JvmName("bswoiqdcyxrlwyou")
    public suspend fun objectId(`value`: Output) {
        this.objectId = value
    }

    /**
     * @param value List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     */
    @JvmName("fwcfptcydexjlogx")
    public suspend fun secretPermissions(`value`: Output>) {
        this.secretPermissions = value
    }

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

    /**
     * @param values List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     */
    @JvmName("cjdyuciybhomimpi")
    public suspend fun secretPermissions(values: List>) {
        this.secretPermissions = Output.all(values)
    }

    /**
     * @param value List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`.
     */
    @JvmName("xwgsejnjjvcmsmdu")
    public suspend fun storagePermissions(`value`: Output>) {
        this.storagePermissions = value
    }

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

    /**
     * @param values List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`.
     */
    @JvmName("ufybrqawquekgckm")
    public suspend fun storagePermissions(values: List>) {
        this.storagePermissions = Output.all(values)
    }

    /**
     * @param value The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Must match the `tenant_id` used above.
     */
    @JvmName("grogvbcmqwpnmkua")
    public suspend fun tenantId(`value`: Output) {
        this.tenantId = value
    }

    /**
     * @param value The object ID of an Application in Azure Active Directory.
     */
    @JvmName("vniuarjolvybjpnh")
    public suspend fun applicationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationId = mapped
    }

    /**
     * @param value List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`.
     */
    @JvmName("tecfxmuvtpayjxds")
    public suspend fun certificatePermissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificatePermissions = mapped
    }

    /**
     * @param values List of certificate permissions, must be one or more from the following: `Backup`, `Create`, `Delete`, `DeleteIssuers`, `Get`, `GetIssuers`, `Import`, `List`, `ListIssuers`, `ManageContacts`, `ManageIssuers`, `Purge`, `Recover`, `Restore`, `SetIssuers` and `Update`.
     */
    @JvmName("faauffnrxtvmngwg")
    public suspend fun certificatePermissions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.certificatePermissions = mapped
    }

    /**
     * @param value List of key permissions. Possible values are `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     */
    @JvmName("ujithtvpsyelovpq")
    public suspend fun keyPermissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyPermissions = mapped
    }

    /**
     * @param values List of key permissions. Possible values are `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     */
    @JvmName("gaxlghfikvwsrocg")
    public suspend fun keyPermissions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keyPermissions = mapped
    }

    /**
     * @param value The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies.
     */
    @JvmName("bunygflbylnbcajw")
    public suspend fun objectId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.objectId = mapped
    }

    /**
     * @param value List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     */
    @JvmName("ugtuquvfbqcjgbbr")
    public suspend fun secretPermissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretPermissions = mapped
    }

    /**
     * @param values List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     */
    @JvmName("vdfsfpcqppjxlbaq")
    public suspend fun secretPermissions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretPermissions = mapped
    }

    /**
     * @param value List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`.
     */
    @JvmName("rnfupgguiaddbatf")
    public suspend fun storagePermissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storagePermissions = mapped
    }

    /**
     * @param values List of storage permissions, must be one or more from the following: `Backup`, `Delete`, `DeleteSAS`, `Get`, `GetSAS`, `List`, `ListSAS`, `Purge`, `Recover`, `RegenerateKey`, `Restore`, `Set`, `SetSAS` and `Update`.
     */
    @JvmName("uwmobaltwchoahnx")
    public suspend fun storagePermissions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storagePermissions = mapped
    }

    /**
     * @param value The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Must match the `tenant_id` used above.
     */
    @JvmName("ttnqubbdrrrsxdqf")
    public suspend fun tenantId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tenantId = mapped
    }

    internal fun build(): KeyVaultAccessPolicyArgs = KeyVaultAccessPolicyArgs(
        applicationId = applicationId,
        certificatePermissions = certificatePermissions,
        keyPermissions = keyPermissions,
        objectId = objectId ?: throw PulumiNullFieldException("objectId"),
        secretPermissions = secretPermissions,
        storagePermissions = storagePermissions,
        tenantId = tenantId ?: throw PulumiNullFieldException("tenantId"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy