แชร์ผ่าน


account network-connectivity command group

Note

This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

The account network-connectivity command group within the Databricks CLI contains commands to configure network connectivity for your workspaces for serverless compute resources.

databricks account network-connectivity create-network-connectivity-configuration

Create a network connectivity configuration (NCC), which provides stable Azure service subnets when accessing your Azure Storage accounts. You can also use a network connectivity configuration to create Databricks managed private endpoints so that Databricks serverless compute resources privately access your resources.

Important

After you create the network connectivity configuration, you must assign one or more workspaces to the new network connectivity configuration. You can share one network connectivity configuration with multiple workspaces from the same Azure region within the same Databricks account.

databricks account network-connectivity create-network-connectivity-configuration NAME REGION [flags]

Arguments

NAME

    The name of the network connectivity configuration. The name can contain alphanumeric characters, hyphens, and underscores. The length must be between 3 and 30 characters.

REGION

    The region for the network connectivity configuration. Only workspaces in the same region can be attached to the network connectivity configuration.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example creates a network connectivity configuration:

databricks account network-connectivity create-network-connectivity-configuration my-ncc eastus

The following example creates a network connectivity configuration using JSON:

databricks account network-connectivity create-network-connectivity-configuration my-ncc eastus --json '{"egress_config": {"default_rules": {"aws_stable_ip_rule": {"cidr_blocks": ["1.2.3.0/24"]}}}}'

The following example creates a network connectivity configuration using a JSON file:

databricks account network-connectivity create-network-connectivity-configuration my-ncc eastus --json @ncc.json

databricks account network-connectivity create-private-endpoint-rule

Create a private endpoint rule for the specified network connectivity configuration. Once the object is created, Databricks asynchronously provisions a new Azure private endpoint to your specified Azure resource.

Important

You must use Azure portal or other Azure tools to approve the private endpoint to complete the connection. To get the information of the private endpoint created, make a GET request on the new private endpoint rule.

databricks account network-connectivity create-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

Options

--endpoint-service string

    The full target AWS endpoint service name that connects to the destination resources of the private endpoint.

--error-message string

    Error message if any.

--group-id string

    Not used by customer-managed private endpoint services.

--resource-id string

    The Azure resource ID of the target resource.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example creates a private endpoint rule:

databricks account network-connectivity create-private-endpoint-rule ncc-abc123 --resource-id "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Storage/storageAccounts/xxx"

The following example creates a private endpoint rule using JSON:

databricks account network-connectivity create-private-endpoint-rule ncc-abc123 --json '{"resource_id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Storage/storageAccounts/xxx", "group_id": "blob"}'

The following example creates a private endpoint rule using a JSON file:

databricks account network-connectivity create-private-endpoint-rule ncc-abc123 --json @private-endpoint-rule.json

databricks account network-connectivity delete-network-connectivity-configuration

Delete a network connectivity configuration.

databricks account network-connectivity delete-network-connectivity-configuration NETWORK_CONNECTIVITY_CONFIG_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

Options

Global flags

Examples

The following example deletes a network connectivity configuration:

databricks account network-connectivity delete-network-connectivity-configuration ncc-abc123

databricks account network-connectivity delete-private-endpoint-rule

Initiate deletion of a private endpoint rule. If the connection state is PENDING or EXPIRED, the private endpoint is immediately deleted. Otherwise, the private endpoint is deactivated and will be deleted after seven days of deactivation. When a private endpoint is deactivated, the deactivated field is set to true and the private endpoint is not available to your serverless compute resources.

databricks account network-connectivity delete-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID PRIVATE_ENDPOINT_RULE_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

PRIVATE_ENDPOINT_RULE_ID

    Your private endpoint rule ID.

Options

Global flags

Examples

The following example deletes a private endpoint rule:

databricks account network-connectivity delete-private-endpoint-rule ncc-abc123 per-xyz789

databricks account network-connectivity get-network-connectivity-configuration

Get a network connectivity configuration.

databricks account network-connectivity get-network-connectivity-configuration NETWORK_CONNECTIVITY_CONFIG_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

Options

Global flags

Examples

The following example gets a network connectivity configuration:

databricks account network-connectivity get-network-connectivity-configuration ncc-abc123

databricks account network-connectivity get-private-endpoint-rule

Get the private endpoint rule.

databricks account network-connectivity get-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID PRIVATE_ENDPOINT_RULE_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

PRIVATE_ENDPOINT_RULE_ID

    Your private endpoint rule ID.

Options

Global flags

Examples

The following example gets a private endpoint rule:

databricks account network-connectivity get-private-endpoint-rule ncc-abc123 per-xyz789

databricks account network-connectivity list-network-connectivity-configurations

Get an array of network connectivity configurations.

databricks account network-connectivity list-network-connectivity-configurations [flags]

Options

--page-token string

    Pagination token to go to next page based on previous query.

Global flags

Examples

The following example lists all network connectivity configurations:

databricks account network-connectivity list-network-connectivity-configurations

The following example lists network connectivity configurations with pagination:

databricks account network-connectivity list-network-connectivity-configurations --page-token "next_page_token"

databricks account network-connectivity list-private-endpoint-rules

Get an array of private endpoint rules.

databricks account network-connectivity list-private-endpoint-rules NETWORK_CONNECTIVITY_CONFIG_ID [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    Your network connectivity configuration ID.

Options

--page-token string

    Pagination token to go to next page based on previous query.

Global flags

Examples

The following example lists all private endpoint rules:

databricks account network-connectivity list-private-endpoint-rules ncc-abc123

The following example lists private endpoint rules with pagination:

databricks account network-connectivity list-private-endpoint-rules ncc-abc123 --page-token "next_page_token"

databricks account network-connectivity update-private-endpoint-rule

Update a private endpoint rule. Currently only a private endpoint rule to customer-managed resources is allowed to be updated.

databricks account network-connectivity update-private-endpoint-rule NETWORK_CONNECTIVITY_CONFIG_ID PRIVATE_ENDPOINT_RULE_ID UPDATE_MASK [flags]

Arguments

NETWORK_CONNECTIVITY_CONFIG_ID

    The ID of a network connectivity configuration, which is the parent resource of this private endpoint rule object.

PRIVATE_ENDPOINT_RULE_ID

    Your private endpoint rule ID.

UPDATE_MASK

    The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.

Options

--enabled

    Only used by private endpoints towards an AWS S3 service.

--error-message string

    Error message if any.

--json JSON

    The inline JSON string or the @path to the JSON file with the request body

Global flags

Examples

The following example updates a private endpoint rule:

databricks account network-connectivity update-private-endpoint-rule ncc-abc123 per-xyz789 "enabled" --enabled

The following example updates a private endpoint rule using JSON:

databricks account network-connectivity update-private-endpoint-rule ncc-abc123 per-xyz789 "enabled" --json '{"enabled": true}'

The following example updates a private endpoint rule using a JSON file:

databricks account network-connectivity update-private-endpoint-rule ncc-abc123 per-xyz789 "enabled" --json @update-private-endpoint-rule.json

Global flags

--debug

  Whether to enable debug logging.

-h or --help

    Display help for the Databricks CLI or the related command group or the related command.

--log-file string

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

--log-format format

    The log format type, text or json. The default value is text.

--log-level string

    A string representing the log format level. If not specified then the log format level is disabled.

-o, --output type

    The command output type, text or json. The default value is text.

-p, --profile string

    The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.

--progress-format format

    The format to display progress logs: default, append, inplace, or json

-t, --target string

    If applicable, the bundle target to use