次の方法で共有


az iot ops asset

Note

このリファレンスは、Azure CLI (バージョン 2.53.0 以降) の azure-iot-ops 拡張機能の一部です。 拡張機能は、 az iot ops asset コマンドを初めて実行するときに自動的にインストールされます。 拡張機能の詳細を参照してください

資産管理。

資産管理の詳細については、aka.ms/asset-overview を参照してください。

コマンド

名前 説明 状態
az iot ops asset create

資産を作成します。

拡張子 ジョージア 州
az iot ops asset dataset

資産内のデータセットを管理します。

拡張子 ジョージア 州
az iot ops asset dataset list

資産内のデータセットを一覧表示します。

拡張子 ジョージア 州
az iot ops asset dataset point

資産データセット内のデータ ポイントを管理します。

拡張子 ジョージア 州
az iot ops asset dataset point add

資産データセットにデータ ポイントを追加します。

拡張子 ジョージア 州
az iot ops asset dataset point export

資産データセット内のデータ ポイントをエクスポートします。

拡張子 ジョージア 州
az iot ops asset dataset point import

資産データセットにデータ ポイントをインポートします。

拡張子 ジョージア 州
az iot ops asset dataset point list

資産データセット内のデータ ポイントを一覧表示します。

拡張子 ジョージア 州
az iot ops asset dataset point remove

資産データセット内のデータ ポイントを削除します。

拡張子 ジョージア 州
az iot ops asset dataset show

資産内のデータセットを表示します。

拡張子 ジョージア 州
az iot ops asset delete

資産を削除します。

拡張子 ジョージア 州
az iot ops asset endpoint

資産エンドポイント プロファイルを管理します。

拡張子 ジョージア 州
az iot ops asset endpoint create

資産エンドポイント プロファイルを作成します。

拡張子 ジョージア 州
az iot ops asset endpoint create custom

カスタム コネクタの資産エンドポイント プロファイルを作成します。

拡張子 廃止
az iot ops asset endpoint create onvif

Onvif コネクタの資産エンドポイント プロファイルを作成します。

拡張子 廃止
az iot ops asset endpoint create opcua

OPCUA コネクタの資産エンドポイント プロファイルを作成します。

拡張子 ジョージア 州
az iot ops asset endpoint delete

資産エンドポイント プロファイルを削除します。

拡張子 ジョージア 州
az iot ops asset endpoint query

リソース グラフに対して資産エンドポイント プロファイルのクエリを実行します。

拡張子 ジョージア 州
az iot ops asset endpoint show

資産エンドポイント プロファイルを表示します。

拡張子 ジョージア 州
az iot ops asset endpoint update

資産エンドポイント プロファイルを更新します。

拡張子 ジョージア 州
az iot ops asset event

資産内のイベントを管理します。

拡張子 ジョージア 州
az iot ops asset event add

資産にイベントを追加します。

拡張子 ジョージア 州
az iot ops asset event export

資産内のイベントをエクスポートします。

拡張子 ジョージア 州
az iot ops asset event import

資産にイベントをインポートします。

拡張子 ジョージア 州
az iot ops asset event list

資産内のイベントを一覧表示します。

拡張子 ジョージア 州
az iot ops asset event remove

資産内のイベントを削除します。

拡張子 ジョージア 州
az iot ops asset query

リソース グラフに資産のクエリを実行します。

拡張子 ジョージア 州
az iot ops asset show

資産を表示します。

拡張子 ジョージア 州
az iot ops asset update

資産を更新します。

拡張子 ジョージア 州

az iot ops asset create

資産を作成します。

ファイル形式の例については、aka.ms/aziotops-assets を参照してください。

az iot ops asset create --endpoint-profile
                        --instance
                        --name
                        --resource-group
                        [--attr]
                        [--dataset-publish-int]
                        [--dataset-queue-size]
                        [--dataset-sample-int]
                        [--description]
                        [--disable {false, true}]
                        [--display-name]
                        [--documentation-uri]
                        [--eai]
                        [--ef]
                        [--epi]
                        [--eqs]
                        [--esi]
                        [--event]
                        [--hardware-revision]
                        [--ig]
                        [--instance-subscription]
                        [--location]
                        [--manufacturer]
                        [--manufacturer-uri]
                        [--model]
                        [--pc]
                        [--serial-number]
                        [--software-revision]
                        [--tags]
                        [--topic-path]
                        [--topic-retain {Keep, Never}]

同じリソース グループ内の特定のインスタンスを使用して資産を作成します。

az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance

同じサブスクリプションを持つ別のリソース グループに、指定されたインスタンスを使用して資産を作成します。 インスタンスとは異なるサブスクリプション内にある場合、Digital Operations Experience で資産が表示されない場合があることに注意してください。

az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --instance-resource-group myinstanceresourcegroup

イベントを含むファイルを使用して、無効な資産を作成します。

az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --event-file /path/to/myasset_events.csv --disable

指定された事前入力値を使用して資産を作成します。

