Skip to main content

Workspace Network Option

View as Markdown

WorkspaceNetworkOption object

network_policy_idstring

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'.

Example: my-network-policy

workspace_idint64

The workspace ID.

Example: 1234567890

Get

GET /api/2.0/accounts/{account_id}/workspaces/{workspace_id}/network

Gets the network option for a workspace. Every workspace has exactly one network policy binding, with 'default-policy' used if no explicit assignment exists.

API scopes: networking

Parameters

account_idstringpath

Your <Databricks> account ID. You can find your account ID in your <Databricks> accounts console.

Example: 123e4567-e89b-12d3-a456-426614174000

workspace_idint64path

The workspace ID.

Example: 1234567890

Response

Returns the WorkspaceNetworkOption object.

Update

PUT /api/2.0/accounts/{account_id}/workspaces/{workspace_id}/network

Updates the network option for a workspace. This operation associates the workspace with the specified network policy. To revert to the default policy, specify 'default-policy' as the network_policy_id.

API scopes: networking

Parameters

account_idstringpath

Your <Databricks> account ID. You can find your account ID in your <Databricks> accounts console.

Example: 123e4567-e89b-12d3-a456-426614174000

workspace_idint64path

The workspace ID.

Example: 1234567890

Request body

workspace_network_optionobject

The network option details for the workspace.

Show child attributesHide child attributes
network_policy_idstring

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'.

Example: my-network-policy

workspace_idint64

The workspace ID.

Example: 1234567890

Response

Returns the WorkspaceNetworkOption object.