แชร์ผ่าน


account log-delivery 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 log-delivery command group within the Databricks CLI contains commands to manage log delivery configurations for your account. The two supported log types for this API are billable usage logs and audit logs. This feature works with all account types. See Configure diagnostic log delivery.

databricks account log-delivery create

Create a new Databricks log delivery configuration to enable delivery of the specified type of logs to your storage location. This requires that you already created a credential object and a storage configuration object.

Important

There is a limit on the number of log delivery configurations available per account. You can create a maximum of two enabled account-level delivery configurations per log type. Additionally, you can create two enabled workspace-level delivery configurations per workspace for each log type. You cannot delete a log delivery configuration, but you can disable it.

databricks account log-delivery create [flags]

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 log delivery configuration using JSON:

databricks account log-delivery create --json '{"log_delivery_configuration": {"config_name": "my-log-delivery", "credentials_id": "cred-abc123", "storage_configuration_id": "storage-xyz789", "log_type": "AUDIT_LOGS", "output_format": "JSON"}}'

The following example creates a log delivery configuration using a JSON file:

databricks account log-delivery create --json @log-delivery-config.json

databricks account log-delivery get

Get a Databricks log delivery configuration object for an account, specified by ID.

databricks account log-delivery get LOG_DELIVERY_CONFIGURATION_ID [flags]

Arguments

LOG_DELIVERY_CONFIGURATION_ID

    The log delivery configuration ID.

Options

Global flags

Examples

The following example gets a log delivery configuration by ID:

databricks account log-delivery get log-delivery-abc123

databricks account log-delivery list

Get all Databricks log delivery configurations associated with an account.

databricks account log-delivery list [flags]

Options

--credentials-id string

    The credentials ID to filter the search results with.

--storage-configuration-id string

    The storage configuration ID to filter the search results with.

--status LogDeliveryConfigStatus

    The log delivery status to filter the search results with. Supported values: DISABLED, ENABLED.

--page-token string

    A page token received from a previous get all log delivery configurations call.

Global flags

Examples

The following example lists all log delivery configurations:

databricks account log-delivery list

The following example lists enabled log delivery configurations:

databricks account log-delivery list --status ENABLED

The following example lists log delivery configurations filtered by credentials:

databricks account log-delivery list --credentials-id cred-abc123

databricks account log-delivery patch-status

Enable or disable a log delivery configuration. Deletion of delivery configurations is not supported, so disable log delivery configurations that are no longer needed.

Note

You cannot re-enable a delivery configuration if this would violate the delivery configuration limits (maximum of two enabled account-level configurations per log type).

databricks account log-delivery patch-status LOG_DELIVERY_CONFIGURATION_ID STATUS [flags]

Arguments

LOG_DELIVERY_CONFIGURATION_ID

    The log delivery configuration ID.

STATUS

    Status of log delivery configuration. Supported values: DISABLED, ENABLED.

Options

--json JSON

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

Global flags

Examples

The following example disables a log delivery configuration:

databricks account log-delivery patch-status log-delivery-abc123 DISABLED

The following example enables a log delivery configuration:

databricks account log-delivery patch-status log-delivery-abc123 ENABLED

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