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

com.pulumi.azurenative.databricks.Workspace Maven / Gradle / Ivy

There is a newer version: 2.82.0
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.azurenative.databricks;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.databricks.WorkspaceArgs;
import com.pulumi.azurenative.databricks.outputs.CreatedByResponse;
import com.pulumi.azurenative.databricks.outputs.ManagedIdentityConfigurationResponse;
import com.pulumi.azurenative.databricks.outputs.PrivateEndpointConnectionResponse;
import com.pulumi.azurenative.databricks.outputs.SkuResponse;
import com.pulumi.azurenative.databricks.outputs.SystemDataResponse;
import com.pulumi.azurenative.databricks.outputs.WorkspaceCustomParametersResponse;
import com.pulumi.azurenative.databricks.outputs.WorkspacePropertiesResponseEncryption;
import com.pulumi.azurenative.databricks.outputs.WorkspaceProviderAuthorizationResponse;
import com.pulumi.core.Alias;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Information about workspace.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2018-04-01.
 * 
 * Other available API versions: 2023-09-15-preview, 2024-05-01, 2024-09-01-preview.
 * 
 * ## Example Usage
 * ### Create a workspace which is ready for Customer-Managed Key (CMK) encryption
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomParametersArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomBooleanParameterArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .parameters(WorkspaceCustomParametersArgs.builder()
 *                 .prepareEncryption(WorkspaceCustomBooleanParameterArgs.builder()
 *                     .value(true)
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create a workspace with Customer-Managed Key (CMK) encryption for Managed Disks * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspacePropertiesEncryptionArgs;
 * import com.pulumi.azurenative.databricks.inputs.EncryptionEntitiesDefinitionArgs;
 * import com.pulumi.azurenative.databricks.inputs.ManagedDiskEncryptionArgs;
 * import com.pulumi.azurenative.databricks.inputs.ManagedDiskEncryptionKeyVaultPropertiesArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .encryption(WorkspacePropertiesEncryptionArgs.builder()
 *                 .entities(EncryptionEntitiesDefinitionArgs.builder()
 *                     .managedDisk(ManagedDiskEncryptionArgs.builder()
 *                         .keySource("Microsoft.Keyvault")
 *                         .keyVaultProperties(ManagedDiskEncryptionKeyVaultPropertiesArgs.builder()
 *                             .keyName("test-cmk-key")
 *                             .keyVaultUri("https://test-vault-name.vault.azure.net/")
 *                             .keyVersion("00000000000000000000000000000000")
 *                             .build())
 *                         .rotationToLatestKeyVersionEnabled(true)
 *                         .build())
 *                     .build())
 *                 .build())
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update workspace * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update workspace with custom parameters * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomParametersArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomStringParameterArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .parameters(WorkspaceCustomParametersArgs.builder()
 *                 .customPrivateSubnetName(WorkspaceCustomStringParameterArgs.builder()
 *                     .value("myPrivateSubnet")
 *                     .build())
 *                 .customPublicSubnetName(WorkspaceCustomStringParameterArgs.builder()
 *                     .value("myPublicSubnet")
 *                     .build())
 *                 .customVirtualNetworkId(WorkspaceCustomStringParameterArgs.builder()
 *                     .value("/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/myNetwork")
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Enable Customer-Managed Key (CMK) encryption on a workspace which is prepared for encryption * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomParametersArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceEncryptionParameterArgs;
 * import com.pulumi.azurenative.databricks.inputs.EncryptionArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomBooleanParameterArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .parameters(WorkspaceCustomParametersArgs.builder()
 *                 .encryption(WorkspaceEncryptionParameterArgs.builder()
 *                     .value(EncryptionArgs.builder()
 *                         .keyName("myKeyName")
 *                         .keySource("Microsoft.Keyvault")
 *                         .keyVaultUri("https://myKeyVault.vault.azure.net/")
 *                         .keyVersion("00000000000000000000000000000000")
 *                         .build())
 *                     .build())
 *                 .prepareEncryption(WorkspaceCustomBooleanParameterArgs.builder()
 *                     .value(true)
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Revert Customer-Managed Key (CMK) encryption to Microsoft Managed Keys encryption on a workspace * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceCustomParametersArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspaceEncryptionParameterArgs;
 * import com.pulumi.azurenative.databricks.inputs.EncryptionArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .parameters(WorkspaceCustomParametersArgs.builder()
 *                 .encryption(WorkspaceEncryptionParameterArgs.builder()
 *                     .value(EncryptionArgs.builder()
 *                         .keySource("Default")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg")
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Update a workspace with Customer-Managed Key (CMK) encryption for Managed Disks * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databricks.Workspace;
 * import com.pulumi.azurenative.databricks.WorkspaceArgs;
 * import com.pulumi.azurenative.databricks.inputs.WorkspacePropertiesEncryptionArgs;
 * import com.pulumi.azurenative.databricks.inputs.EncryptionEntitiesDefinitionArgs;
 * import com.pulumi.azurenative.databricks.inputs.ManagedDiskEncryptionArgs;
 * import com.pulumi.azurenative.databricks.inputs.ManagedDiskEncryptionKeyVaultPropertiesArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var workspace = new Workspace("workspace", WorkspaceArgs.builder()
 *             .encryption(WorkspacePropertiesEncryptionArgs.builder()
 *                 .entities(EncryptionEntitiesDefinitionArgs.builder()
 *                     .managedDisk(ManagedDiskEncryptionArgs.builder()
 *                         .keySource("Microsoft.Keyvault")
 *                         .keyVaultProperties(ManagedDiskEncryptionKeyVaultPropertiesArgs.builder()
 *                             .keyName("test-cmk-key")
 *                             .keyVaultUri("https://test-vault-name.vault.azure.net/")
 *                             .keyVersion("00000000000000000000000000000000")
 *                             .build())
 *                         .rotationToLatestKeyVersionEnabled(true)
 *                         .build())
 *                     .build())
 *                 .build())
 *             .location("westus")
 *             .managedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
 *             .resourceGroupName("rg")
 *             .tags(Map.of("mytag1", "myvalue1"))
 *             .workspaceName("myWorkspace")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:databricks:Workspace myWorkspace /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName} * ``` * */ @ResourceType(type="azure-native:databricks:Workspace") public class Workspace extends com.pulumi.resources.CustomResource { /** * The workspace provider authorizations. * */ @Export(name="authorizations", refs={List.class,WorkspaceProviderAuthorizationResponse.class}, tree="[0,1]") private Output> authorizations; /** * @return The workspace provider authorizations. * */ public Output>> authorizations() { return Codegen.optional(this.authorizations); } /** * Indicates the Object ID, PUID and Application ID of entity that created the workspace. * */ @Export(name="createdBy", refs={CreatedByResponse.class}, tree="[0]") private Output createdBy; /** * @return Indicates the Object ID, PUID and Application ID of entity that created the workspace. * */ public Output> createdBy() { return Codegen.optional(this.createdBy); } /** * Specifies the date and time when the workspace is created. * */ @Export(name="createdDateTime", refs={String.class}, tree="[0]") private Output createdDateTime; /** * @return Specifies the date and time when the workspace is created. * */ public Output createdDateTime() { return this.createdDateTime; } /** * The resource Id of the managed disk encryption set. * */ @Export(name="diskEncryptionSetId", refs={String.class}, tree="[0]") private Output diskEncryptionSetId; /** * @return The resource Id of the managed disk encryption set. * */ public Output diskEncryptionSetId() { return this.diskEncryptionSetId; } /** * Encryption properties for databricks workspace * */ @Export(name="encryption", refs={WorkspacePropertiesResponseEncryption.class}, tree="[0]") private Output encryption; /** * @return Encryption properties for databricks workspace * */ public Output> encryption() { return Codegen.optional(this.encryption); } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * The details of Managed Identity of Disk Encryption Set used for Managed Disk Encryption * */ @Export(name="managedDiskIdentity", refs={ManagedIdentityConfigurationResponse.class}, tree="[0]") private Output managedDiskIdentity; /** * @return The details of Managed Identity of Disk Encryption Set used for Managed Disk Encryption * */ public Output> managedDiskIdentity() { return Codegen.optional(this.managedDiskIdentity); } /** * The managed resource group Id. * */ @Export(name="managedResourceGroupId", refs={String.class}, tree="[0]") private Output managedResourceGroupId; /** * @return The managed resource group Id. * */ public Output managedResourceGroupId() { return this.managedResourceGroupId; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * The workspace's custom parameters. * */ @Export(name="parameters", refs={WorkspaceCustomParametersResponse.class}, tree="[0]") private Output parameters; /** * @return The workspace's custom parameters. * */ public Output> parameters() { return Codegen.optional(this.parameters); } /** * Private endpoint connections created on the workspace * */ @Export(name="privateEndpointConnections", refs={List.class,PrivateEndpointConnectionResponse.class}, tree="[0,1]") private Output> privateEndpointConnections; /** * @return Private endpoint connections created on the workspace * */ public Output> privateEndpointConnections() { return this.privateEndpointConnections; } /** * The workspace provisioning state. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The workspace provisioning state. * */ public Output provisioningState() { return this.provisioningState; } /** * The network access type for accessing workspace. Set value to disabled to access workspace only via private link. * */ @Export(name="publicNetworkAccess", refs={String.class}, tree="[0]") private Output publicNetworkAccess; /** * @return The network access type for accessing workspace. Set value to disabled to access workspace only via private link. * */ public Output> publicNetworkAccess() { return Codegen.optional(this.publicNetworkAccess); } /** * Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for internal use only. * */ @Export(name="requiredNsgRules", refs={String.class}, tree="[0]") private Output requiredNsgRules; /** * @return Gets or sets a value indicating whether data plane (clusters) to control plane communication happen over private endpoint. Supported values are 'AllRules' and 'NoAzureDatabricksRules'. 'NoAzureServiceRules' value is for internal use only. * */ public Output> requiredNsgRules() { return Codegen.optional(this.requiredNsgRules); } /** * The SKU of the resource. * */ @Export(name="sku", refs={SkuResponse.class}, tree="[0]") private Output sku; /** * @return The SKU of the resource. * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The details of Managed Identity of Storage Account * */ @Export(name="storageAccountIdentity", refs={ManagedIdentityConfigurationResponse.class}, tree="[0]") private Output storageAccountIdentity; /** * @return The details of Managed Identity of Storage Account * */ public Output> storageAccountIdentity() { return Codegen.optional(this.storageAccountIdentity); } /** * The system metadata relating to this resource * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system metadata relating to this resource * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. * */ public Output type() { return this.type; } /** * The blob URI where the UI definition file is located. * */ @Export(name="uiDefinitionUri", refs={String.class}, tree="[0]") private Output uiDefinitionUri; /** * @return The blob URI where the UI definition file is located. * */ public Output> uiDefinitionUri() { return Codegen.optional(this.uiDefinitionUri); } /** * Indicates the Object ID, PUID and Application ID of entity that last updated the workspace. * */ @Export(name="updatedBy", refs={CreatedByResponse.class}, tree="[0]") private Output updatedBy; /** * @return Indicates the Object ID, PUID and Application ID of entity that last updated the workspace. * */ public Output> updatedBy() { return Codegen.optional(this.updatedBy); } /** * The unique identifier of the databricks workspace in databricks control plane. * */ @Export(name="workspaceId", refs={String.class}, tree="[0]") private Output workspaceId; /** * @return The unique identifier of the databricks workspace in databricks control plane. * */ public Output workspaceId() { return this.workspaceId; } /** * The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' * */ @Export(name="workspaceUrl", refs={String.class}, tree="[0]") private Output workspaceUrl; /** * @return The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' * */ public Output workspaceUrl() { return this.workspaceUrl; } /** * * @param name The _unique_ name of the resulting resource. */ public Workspace(java.lang.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(java.lang.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(java.lang.String name, WorkspaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:databricks:Workspace", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Workspace(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:databricks:Workspace", name, null, makeResourceOptions(options, id), false); } private static WorkspaceArgs makeArgs(WorkspaceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkspaceArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:databricks/v20180401:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20210401preview:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20220401preview:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20230201:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20230915preview:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20240501:Workspace").build()), Output.of(Alias.builder().type("azure-native:databricks/v20240901preview:Workspace").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Workspace get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Workspace(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy