共用方式為


az cosmosdb sql trigger

管理 Azure Cosmos DB SQL 觸發程式。

命令

名稱 Description 類型 狀態
az cosmosdb sql trigger create

在 Azure Cosmos DB SQL 容器下建立 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger delete

刪除 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger list

列出 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

核心 GA
az cosmosdb sql trigger show

在 Azure Cosmos DB SQL 容器下顯示 SQL 觸發程式的詳細數據。

核心 GA
az cosmosdb sql trigger update

更新 Azure Cosmos DB SQL 觸發程式。

核心 GA

az cosmosdb sql trigger create

在 Azure Cosmos DB SQL 容器下建立 SQL 觸發程式。

az cosmosdb sql trigger create --account-name
                               --body
                               --container-name
                               --database-name
                               --name
                               --resource-group
                               [--operation {All, Create, Delete, Replace, Update}]
                               [--type {Post, Pre}]

範例

建立 Azure Cosmos DB SQL 觸發程式。

az cosmosdb sql trigger create -g MyResourceGroup -a MyAccount -d MyDatabase -c MyContainer -n MyTrigger -b TriggerBody

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--body -b

觸發本文,您可以將它輸入為字串或檔案,例如 --body @triggerbody-file.json。

--container-name -c

容器名稱。

--database-name -d

資料庫名稱。

--name -n

觸發程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

選擇性參數

--operation

觸發程序的作業。

接受的值: All, Create, Delete, Replace, Update
--type -t

觸發程式類型。

接受的值: Post, Pre
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az cosmosdb sql trigger delete

刪除 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

az cosmosdb sql trigger delete --account-name
                               --container-name
                               --database-name
                               --name
                               --resource-group
                               [--yes]

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--container-name -c

容器名稱。

--database-name -d

資料庫名稱。

--name -n

觸發程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

選擇性參數

--yes -y

請勿提示確認。

預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az cosmosdb sql trigger list

列出 Azure Cosmos DB SQL 容器下的 SQL 觸發程式。

az cosmosdb sql trigger list --account-name
                             --container-name
                             --database-name
                             --resource-group

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--container-name -c

容器名稱。

--database-name -d

資料庫名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az cosmosdb sql trigger show

在 Azure Cosmos DB SQL 容器下顯示 SQL 觸發程式的詳細數據。

az cosmosdb sql trigger show --account-name
                             --container-name
                             --database-name
                             --name
                             --resource-group

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--container-name -c

容器名稱。

--database-name -d

資料庫名稱。

--name -n

觸發程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

az cosmosdb sql trigger update

更新 Azure Cosmos DB SQL 觸發程式。

az cosmosdb sql trigger update --account-name
                               --container-name
                               --database-name
                               --name
                               --resource-group
                               [--body]
                               [--operation {All, Create, Delete, Replace, Update}]
                               [--type {Post, Pre}]

必要參數

--account-name -a

Cosmosdb 帳戶名稱。

--container-name -c

容器名稱。

--database-name -d

資料庫名稱。

--name -n

觸發程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

選擇性參數

--body -b

觸發本文,您可以將它輸入為字串或檔案,例如 --body @triggerbody-file.json。

--operation

觸發程序的作業。

接受的值: All, Create, Delete, Replace, Update
--type -t

觸發程式類型。

接受的值: Post, Pre
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。