1. Packages
  2. Databricks Provider
  3. API Docs
  4. WorkspaceNetworkOption
Databricks v1.71.0 published on Monday, Jun 9, 2025 by Pulumi

databricks.WorkspaceNetworkOption

Explore with Pulumi AI

databricks logo
Databricks v1.71.0 published on Monday, Jun 9, 2025 by Pulumi

    Import

    As of terraform v1.5, resources can be imported through configuration.

    hcl

    import {

    id = workspace_id

    to = databricks_workspace_network_option.this

    }

    If you are using an older version of terraform, you can import the resource using cli as follows:

    $ pulumi import databricks:index/workspaceNetworkOption:WorkspaceNetworkOption databricks_workspace_network_option workspace_id
    

    Create WorkspaceNetworkOption Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WorkspaceNetworkOption(name: string, args?: WorkspaceNetworkOptionArgs, opts?: CustomResourceOptions);
    @overload
    def WorkspaceNetworkOption(resource_name: str,
                               args: Optional[WorkspaceNetworkOptionArgs] = None,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkspaceNetworkOption(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               network_policy_id: Optional[str] = None,
                               workspace_id: Optional[str] = None)
    func NewWorkspaceNetworkOption(ctx *Context, name string, args *WorkspaceNetworkOptionArgs, opts ...ResourceOption) (*WorkspaceNetworkOption, error)
    public WorkspaceNetworkOption(string name, WorkspaceNetworkOptionArgs? args = null, CustomResourceOptions? opts = null)
    public WorkspaceNetworkOption(String name, WorkspaceNetworkOptionArgs args)
    public WorkspaceNetworkOption(String name, WorkspaceNetworkOptionArgs args, CustomResourceOptions options)
    
    type: databricks:WorkspaceNetworkOption
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkspaceNetworkOptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkspaceNetworkOptionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkspaceNetworkOptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkspaceNetworkOptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkspaceNetworkOptionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var workspaceNetworkOptionResource = new Databricks.WorkspaceNetworkOption("workspaceNetworkOptionResource", new()
    {
        NetworkPolicyId = "string",
        WorkspaceId = "string",
    });
    
    example, err := databricks.NewWorkspaceNetworkOption(ctx, "workspaceNetworkOptionResource", &databricks.WorkspaceNetworkOptionArgs{
    	NetworkPolicyId: pulumi.String("string"),
    	WorkspaceId:     pulumi.String("string"),
    })
    
    var workspaceNetworkOptionResource = new WorkspaceNetworkOption("workspaceNetworkOptionResource", WorkspaceNetworkOptionArgs.builder()
        .networkPolicyId("string")
        .workspaceId("string")
        .build());
    
    workspace_network_option_resource = databricks.WorkspaceNetworkOption("workspaceNetworkOptionResource",
        network_policy_id="string",
        workspace_id="string")
    
    const workspaceNetworkOptionResource = new databricks.WorkspaceNetworkOption("workspaceNetworkOptionResource", {
        networkPolicyId: "string",
        workspaceId: "string",
    });
    
    type: databricks:WorkspaceNetworkOption
    properties:
        networkPolicyId: string
        workspaceId: string
    

    WorkspaceNetworkOption Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The WorkspaceNetworkOption resource accepts the following input properties:

    NetworkPolicyId 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'
    WorkspaceId string
    The workspace ID
    NetworkPolicyId 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'
    WorkspaceId string
    The workspace ID
    networkPolicyId 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'
    workspaceId String
    The workspace ID
    networkPolicyId 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'
    workspaceId string
    The workspace ID
    network_policy_id str
    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
    networkPolicyId 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'
    workspaceId String
    The workspace ID

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkspaceNetworkOption resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkspaceNetworkOption Resource

    Get an existing WorkspaceNetworkOption resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkspaceNetworkOptionState, opts?: CustomResourceOptions): WorkspaceNetworkOption
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            network_policy_id: Optional[str] = None,
            workspace_id: Optional[str] = None) -> WorkspaceNetworkOption
    func GetWorkspaceNetworkOption(ctx *Context, name string, id IDInput, state *WorkspaceNetworkOptionState, opts ...ResourceOption) (*WorkspaceNetworkOption, error)
    public static WorkspaceNetworkOption Get(string name, Input<string> id, WorkspaceNetworkOptionState? state, CustomResourceOptions? opts = null)
    public static WorkspaceNetworkOption get(String name, Output<String> id, WorkspaceNetworkOptionState state, CustomResourceOptions options)
    resources:  _:    type: databricks:WorkspaceNetworkOption    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    NetworkPolicyId 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'
    WorkspaceId string
    The workspace ID
    NetworkPolicyId 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'
    WorkspaceId string
    The workspace ID
    networkPolicyId 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'
    workspaceId String
    The workspace ID
    networkPolicyId 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'
    workspaceId string
    The workspace ID
    network_policy_id str
    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
    networkPolicyId 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'
    workspaceId String
    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.
    databricks logo
    Databricks v1.71.0 published on Monday, Jun 9, 2025 by Pulumi