Skip to main content

vw_vpc_endpoints

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

Overview

Namevw_vpc_endpoints
TypeView
Iddatabricks_account.provisioning.vw_vpc_endpoints

Fields

The following fields are returned by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.
vpc_endpoint_idstringUnique Databricks identifier for the VPC endpoint configuration.
vpc_endpoint_namestringHuman-readable name of the VPC endpoint configuration.
regionstringCloud region where the VPC endpoint is deployed.
statestringCurrent state of the VPC endpoint (e.g. available, pending, rejected).
use_casestringTraffic type this endpoint handles (e.g. dataplane-relay, workspace-access).
aws_account_idstringAWS account ID that owns the VPC endpoint (AWS only).
aws_endpoint_service_idstringID of the AWS endpoint service this VPC endpoint connects to (AWS only).
aws_vpc_endpoint_idstringAWS VPC endpoint ID (AWS only).
gcp_project_idstringGCP project ID containing the PSC endpoint (GCP only).
gcp_psc_endpoint_namestringName of the GCP Private Service Connect endpoint (GCP only).
gcp_endpoint_regionstringGCP region where the PSC endpoint is deployed (GCP only).
gcp_psc_connection_idstringConnection ID of the GCP PSC endpoint (GCP only).
gcp_service_attachment_idstringID of the GCP service attachment the PSC endpoint connects to (GCP only).
cloud_typestringDerived cloud provider for this VPC endpoint - one of AWS, GCP, or UNKNOWN.

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.

SELECT Examples

SELECT
account_id,
vpc_endpoint_id,
vpc_endpoint_name,
region,
state,
use_case,
aws_account_id,
aws_endpoint_service_id,
aws_vpc_endpoint_id,
gcp_project_id,
gcp_psc_endpoint_name,
gcp_endpoint_region,
gcp_psc_connection_id,
gcp_service_attachment_id,
cloud_type
FROM databricks_account.provisioning.vw_vpc_endpoints
WHERE account_id = '{{ account_id }}';

SQL Definition

SELECT
v.account_id,
v.vpc_endpoint_id,
v.vpc_endpoint_name,
v.region,
v.state,
v.use_case,
v.aws_account_id,
v.aws_endpoint_service_id,
v.aws_vpc_endpoint_id,
JSON_EXTRACT(v.gcp_vpc_endpoint_info, '$.project_id') AS gcp_project_id,
JSON_EXTRACT(v.gcp_vpc_endpoint_info, '$.psc_endpoint_name') AS gcp_psc_endpoint_name,
JSON_EXTRACT(v.gcp_vpc_endpoint_info, '$.endpoint_region') AS gcp_endpoint_region,
JSON_EXTRACT(v.gcp_vpc_endpoint_info, '$.psc_connection_id') AS gcp_psc_connection_id,
JSON_EXTRACT(v.gcp_vpc_endpoint_info, '$.service_attachment_id') AS gcp_service_attachment_id,
CASE
WHEN v.aws_vpc_endpoint_id IS NOT NULL THEN 'AWS'
WHEN v.gcp_vpc_endpoint_info IS NOT NULL THEN 'GCP'
ELSE 'UNKNOWN'
END AS cloud_type
FROM databricks_account.provisioning.vpc_endpoints v
WHERE account_id = '{{ account_id }}'