az iot ops asset create --name myasset -g myresourcegroup --endpoint-profile myassetendpoint --instance myinstance --event event_notifier=EventNotifier1 name=myEvent1 observability_mode=log sampling_interval=10 queue_size=2 --event event_notifier=EventNotifier2 name=myEvent2 --dataset-publish-int 1250 --dataset-queue-size 2 --dataset-sample-int 30 --event-publish-int 750 --event-queue-size 3 --event-sample-int 50 --description 'Description for a test asset.' --documentation-uri www.contoso.com --external-asset-id 000-000-1234 --hardware-revision 10.0 --product-code XXX100 --software-revision 0.1 --manufacturer Contoso --manufacturer-uri constoso.com --model AssetModel --serial-number 000-000-ABC10 --custom-attribute work_location=factory

必須のパラメーター

--endpoint-profile --ep

資産エンドポイント プロファイル名。

--instance

作成された資産を関連付けるインスタンス名。

--name -n

資産名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

省略可能のパラメーター

--attr --custom-attribute

資産の追加のカスタム属性に対応するスペース区切りのキーと値のペア。 このパラメーターは複数回使用できます。

--dataset-publish-int --dpi

データセットの既定の発行間隔。

規定値: 1000
--dataset-queue-size --dqs

データセットの既定のキュー サイズ。

規定値: 1
--dataset-sample-int --dsi

データセットの既定のサンプリング間隔 (ミリ秒)。

規定値: 500
--description -d

説明。

--disable

資産を無効にします。

指定可能な値: false, true
規定値: False
--display-name --dn

表示名。

--documentation-uri --du

ドキュメント URI。

--eai --external-asset-id

外部資産 ID。

--ef --event-file

イベントを含むファイルのファイル パス。 サポートされているファイルの種類は json、csv、yaml です。

--epi --event-publish-int

イベントの既定の公開間隔。

規定値: 1000
--eqs --event-queue-size

イベントの既定のキュー サイズ。

規定値: 1
--esi --event-sample-int

イベントの既定のサンプリング間隔 (ミリ秒)。

規定値: 500
--event

作成するイベントのプロパティに対応するスペース区切りのキーと値のペア。 サポートされているキー値は、 event_notifier (必須)、 name (必須)、 observability_mode (なしまたはログ)、 sampling_interval (int)、 queue_size (int) です。 --event は 1 回以上使用できます。 パラメーターの完全な使用方法については、ヘルプの例を参照してください。

--hardware-revision --hr

ハードウェアリビジョン。

--ig --instance-resource-group

インスタンス リソース グループ。 指定しない場合は、資産リソース グループが使用されます。

--instance-subscription --is
非推奨

引数 'instance_subscription' は非推奨となり、今後のリリースで削除される予定です。

インスタンス サブスクリプション ID。指定しない場合は、資産サブスクリプション ID が使用されます。

--location -l

Location。 値のソース: az account list-locations az configure --defaults location=<location> を使用して、既定の場所を構成できます。

--manufacturer

製造元。

--manufacturer-uri --mu

製造元の URI。

--model

モデル。

--pc --product-code

製品コード。

--serial-number --sn

シリアル番号。

--software-revision --sr

ソフトウェアのリビジョン。

--tags

資産リソース タグ。 次の形式のキーと値のペアのプロパティ バッグ: a=b c=d。

--topic-path --tp

既定のトピック パス。

--topic-retain --tr

既定のトピックはポリシーを保持します。

指定可能な値: Keep, Never
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az iot ops asset delete

資産を削除します。

az iot ops asset delete --name
                        --resource-group

資産を削除します。

az iot ops asset delete --name myasset -g myresourcegroup

必須のパラメーター

--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

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az iot ops asset query

リソース グラフに資産のクエリを実行します。

az iot ops asset query [--cq]
                       [--description]
                       [--disabled {false, true}]
                       [--display-name]
                       [--documentation-uri]
                       [--eai]
                       [--endpoint-profile]
                       [--hardware-revision]
                       [--ig]
                       [--instance]
                       [--location]
                       [--manufacturer]
                       [--manufacturer-uri]
                       [--model]
                       [--name]
                       [--pc]
                       [--resource-group]
                       [--serial-number]
                       [--software-revision]
                       [--topic-path]
                       [--topic-retain {Keep, Never}]

特定のリソース グループ内で無効になっている資産を照会します。

az iot ops asset query -g myresourcegroup --disabled

特定のモデル、製造元、シリアル番号を持つ資産を照会します。

az iot ops asset query --model model1 --manufacturer contoso --serial-number 000-000-ABC10

省略可能のパラメーター

--cq --custom-query

使用するカスタム クエリ。 その他のすべてのクエリ引数は無視されます。

--description -d

説明。

--disabled

資産の状態。

指定可能な値: false, true
--display-name --dn

表示名。

--documentation-uri --du

ドキュメント URI。

--eai --external-asset-id

外部資産 ID。

--endpoint-profile --ep

資産エンドポイント プロファイル名。

--hardware-revision --hr

ハードウェアリビジョン。

--ig --instance-resource-group

インスタンス リソース グループ。 指定しない場合は、資産リソース グループが使用されます。

--instance

作成された資産を関連付けるインスタンス名。

--location -l

Location。 値のソース: az account list-locations az configure --defaults location=<location> を使用して、既定の場所を構成できます。

--manufacturer

製造元。

--manufacturer-uri --mu

製造元の URI。

--model

モデル。

--name -n

資産名。

--pc --product-code

製品コード。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

--serial-number --sn

シリアル番号。

--software-revision --sr

ソフトウェアのリビジョン。

--topic-path --tp

既定のトピック パス。

--topic-retain --tr

既定のトピックはポリシーを保持します。

指定可能な値: Keep, Never
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az iot ops asset show

資産を表示します。

az iot ops asset show --name
                      --resource-group

資産の詳細を表示します。

az iot ops asset show --name myasset -g myresourcegroup

必須のパラメーター

--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

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。

az iot ops asset update

資産を更新します。

データセットとイベントを更新するには、コマンド グループの az iot ops asset datasetaz iot ops asset event をそれぞれ使用してください。

az iot ops asset update --name
                        --resource-group
                        [--attr]
                        [--dataset-publish-int]
                        [--dataset-queue-size]
                        [--dataset-sample-int]
                        [--description]
                        [--disable {false, true}]
                        [--display-name]
                        [--documentation-uri]
                        [--epi]
                        [--eqs]
                        [--esi]
                        [--hardware-revision]
                        [--manufacturer]
                        [--manufacturer-uri]
                        [--model]
                        [--pc]
                        [--serial-number]
                        [--software-revision]
                        [--tags]
                        [--topic-path]
                        [--topic-retain {Keep, Never}]

資産のデータセットとイベントの既定値を更新します。

az iot ops asset update --name myasset -g myresourcegroup --dataset-publish-int 1250 --dataset-queue-size 2 --dataset-sample-int 30 --event-publish-int 750 --event-queue-size 3 --event-sample-int 50

資産の説明、ドキュメント URI、ハードウェアリビジョン、製品コード、およびソフトウェアリビジョンを更新します。

az iot ops asset update --name myasset -g myresourcegroup --description "Updated test asset description." --documentation-uri www.contoso.com --hardware-revision 11.0 --product-code XXX102 --software-revision 0.2

資産の製造元、製造元の URI、モデル、シリアル番号、およびカスタム属性を更新します。

az iot ops asset update --name myasset -g myresourcegroup --manufacturer Contoso --manufacturer-uri constoso2.com --model NewAssetModel --serial-number 000-000-ABC11 --custom-attribute work_location=new_factory --custom-attribute secondary_work_location=factory

資産を無効にし、"work_site" という名前のカスタム属性を削除します。

az iot ops asset update --name myasset -g myresourcegroup --disable --custom-attribute work_site=""

必須のパラメーター

--name -n

資産名。

--resource-group -g

リソース グループの名前。 az configure --defaults group=<name> を使用して、既定のグループを構成できます。

省略可能のパラメーター

--attr --custom-attribute

資産の追加のカスタム属性に対応するスペース区切りのキーと値のペア。 このパラメーターは複数回使用できます。カスタム属性を削除するには、属性の値を "" に設定してください。

--dataset-publish-int --dpi

データセットの既定の発行間隔。

--dataset-queue-size --dqs

データセットの既定のキュー サイズ。

--dataset-sample-int --dsi

データセットの既定のサンプリング間隔 (ミリ秒)。

--description -d

説明。

--disable

資産を無効にします。

指定可能な値: false, true
--display-name --dn

表示名。

--documentation-uri --du

ドキュメント URI。

--epi --event-publish-int

イベントの既定の公開間隔。

--eqs --event-queue-size

イベントの既定のキュー サイズ。

--esi --event-sample-int

イベントの既定のサンプリング間隔 (ミリ秒)。

--hardware-revision --hr

ハードウェアリビジョン。

--manufacturer

製造元。

--manufacturer-uri --mu

製造元の URI。

--model

モデル。

--pc --product-code

製品コード。

--serial-number --sn

シリアル番号。

--software-revision --sr

ソフトウェアのリビジョン。

--tags

資産リソース タグ。 次の形式のキーと値のペアのプロパティ バッグ: a=b c=d。

--topic-path --tp

既定のトピック パス。

--topic-retain --tr

既定のトピックはポリシーを保持します。

指定可能な値: Keep, Never
グローバル パラメーター
--debug

すべてのデバッグ ログを表示するようにログの詳細レベルを上げます。

--help -h

このヘルプ メッセージを表示して終了します。

--only-show-errors

エラーのみを表示し、警告は抑制します。

--output -o

出力形式。

指定可能な値: json, jsonc, none, table, tsv, yaml, yamlc
規定値: json
--query

JMESPath クエリ文字列。 詳細と例については、http://jmespath.org/ をご覧ください。

--subscription

サブスクリプションの名前または ID。 az account set -s NAME_OR_ID を使用して、既定のサブスクリプションを構成できます。

--verbose

ログの詳細レベルを上げます。 詳細なデバッグ ログを表示するには --debug を使います。