Skip to main content

networks

Creates, updates, deletes, gets or lists a networks resource.

Overview

Namenetworks
TypeResource
Iddatabricks_account.provisioning.networks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
network_idstringThe Databricks network configuration ID.
vpc_idstringThe ID of the VPC associated with this network configuration. VPC IDs can be used in multiple networks.
workspace_idintegerWorkspace ID associated with this network configuration.
network_namestringThe human-readable name of the network configuration.
creation_timeintegerTime in epoch milliseconds when the network was created.
error_messagesarrayArray of error messages about the network configuration.
gcp_network_infoobject
security_group_idsarrayIDs of one to five security groups associated with this network. Security group IDs **cannot** be used in multiple network configurations.
subnet_idsarrayIDs of at least two subnets associated with this network. Subnet IDs **cannot** be used in multiple network configurations.
vpc_endpointsobject
vpc_statusstringCreate a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />&gt;&gt;&gt; class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> &gt;&gt;&gt; Color.RED<br /> &lt;Color.RED: 1&gt;<br /><br />- value lookup:<br /><br /> &gt;&gt;&gt; Color(1)<br /> &lt;Color.RED: 1&gt;<br /><br />- name lookup:<br /><br /> &gt;&gt;&gt; Color['RED']<br /> &lt;Color.RED: 1&gt;<br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />&gt;&gt;&gt; len(Color)<br />3<br /><br />&gt;&gt;&gt; list(Color)<br />[&lt;Color.RED: 1&gt;, &lt;Color.BLUE: 2&gt;, &lt;Color.GREEN: 3&gt;]<br /><br />Methods can be added to enumerations, and members can have their own<br />attributes -- see the documentation for details. (BROKEN, UNATTACHED, VALID, WARNED)
warning_messagesarrayArray of warning messages about the network configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
networks_getselectaccount_id, network_idGets a Databricks network configuration, which represents a cloud VPC and its resources.
networks_listselectaccount_idLists Databricks network configurations for an account.
networks_createinsertaccount_idCreates a Databricks network configuration that represents an VPC and its resources. The VPC will be
networks_deletedeleteaccount_id, network_idDeletes a Databricks network configuration, which represents a cloud VPC and its resources. You cannot

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstring
network_idstringDatabricks Account API network configuration ID.

SELECT examples

Gets a Databricks network configuration, which represents a cloud VPC and its resources.

SELECT
account_id,
network_id,
vpc_id,
workspace_id,
network_name,
creation_time,
error_messages,
gcp_network_info,
security_group_ids,
subnet_ids,
vpc_endpoints,
vpc_status,
warning_messages
FROM databricks_account.provisioning.networks
WHERE account_id = '{{ account_id }}' -- required
AND network_id = '{{ network_id }}' -- required
;

INSERT examples

Creates a Databricks network configuration that represents an VPC and its resources. The VPC will be

INSERT INTO databricks_account.provisioning.networks (
gcp_network_info,
network_name,
security_group_ids,
subnet_ids,
vpc_endpoints,
vpc_id,
account_id
)
SELECT
'{{ gcp_network_info }}',
'{{ network_name }}',
'{{ security_group_ids }}',
'{{ subnet_ids }}',
'{{ vpc_endpoints }}',
'{{ vpc_id }}',
'{{ account_id }}'
RETURNING
account_id,
network_id,
vpc_id,
workspace_id,
network_name,
creation_time,
error_messages,
gcp_network_info,
security_group_ids,
subnet_ids,
vpc_endpoints,
vpc_status,
warning_messages
;

DELETE examples

Deletes a Databricks network configuration, which represents a cloud VPC and its resources. You cannot

DELETE FROM databricks_account.provisioning.networks
WHERE account_id = '{{ account_id }}' --required
AND network_id = '{{ network_id }}' --required
;