networks
Creates, updates, deletes, gets or lists a networks resource.
Overview
| Name | networks |
| Type | Resource |
| Id | databricks_account.provisioning.networks |
Fields
The following fields are returned by SELECT queries:
- networks_get
- networks_list
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_id | string | The Databricks network configuration ID. |
vpc_id | string | The ID of the VPC associated with this network configuration. VPC IDs can be used in multiple networks. |
workspace_id | integer | Workspace ID associated with this network configuration. |
network_name | string | The human-readable name of the network configuration. |
creation_time | integer | Time in epoch milliseconds when the network was created. |
error_messages | array | Array of error messages about the network configuration. |
gcp_network_info | object | |
security_group_ids | array | IDs of one to five security groups associated with this network. Security group IDs **cannot** be used in multiple network configurations. |
subnet_ids | array | IDs of at least two subnets associated with this network. Subnet IDs **cannot** be used in multiple network configurations. |
vpc_endpoints | object | |
vpc_status | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<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_messages | array | Array of warning messages about the network configuration. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_id | string | The Databricks network configuration ID. |
vpc_id | string | The ID of the VPC associated with this network configuration. VPC IDs can be used in multiple networks. |
workspace_id | integer | Workspace ID associated with this network configuration. |
network_name | string | The human-readable name of the network configuration. |
creation_time | integer | Time in epoch milliseconds when the network was created. |
error_messages | array | Array of error messages about the network configuration. |
gcp_network_info | object | |
security_group_ids | array | IDs of one to five security groups associated with this network. Security group IDs **cannot** be used in multiple network configurations. |
subnet_ids | array | IDs of at least two subnets associated with this network. Subnet IDs **cannot** be used in multiple network configurations. |
vpc_endpoints | object | |
vpc_status | string | Create a collection of name/value pairs.<br /><br />Example enumeration:<br /><br />>>> class Color(Enum):<br />... RED = 1<br />... BLUE = 2<br />... GREEN = 3<br /><br />Access them by:<br /><br />- attribute access:<br /><br /> >>> Color.RED<br /> <Color.RED: 1><br /><br />- value lookup:<br /><br /> >>> Color(1)<br /> <Color.RED: 1><br /><br />- name lookup:<br /><br /> >>> Color['RED']<br /> <Color.RED: 1><br /><br />Enumerations can be iterated over, and know how many members they have:<br /><br />>>> len(Color)<br />3<br /><br />>>> list(Color)<br />[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]<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_messages | array | Array of warning messages about the network configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
networks_get | select | account_id, network_id | Gets a Databricks network configuration, which represents a cloud VPC and its resources. | |
networks_list | select | account_id | Lists Databricks network configurations for an account. | |
networks_create | insert | account_id | Creates a Databricks network configuration that represents an VPC and its resources. The VPC will be | |
networks_delete | delete | account_id, network_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_id | string | Databricks Account API network configuration ID. |
SELECT examples
- networks_get
- networks_list
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
;
Lists Databricks network configurations for an account.
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
;
INSERT examples
- networks_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: networks
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the networks resource.
- name: gcp_network_info
value:
network_project_id: "{{ network_project_id }}"
vpc_id: "{{ vpc_id }}"
subnet_id: "{{ subnet_id }}"
subnet_region: "{{ subnet_region }}"
pod_ip_range_name: "{{ pod_ip_range_name }}"
service_ip_range_name: "{{ service_ip_range_name }}"
- name: network_name
value: "{{ network_name }}"
description: |
The human-readable name of the network configuration.
- name: security_group_ids
value:
- "{{ security_group_ids }}"
description: |
IDs of one to five security groups associated with this network. Security group IDs **cannot** be used in multiple network configurations.
- name: subnet_ids
value:
- "{{ subnet_ids }}"
description: |
IDs of at least two subnets associated with this network. Subnet IDs **cannot** be used in multiple network configurations.
- name: vpc_endpoints
value:
dataplane_relay:
- "{{ dataplane_relay }}"
rest_api:
- "{{ rest_api }}"
- name: vpc_id
value: "{{ vpc_id }}"
description: |
The ID of the VPC associated with this network configuration. VPC IDs can be used in multiple networks.
DELETE examples
- networks_delete
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
;