Databricks v1.74.0 published on Thursday, Aug 14, 2025 by Pulumi
databricks.getWorkspaceNetworkOption
Explore with Pulumi AI
This data source can be used to get a single workspace network option.
Note This data source can only be used with an account-level provider!
Example Usage
Referring to a network policy by id:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = databricks.getWorkspaceNetworkOption({
workspaceId: "9999999999999999",
});
import pulumi
import pulumi_databricks as databricks
this = databricks.get_workspace_network_option(workspace_id="9999999999999999")
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databricks.LookupWorkspaceNetworkOption(ctx, &databricks.LookupWorkspaceNetworkOptionArgs{
WorkspaceId: pulumi.StringRef("9999999999999999"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = Databricks.GetWorkspaceNetworkOption.Invoke(new()
{
WorkspaceId = "9999999999999999",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetWorkspaceNetworkOptionArgs;
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) {
final var this = DatabricksFunctions.getWorkspaceNetworkOption(GetWorkspaceNetworkOptionArgs.builder()
.workspaceId("9999999999999999")
.build());
}
}
variables:
this:
fn::invoke:
function: databricks:getWorkspaceNetworkOption
arguments:
workspaceId: '9999999999999999'
Using getWorkspaceNetworkOption
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getWorkspaceNetworkOption(args: GetWorkspaceNetworkOptionArgs, opts?: InvokeOptions): Promise<GetWorkspaceNetworkOptionResult>
function getWorkspaceNetworkOptionOutput(args: GetWorkspaceNetworkOptionOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceNetworkOptionResult>
def get_workspace_network_option(network_policy_id: Optional[str] = None,
workspace_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWorkspaceNetworkOptionResult
def get_workspace_network_option_output(network_policy_id: Optional[pulumi.Input[str]] = None,
workspace_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceNetworkOptionResult]
func LookupWorkspaceNetworkOption(ctx *Context, args *LookupWorkspaceNetworkOptionArgs, opts ...InvokeOption) (*LookupWorkspaceNetworkOptionResult, error)
func LookupWorkspaceNetworkOptionOutput(ctx *Context, args *LookupWorkspaceNetworkOptionOutputArgs, opts ...InvokeOption) LookupWorkspaceNetworkOptionResultOutput
> Note: This function is named LookupWorkspaceNetworkOption
in the Go SDK.
public static class GetWorkspaceNetworkOption
{
public static Task<GetWorkspaceNetworkOptionResult> InvokeAsync(GetWorkspaceNetworkOptionArgs args, InvokeOptions? opts = null)
public static Output<GetWorkspaceNetworkOptionResult> Invoke(GetWorkspaceNetworkOptionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetWorkspaceNetworkOptionResult> getWorkspaceNetworkOption(GetWorkspaceNetworkOptionArgs args, InvokeOptions options)
public static Output<GetWorkspaceNetworkOptionResult> getWorkspaceNetworkOption(GetWorkspaceNetworkOptionArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getWorkspaceNetworkOption:getWorkspaceNetworkOption
arguments:
# arguments dictionary
The following arguments are supported:
- Network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- Workspace
Id string - The workspace ID
- Network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- Workspace
Id string - The workspace ID
- network
Policy StringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id String - The workspace ID
- network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id string - The workspace ID
- network_
policy_ strid - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace_
id str - The workspace ID
- network
Policy StringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id String - The workspace ID
getWorkspaceNetworkOption Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- Workspace
Id string - (integer) - The workspace ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- Workspace
Id string - (integer) - The workspace ID
- id String
- The provider-assigned unique ID for this managed resource.
- network
Policy StringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id String - (integer) - The workspace ID
- id string
- The provider-assigned unique ID for this managed resource.
- network
Policy stringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id string - (integer) - The workspace ID
- id str
- The provider-assigned unique ID for this managed resource.
- network_
policy_ strid - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace_
id str - (integer) - The workspace ID
- id String
- The provider-assigned unique ID for this managed resource.
- network
Policy StringId - (string) - The network policy ID to apply to the workspace. This controls the network access rules for all serverless compute resources in the workspace. Each workspace can only be linked to one policy at a time. If no policy is explicitly assigned, the workspace will use 'default-policy'
- workspace
Id String - (integer) - The workspace ID
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.