Delen via


Add-AzIotHubDeployment

Voeg een IoT Edge-implementatie toe aan een ioT-doel-IoT Hub.

Syntaxis

Add-AzIotHubDeployment
   [-ResourceGroupName] <String>
   [-IotHubName] <String>
   -Name <String>
   [-ModulesContent <Hashtable>]
   [-Priority <Int32>]
   [-TargetCondition <String>]
   [-Metric <Hashtable>]
   [-Label <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-AzIotHubDeployment
   [-InputObject] <PSIotHub>
   -Name <String>
   [-ModulesContent <Hashtable>]
   [-Priority <Int32>]
   [-TargetCondition <String>]
   [-Metric <Hashtable>]
   [-Label <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Add-AzIotHubDeployment
   [-ResourceId] <String>
   -Name <String>
   [-ModulesContent <Hashtable>]
   [-Priority <Int32>]
   [-TargetCondition <String>]
   [-Metric <Hashtable>]
   [-Label <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Edge-implementaties kunnen worden gemaakt met door de gebruiker gedefinieerde metrische gegevens voor evaluatie op aanvraag. Zie https://learn.microsoft.com/azure/iot-edge/module-deployment-monitoring voor meer informatie.

Voorbeelden

Voorbeeld 1

Add-AzIotHubDeployment -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "deploy1"

Maak een Edge-implementatie met standaardmetagegevens.

Voorbeeld 2

Add-AzIotHubDeployment -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "deploy1" -Priority 3 -TargetCondition "tags.building=9 and tags.environment='test'"

Maak een Edge-implementatie met een prioriteit van 3 die van toepassing is op voorwaarde wanneer een apparaat wordt gelabeld in gebouw 9 en de omgeving 'test' is.

Voorbeeld 2

$metrics = @{}
$metrics.add("query1", "select deviceId from devices where tags.location='US'")
Add-AzIotHubDeployment -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "deploy1" -Metric $metrics

Een Edge-implementatie maken met metrische gegevens van gebruikers.

Voorbeeld 3

$labels = @{}
$labels.add("key0","value0")
$labels.add("key1","value1")
Add-AzIotHubDeployment -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "deploy1" -Label $labels

Maak een Edge-implementatie met labels.

Voorbeeld 4

$content = Get-Content "C:/Edge/modules.json" | ConvertFrom-Json -AsHashtable
Add-AzIotHubDeployment -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "deploy1" -ModulesContent $content -TargetCondition "from devices.modules where tags.environment='test'"

Maak een Edge-implementatie met inhoud.

Parameters

-Confirm

U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliassen:cf
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-DefaultProfile

De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliassen:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-InputObject

IotHub-object

Type:PSIotHub
Position:0
Default value:None
Vereist:True
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-IotHubName

Naam van de IoT-hub

Type:String
Position:1
Default value:None
Vereist:True
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-Label

Toewijzing van labels die moeten worden toegepast op doelimplementatie.

Type:Hashtable
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-Metric

Queryverzameling voor definitie van metrische gegevens voor IoT Edge-implementatie.

Type:Hashtable
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-ModulesContent

Implementatie-inhoud van modules voor IoT Edge-apparaten.

Type:Hashtable
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-Name

Id voor de implementatie.

Type:String
Position:Named
Default value:None
Vereist:True
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-Priority

Gewicht van de implementatie in het geval van concurrerende regels (hoogste overwinningen).

Type:Int32
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-ResourceGroupName

Naam van de resourcegroep

Type:String
Position:0
Default value:None
Vereist:True
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-ResourceId

IotHub-resource-id

Type:String
Position:0
Default value:None
Vereist:True
Pijplijninvoer accepteren:True
Jokertekens accepteren:False

-TargetCondition

Doelvoorwaarde waarop een Edge-implementatie van toepassing is.

Type:String
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

-WhatIf

Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliassen:wi
Position:Named
Default value:None
Vereist:False
Pijplijninvoer accepteren:False
Jokertekens accepteren:False

Invoerwaarden

PSIotHub

String

Uitvoerwaarden

PSDeployment