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

@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("ukoiqerntmocbwve")
    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("sdlvkytbwewciewk")
    public suspend fun certificatePermissions(`value`: Output>) {
        this.certificatePermissions = value
    }

    @JvmName("umsnurgbbejqirxt")
    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("kamfkbowgiywvhly")
    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("fwqcimmvodgahayi")
    public suspend fun keyPermissions(`value`: Output>) {
        this.keyPermissions = value
    }

    @JvmName("drdirlgmutieulrl")
    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("rncejtvqdfqaooku")
    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("jpmxguxygwigncii")
    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("skymuauetygthbvl")
    public suspend fun secretPermissions(`value`: Output>) {
        this.secretPermissions = value
    }

    @JvmName("vxysnujkvffgbpbr")
    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("agmjitoyfvgbpnmb")
    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("rnovcrqcfcvvrfmb")
    public suspend fun storagePermissions(`value`: Output>) {
        this.storagePermissions = value
    }

    @JvmName("oactshgiihpgxrhp")
    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("xidfdbhtyutljyyc")
    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("kwsjrdnscclcdmbb")
    public suspend fun tenantId(`value`: Output) {
        this.tenantId = value
    }

    /**
     * @param value The object ID of an Application in Azure Active Directory.
     */
    @JvmName("kwvudvjfkibbtvww")
    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("qqdqbwggrhlrvlmr")
    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("xqpwngdpvaggxaln")
    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("tvqhicuifugspywt")
    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("xdfnatfdlfqafhbv")
    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("hthaedgthagecerl")
    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("rhedjtbtlnpbmtxh")
    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("pspamvytujecmooc")
    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("ptuevkbmxsvcptmf")
    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("jtqtywpvpsuelney")
    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("qgrulvarxabmgbkq")
    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