共用方式為


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 來取得完整偵錯記錄。