共用方式為


account storage-credentials 命令群組

備註

此資訊適用於 Databricks CLI 版本 0.205 及以上。 Databricks CLI 處於 公開預覽狀態

Databricks CLI 的使用受限於 Databricks 授權Databricks 隱私權聲明,包括任何使用數據條款。

account storage-credentials 內的命令群組包含管理特定中繼存放區儲存體認證的命令。 這些指令允許你建立、取得、列出、更新及刪除儲存憑證,這些憑證提供 Unity 目錄的雲端儲存存取權。

Databricks 帳號儲存憑證 建立

建立新的記憶體認證。 請求物件是針對雲端的:AWS 憑證用 AwsIamRole,Azure 憑證用 AzureServicePrincipal,或 GCP 憑證用 GcpServiceAccountKey。 來電者必須是元商店管理員,並擁有 CREATE_STORAGE_CREDENTIAL 元商店的權限。

databricks account storage-credentials create METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity 目錄 metastore ID。

選項

--skip-validation

    跳過儲存憑證驗證(可選,預設為 false)。

--json JSON

    內嵌 JSON 字串或 @path 指向 JSON 檔案的要求本文

全域旗標

範例

以下範例使用 JSON 建立 AWS 儲存憑證:

databricks account storage-credentials create metastore-abc123 --json '{"name": "my-storage-credential", "aws_iam_role": {"role_arn": "arn:aws:iam::123456789012:role/my-role"}}'

以下範例使用 JSON 檔案建立儲存憑證:

databricks account storage-credentials create metastore-abc123 --json @storage-credential.json

以下範例建立一個儲存憑證,並跳過驗證:

databricks account storage-credentials create metastore-abc123 --skip-validation --json @storage-credential.json

Databricks 帳號儲存-憑證刪除

從元資料庫刪除儲存憑證。 呼叫端必須是記憶體認證的擁有者。

databricks account storage-credentials delete METASTORE_ID STORAGE_CREDENTIAL_NAME [flags]

Arguments

METASTORE_ID

    Unity 目錄 metastore ID。

STORAGE_CREDENTIAL_NAME

    記憶體認證的名稱。

選項

--force

    即使儲存憑證不是空的,也要強制刪除。

全域旗標

範例

下列範例會刪除記憶體認證:

databricks account storage-credentials delete metastore-abc123 my-storage-credential

下列範例會強制刪除記憶體認證:

databricks account storage-credentials delete metastore-abc123 my-storage-credential --force

Databricks 帳戶儲存-憑證取得

從中繼資料庫取得儲存憑證。 呼叫者必須是元儲存管理員、儲存憑證的擁有者,或對儲存憑證擁有一定權限。

databricks account storage-credentials get METASTORE_ID STORAGE_CREDENTIAL_NAME [flags]

Arguments

METASTORE_ID

    Unity 目錄 metastore ID。

STORAGE_CREDENTIAL_NAME

    記憶體認證的名稱。

選項

全域旗標

範例

以下範例獲得儲存憑證:

databricks account storage-credentials get metastore-abc123 my-storage-credential

Databricks 帳號儲存憑證列表

取得一份已分配給特定元商店的所有儲存憑證清單。

databricks account storage-credentials list METASTORE_ID [flags]

Arguments

METASTORE_ID

    Unity 目錄 metastore ID。

選項

全域旗標

範例

以下範例列出了元儲存庫的所有儲存憑證:

databricks account storage-credentials list metastore-abc123

Databricks 帳號儲存憑證更新

更新中繼存放區上的記憶體認證。 來電者必須是儲存憑證的擁有者。 如果呼叫者是元商店管理員,只有擁有者憑證可以更改。

databricks account storage-credentials update METASTORE_ID STORAGE_CREDENTIAL_NAME [flags]

Arguments

METASTORE_ID

    Unity 目錄 metastore ID。

STORAGE_CREDENTIAL_NAME

    記憶體認證的名稱。

選項

--skip-validation

    跳過儲存憑證驗證(可選)。

--json JSON

    內嵌 JSON 字串或 @path 指向 JSON 檔案的要求本文

全域旗標

範例

以下範例是使用 JSON 更新儲存憑證:

databricks account storage-credentials update metastore-abc123 my-storage-credential --json '{"aws_iam_role": {"role_arn": "arn:aws:iam::123456789012:role/updated-role"}}'

以下範例使用 JSON 檔案更新儲存憑證:

databricks account storage-credentials update metastore-abc123 my-storage-credential --json @update-storage-credential.json

以下範例更新了省略驗證的儲存憑證:

databricks account storage-credentials update metastore-abc123 my-storage-credential --skip-validation --json @update-storage-credential.json

全域旗標

--debug

  是否要啟用偵錯記錄。

-h--help

    顯示 Databricks CLI、相關命令群組或相關命令的幫助說明。

--log-file 字串

    字串,表示要寫入輸出記錄檔的檔案。 若未指定此旗標,則預設值是將輸出記錄寫入 stderr。

--log-format 格式

    記錄格式類型,textjson。 預設值是 text

--log-level 字串

    表示日誌格式層級的字串。 若未指定,則日誌的格式層級功能將被停用。

-o, --output 類型

    指令輸出類型,textjson。 預設值是 text

-p, --profile 字串

    用於執行命令的~/.databrickscfg檔案中的配置檔名稱。 如果未指定此旗標,則如果存在,則會使用名為 DEFAULT 的配置檔。

--progress-format 格式

    顯示進度記錄的格式:default、、appendinplace、 或json

-t, --target 字串

    如果適用,要使用的套件組合目標