// *** 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.databricks;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.databricks.WorkspaceArgs;
import com.pulumi.azure.databricks.inputs.WorkspaceState;
import com.pulumi.azure.databricks.outputs.WorkspaceCustomParameters;
import com.pulumi.azure.databricks.outputs.WorkspaceManagedDiskIdentity;
import com.pulumi.azure.databricks.outputs.WorkspaceStorageAccountIdentity;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Import
 * 
 * Databrick Workspaces can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:databricks/workspace:Workspace workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1
 * ```
 * 
 */
@ResourceType(type="azure:databricks/workspace:Workspace")
public class Workspace extends com.pulumi.resources.CustomResource {
    /**
     * A `custom_parameters` block as documented below.
     * 
     */
    @Export(name="customParameters", refs={WorkspaceCustomParameters.class}, tree="[0]")
    private Output<WorkspaceCustomParameters> customParameters;

    /**
     * @return A `custom_parameters` block as documented below.
     * 
     */
    public Output<WorkspaceCustomParameters> customParameters() {
        return this.customParameters;
    }
    /**
     * Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`.
     * 
     */
    @Export(name="customerManagedKeyEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> customerManagedKeyEnabled;

    /**
     * @return Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`.
     * 
     */
    public Output<Optional<Boolean>> customerManagedKeyEnabled() {
        return Codegen.optional(this.customerManagedKeyEnabled);
    }
    /**
     * The ID of Managed Disk Encryption Set created by the Databricks Workspace.
     * 
     */
    @Export(name="diskEncryptionSetId", refs={String.class}, tree="[0]")
    private Output<String> diskEncryptionSetId;

    /**
     * @return The ID of Managed Disk Encryption Set created by the Databricks Workspace.
     * 
     */
    public Output<String> diskEncryptionSetId() {
        return this.diskEncryptionSetId;
    }
    /**
     * Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="infrastructureEncryptionEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> infrastructureEncryptionEnabled;

    /**
     * @return Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<Boolean>> infrastructureEncryptionEnabled() {
        return Codegen.optional(this.infrastructureEncryptionEnabled);
    }
    /**
     * Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="loadBalancerBackendAddressPoolId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> loadBalancerBackendAddressPoolId;

    /**
     * @return Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace. Changing this forces a new resource to be created.
     * 
     */
    public Output<Optional<String>> loadBalancerBackendAddressPoolId() {
        return Codegen.optional(this.loadBalancerBackendAddressPoolId);
    }
    /**
     * Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * Customer managed encryption properties for the Databricks Workspace managed disks.
     * 
     */
    @Export(name="managedDiskCmkKeyVaultKeyId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> managedDiskCmkKeyVaultKeyId;

    /**
     * @return Customer managed encryption properties for the Databricks Workspace managed disks.
     * 
     */
    public Output<Optional<String>> managedDiskCmkKeyVaultKeyId() {
        return Codegen.optional(this.managedDiskCmkKeyVaultKeyId);
    }
    /**
     * Whether customer managed keys for disk encryption will automatically be rotated to the latest version.
     * 
     */
    @Export(name="managedDiskCmkRotationToLatestVersionEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> managedDiskCmkRotationToLatestVersionEnabled;

    /**
     * @return Whether customer managed keys for disk encryption will automatically be rotated to the latest version.
     * 
     */
    public Output<Optional<Boolean>> managedDiskCmkRotationToLatestVersionEnabled() {
        return Codegen.optional(this.managedDiskCmkRotationToLatestVersionEnabled);
    }
    /**
     * A `managed_disk_identity` block as documented below.
     * 
     */
    @Export(name="managedDiskIdentities", refs={List.class,WorkspaceManagedDiskIdentity.class}, tree="[0,1]")
    private Output<List<WorkspaceManagedDiskIdentity>> managedDiskIdentities;

    /**
     * @return A `managed_disk_identity` block as documented below.
     * 
     */
    public Output<List<WorkspaceManagedDiskIdentity>> managedDiskIdentities() {
        return this.managedDiskIdentities;
    }
    /**
     * The ID of the Managed Resource Group created by the Databricks Workspace.
     * 
     */
    @Export(name="managedResourceGroupId", refs={String.class}, tree="[0]")
    private Output<String> managedResourceGroupId;

    /**
     * @return The ID of the Managed Resource Group created by the Databricks Workspace.
     * 
     */
    public Output<String> managedResourceGroupId() {
        return this.managedResourceGroupId;
    }
    /**
     * The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managed_resource_group_name` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manage_resource_group_name` may result in some resources that cannot be deleted.
     * 
     */
    @Export(name="managedResourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> managedResourceGroupName;

    /**
     * @return The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created.
     * 
     * &gt; **NOTE** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managed_resource_group_name` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manage_resource_group_name` may result in some resources that cannot be deleted.
     * 
     */
    public Output<String> managedResourceGroupName() {
        return this.managedResourceGroupName;
    }
    /**
     * Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts).
     * 
     */
    @Export(name="managedServicesCmkKeyVaultKeyId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> managedServicesCmkKeyVaultKeyId;

    /**
     * @return Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts).
     * 
     */
    public Output<Optional<String>> managedServicesCmkKeyVaultKeyId() {
        return Codegen.optional(this.managedServicesCmkKeyVaultKeyId);
    }
    /**
     * Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `public_network_access_enabled` is set to `false`.
     * 
     */
    @Export(name="networkSecurityGroupRulesRequired", refs={String.class}, tree="[0]")
    private Output<String> networkSecurityGroupRulesRequired;

    /**
     * @return Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `public_network_access_enabled` is set to `false`.
     * 
     */
    public Output<String> networkSecurityGroupRulesRequired() {
        return this.networkSecurityGroupRulesRequired;
    }
    /**
     * Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`.
     * 
     */
    @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> publicNetworkAccessEnabled;

    /**
     * @return Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> publicNetworkAccessEnabled() {
        return Codegen.optional(this.publicNetworkAccessEnabled);
    }
    /**
     * The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`.
     * 
     * &gt; **NOTE** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created.
     * 
     */
    @Export(name="sku", refs={String.class}, tree="[0]")
    private Output<String> sku;

    /**
     * @return The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`.
     * 
     * &gt; **NOTE** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created.
     * 
     */
    public Output<String> sku() {
        return this.sku;
    }
    /**
     * A `storage_account_identity` block as documented below.
     * 
     */
    @Export(name="storageAccountIdentities", refs={List.class,WorkspaceStorageAccountIdentity.class}, tree="[0,1]")
    private Output<List<WorkspaceStorageAccountIdentity>> storageAccountIdentities;

    /**
     * @return A `storage_account_identity` block as documented below.
     * 
     */
    public Output<List<WorkspaceStorageAccountIdentity>> storageAccountIdentities() {
        return this.storageAccountIdentities;
    }
    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * The unique identifier of the databricks workspace in Databricks control plane.
     * 
     */
    @Export(name="workspaceId", refs={String.class}, tree="[0]")
    private Output<String> workspaceId;

    /**
     * @return The unique identifier of the databricks workspace in Databricks control plane.
     * 
     */
    public Output<String> workspaceId() {
        return this.workspaceId;
    }
    /**
     * The workspace URL which is of the format &#39;adb-{workspaceId}.{random}.azuredatabricks.net&#39;
     * 
     */
    @Export(name="workspaceUrl", refs={String.class}, tree="[0]")
    private Output<String> workspaceUrl;

    /**
     * @return The workspace URL which is of the format &#39;adb-{workspaceId}.{random}.azuredatabricks.net&#39;
     * 
     */
    public Output<String> workspaceUrl() {
        return this.workspaceUrl;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public Workspace(String name) {
        this(name, WorkspaceArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public Workspace(String name, WorkspaceArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public Workspace(String name, WorkspaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:databricks/workspace:Workspace", name, args == null ? WorkspaceArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private Workspace(String name, Output<String> id, @Nullable WorkspaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:databricks/workspace:Workspace", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static Workspace get(String name, Output<String> id, @Nullable WorkspaceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new Workspace(name, id, state, options);
    }
}
