New-AzIotHubSasToken
Hedef IoT Hub, cihaz veya modül için SAS belirteci oluşturma.
Syntax
New-AzIotHubSasToken
[-ResourceGroupName] <String>
[-IotHubName] <String>
[-DeviceId <String>]
[-ModuleId <String>]
[-KeyName <String>]
[-KeyType <PSKeyType>]
[-Duration <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzIotHubSasToken
[-InputObject] <PSIotHub>
[-DeviceId <String>]
[-ModuleId <String>]
[-KeyName <String>]
[-KeyType <PSKeyType>]
[-Duration <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzIotHubSasToken
[-ResourceId] <String>
[-DeviceId <String>]
[-ModuleId <String>]
[-KeyName <String>]
[-KeyType <PSKeyType>]
[-Duration <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Cihaz SAS belirteçleri için ilke parametresi yalnızca cihaz kayıt defterine erişmek için kullanılır. Bu nedenle, ilkenin kayıt defterine okuma erişimi olmalıdır. IoT Hub belirteçleri için ilke SAS'nin bir parçasıdır.
Örnekler
Örnek 1
New-AzIotHubSasToken -ResourceGroupName "myresourcegroup" -IotHubName "myiothub"
iothubowner ilkesini ve birincil anahtarı kullanarak bir IoT Hub SAS belirteci oluşturun.
Örnek 2
New-AzIotHubSasToken -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -KeyName "registryRead" -KeyType "secondary"
registryRead ilkesini ve ikincil anahtarı kullanarak bir IoT Hub SAS belirteci oluşturun.
Örnek 3
New-AzIotHubSasToken -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1"
{iothub_name} cihaz kayıt defterine erişmek için iothubowner ilkesini kullanarak bir cihaz SAS belirteci oluşturun.
Örnek 4
New-AzIotHubSasToken -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -DeviceId "myDevice1" -ModuleId "myModule1"
{iothub_name} cihaz kayıt defterine erişmek için iothubowner ilkesini kullanarak bir modül SAS belirteci oluşturun.
Parametreler
-Confirm
Cmdlet'i çalıştırmadan önce sizden onay ister.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DeviceId
Hedef Cihaz Kimliği.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Duration
Oluşturulacak belirtecin gelecekteki süre sonu (saniye olarak). Varsayılan değer 3600'dür.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
IotHub nesnesi
Type: | PSIotHub |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IotHubName
IoT Hub'ının adı
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyName
Erişim anahtarı adı.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-KeyType
Erişim anahtarı türü.
Type: | PSKeyType |
Accepted values: | primary, secondary |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ModuleId
Hedef Modül Kimliği.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Kaynak Grubunun Adı
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
IotHub Kaynak Kimliği
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Cmdlet çalıştırılıyorsa ne olacağını gösterir. Cmdlet çalıştırılmaz.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Girişler
Çıkışlar
Azure PowerShell
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin