共用方式為


az iot ops schema version

Note

此參考是 Azure CLI 的 azure-iot-ops 延伸模組的一部分(2.67.0 版或更高版本)。 擴充功能會在您第一次執行 az iot ops 架構版本 命令時自動安裝。 深入了解擴充功能。

架構版本管理。

架構版本包含與該版本相關聯的架構內容。

命令

名稱 Description 類型 狀態
az iot ops schema version add

將架構版本新增至架構。

Extension GA
az iot ops schema version list

列出特定架構的架構版本。

Extension GA
az iot ops schema version remove

拿掉目標架構版本。

Extension GA
az iot ops schema version show

顯示架構版本的詳細數據。

Extension GA

az iot ops schema version add

將架構版本新增至架構。

若要新增版本,相關聯的記憶體帳戶必須啟用公用網路存取。 如需差異檔格式的詳細資訊,請參閱 aka.ms/lakehouse-delta-sample。

az iot ops schema version add --content
                              --name --ver --version
                              --registry
                              --resource-group
                              --schema
                              [--desc]

範例

將架構第 1 版新增至登錄 'myregistry' 內名為 'myschema' 且輸入最少的架構。 內容是內嵌 json (powershell 語法範例)。

az iot ops schema version add --version 1 -g myresourcegroup --registry myregistry --schema myschema --content '{\"hello\": \"world\"}'

將架構第 1 版新增至登錄 'myregistry' 內名為 'myschema' 且輸入最少的架構。 內容是內嵌 json (cmd 語法範例)。

az iot ops schema version add --version 1 -g myresourcegroup --registry myregistry --schema myschema --content "{\"hello\": \"world\"}"

將架構第 1 版新增至登錄 'myregistry' 內名為 'myschema' 且輸入最少的架構。 內容是內嵌 json (bash 語法範例)。

az iot ops schema version add --version 1 -g myresourcegroup --registry myregistry --schema myschema --content '{"hello": "world"}'

將架構第 2 版新增至登錄 'myregistry' 內名為 'myschema' 的架構,並加上描述。 檔案應該包含架構內容。

az iot ops schema version add --version 2 -g myresourcegroup --registry myregistry --schema myschema --content myschemav2.json --desc "New schema"

必要參數

--content

包含或內嵌版本的檔案路徑。

--name --ver --version -n

架構版本名稱。

--registry

架構登錄名稱。

--resource-group -g

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

--schema

架構名稱。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--desc

架構版本的描述。

全域參數
--debug

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

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False

az iot ops schema version list

列出特定架構的架構版本。

az iot ops schema version list --registry
                               --resource-group
                               --schema

範例

列出架構登錄 'myregistry' 中架構 'myschema' 的所有架構版本。

az iot ops schema version list -g myresourcegroup --registry myregistry --schema myschema

必要參數

--registry

架構登錄名稱。

--resource-group -g

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

--schema

架構名稱。

全域參數
--debug

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

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False

az iot ops schema version remove

拿掉目標架構版本。

az iot ops schema version remove --name --ver --version
                                 --registry
                                 --resource-group
                                 --schema

範例

拿掉架構第1版。

az iot ops schema version remove --version 1 -g myresourcegroup --registry myregistry --schema myschema

必要參數

--name --ver --version -n

架構版本名稱。

--registry

架構登錄名稱。

--resource-group -g

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

--schema

架構名稱。

全域參數
--debug

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

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False

az iot ops schema version show

顯示架構版本的詳細數據。

az iot ops schema version show --name --ver --version
                               --registry
                               --resource-group
                               --schema

範例

顯示目標架構第 1 版的詳細數據。

az iot ops schema version show --version 1 --schema myschema --registry myregistry -g myresourcegroup

必要參數

--name --ver --version -n

架構版本名稱。

--registry

架構登錄名稱。

--resource-group -g

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

--schema

架構名稱。

全域參數
--debug

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

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

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

屬性
預設值: False