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

com.pulumi.azure.keyvault.AccessPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.keyvault;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class AccessPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final AccessPolicyArgs Empty = new AccessPolicyArgs();

    /**
     * The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="applicationId")
    private @Nullable Output applicationId;

    /**
     * @return The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created.
     * 
     */
    public Optional> applicationId() {
        return Optional.ofNullable(this.applicationId);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="certificatePermissions")
    private @Nullable Output> certificatePermissions;

    /**
     * @return 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`.
     * 
     */
    public Optional>> certificatePermissions() {
        return Optional.ofNullable(this.certificatePermissions);
    }

    /**
     * List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     * 
     */
    @Import(name="keyPermissions")
    private @Nullable Output> keyPermissions;

    /**
     * @return List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
     * 
     */
    public Optional>> keyPermissions() {
        return Optional.ofNullable(this.keyPermissions);
    }

    /**
     * Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="keyVaultId", required=true)
    private Output keyVaultId;

    /**
     * @return Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
     * 
     */
    public Output keyVaultId() {
        return this.keyVaultId;
    }

    /**
     * The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="objectId", required=true)
    private Output objectId;

    /**
     * @return The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
     * 
     */
    public Output objectId() {
        return this.objectId;
    }

    /**
     * List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     * 
     */
    @Import(name="secretPermissions")
    private @Nullable Output> secretPermissions;

    /**
     * @return List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
     * 
     */
    public Optional>> secretPermissions() {
        return Optional.ofNullable(this.secretPermissions);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="storagePermissions")
    private @Nullable Output> storagePermissions;

    /**
     * @return 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`.
     * 
     */
    public Optional>> storagePermissions() {
        return Optional.ofNullable(this.storagePermissions);
    }

    /**
     * The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="tenantId", required=true)
    private Output tenantId;

    /**
     * @return The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
     * 
     */
    public Output tenantId() {
        return this.tenantId;
    }

    private AccessPolicyArgs() {}

    private AccessPolicyArgs(AccessPolicyArgs $) {
        this.applicationId = $.applicationId;
        this.certificatePermissions = $.certificatePermissions;
        this.keyPermissions = $.keyPermissions;
        this.keyVaultId = $.keyVaultId;
        this.objectId = $.objectId;
        this.secretPermissions = $.secretPermissions;
        this.storagePermissions = $.storagePermissions;
        this.tenantId = $.tenantId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(AccessPolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private AccessPolicyArgs $;

        public Builder() {
            $ = new AccessPolicyArgs();
        }

        public Builder(AccessPolicyArgs defaults) {
            $ = new AccessPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param applicationId The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder applicationId(@Nullable Output applicationId) {
            $.applicationId = applicationId;
            return this;
        }

        /**
         * @param applicationId The object ID of an Application in Azure Active Directory. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder applicationId(String applicationId) {
            return applicationId(Output.of(applicationId));
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder certificatePermissions(@Nullable Output> certificatePermissions) {
            $.certificatePermissions = certificatePermissions;
            return this;
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder certificatePermissions(List certificatePermissions) {
            return certificatePermissions(Output.of(certificatePermissions));
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder certificatePermissions(String... certificatePermissions) {
            return certificatePermissions(List.of(certificatePermissions));
        }

        /**
         * @param keyPermissions List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
         * 
         * @return builder
         * 
         */
        public Builder keyPermissions(@Nullable Output> keyPermissions) {
            $.keyPermissions = keyPermissions;
            return this;
        }

        /**
         * @param keyPermissions List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
         * 
         * @return builder
         * 
         */
        public Builder keyPermissions(List keyPermissions) {
            return keyPermissions(Output.of(keyPermissions));
        }

        /**
         * @param keyPermissions List of key permissions, must be one or more from the following: `Backup`, `Create`, `Decrypt`, `Delete`, `Encrypt`, `Get`, `Import`, `List`, `Purge`, `Recover`, `Restore`, `Sign`, `UnwrapKey`, `Update`, `Verify`, `WrapKey`, `Release`, `Rotate`, `GetRotationPolicy` and `SetRotationPolicy`.
         * 
         * @return builder
         * 
         */
        public Builder keyPermissions(String... keyPermissions) {
            return keyPermissions(List.of(keyPermissions));
        }

        /**
         * @param keyVaultId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(Output keyVaultId) {
            $.keyVaultId = keyVaultId;
            return this;
        }

        /**
         * @param keyVaultId Specifies the id of the Key Vault resource. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder keyVaultId(String keyVaultId) {
            return keyVaultId(Output.of(keyVaultId));
        }

        /**
         * @param objectId The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder objectId(Output objectId) {
            $.objectId = objectId;
            return this;
        }

        /**
         * @param objectId The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID of a service principal can be fetched from `azuread_service_principal.object_id`. The object ID must be unique for the list of access policies. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder objectId(String objectId) {
            return objectId(Output.of(objectId));
        }

        /**
         * @param secretPermissions List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
         * 
         * @return builder
         * 
         */
        public Builder secretPermissions(@Nullable Output> secretPermissions) {
            $.secretPermissions = secretPermissions;
            return this;
        }

        /**
         * @param secretPermissions List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
         * 
         * @return builder
         * 
         */
        public Builder secretPermissions(List secretPermissions) {
            return secretPermissions(Output.of(secretPermissions));
        }

        /**
         * @param secretPermissions List of secret permissions, must be one or more from the following: `Backup`, `Delete`, `Get`, `List`, `Purge`, `Recover`, `Restore` and `Set`.
         * 
         * @return builder
         * 
         */
        public Builder secretPermissions(String... secretPermissions) {
            return secretPermissions(List.of(secretPermissions));
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder storagePermissions(@Nullable Output> storagePermissions) {
            $.storagePermissions = storagePermissions;
            return this;
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder storagePermissions(List storagePermissions) {
            return storagePermissions(Output.of(storagePermissions));
        }

        /**
         * @param 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`.
         * 
         * @return builder
         * 
         */
        public Builder storagePermissions(String... storagePermissions) {
            return storagePermissions(List.of(storagePermissions));
        }

        /**
         * @param tenantId The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder tenantId(Output tenantId) {
            $.tenantId = tenantId;
            return this;
        }

        /**
         * @param tenantId The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder tenantId(String tenantId) {
            return tenantId(Output.of(tenantId));
        }

        public AccessPolicyArgs build() {
            if ($.keyVaultId == null) {
                throw new MissingRequiredPropertyException("AccessPolicyArgs", "keyVaultId");
            }
            if ($.objectId == null) {
                throw new MissingRequiredPropertyException("AccessPolicyArgs", "objectId");
            }
            if ($.tenantId == null) {
                throw new MissingRequiredPropertyException("AccessPolicyArgs", "tenantId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy