Test-AzIotHubRoute
IoT Hub でのルートのテスト
構文
Test-AzIotHubRoute
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-InputObject] <PSIotHub>
[-RouteName] <String>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-ShowError]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-InputObject] <PSIotHub>
[-Source] <PSRoutingSource>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-ResourceGroupName] <String>
[-Name] <String>
[-RouteName] <String>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-ShowError]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-ResourceGroupName] <String>
[-Name] <String>
[-Source] <PSRoutingSource>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-ResourceId] <String>
[-RouteName] <String>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-ShowError]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzIotHubRoute
[-ResourceId] <String>
[-Source] <PSRoutingSource>
[-Body <String>]
[-AppProperty <Hashtable>]
[-SystemProperty <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
説明
特定のルートをテストします。
例
例 1
Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -Source DeviceMessages
RouteName DataSource EndpointNames IsEnabled
--------- ---------- ------------- ---------
R1 DeviceMessages events True
R5 DeviceMessages E1 True
ソース "DeviceMessages" を使用して、すべてのルートをテストします。
例 2
Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1
Result : true
特定のルートをテストします。
例 3
Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -ShowError
ErrorMessage Severity LocationStartLine LocationStartColumn LocationEndLine LocationEndColumn
------------ -------- ----------------- ------------------- --------------- -----------------
Syntax error. error 1 29 1 30
特定のルートをテストし、障害の原因を示します。
例 4
$ap = @{}
$ap.add("key0","value0")
$sp = @{}
$sp.add("key1", "value1")
Test-AzIotHubRoute -ResourceGroupName "myresourcegroup" -Name "myiothub" -RouteName R1 -AppProperty $ap -SystemProperty $sp
Result : true
AppProperty と SystemProperty を使用して特定のルートをテストします。
パラメーター
-AppProperty
ルート メッセージのアプリ プロパティ
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Body
ルート メッセージの本文
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
IotHub オブジェクト
Type: | PSIotHub |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
IoT ハブの名前
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
リソース グループの名前
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
IotHub リソース ID
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RouteName
ルートの名前
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ShowError
詳細なエラーを表示する (存在する場合)
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Source
ルートのソース
Type: | PSRoutingSource |
Accepted values: | Invalid, DeviceMessages, TwinChangeEvents, DeviceLifecycleEvents, DeviceJobLifecycleEvents, DigitalTwinChangeEvents |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SystemProperty
ルート メッセージのシステム プロパティ
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
出力
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure PowerShell
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示