|
| 1 | +--- |
| 2 | +external help file: Microsoft.Azure.Commands.DeviceProvisioningServices.dll-Help.xml |
| 3 | +Module Name: AzureRM.DeviceProvisioningServices |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Add-AzureRmIoTDeviceProvisioningServiceAccessPolicy |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Add a new shared access policy in an Azure IoT Hub device provisioning service. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +### ResourceSet (Default) |
| 16 | +``` |
| 17 | +Add-AzureRmIoTDeviceProvisioningServiceAccessPolicy [-ResourceGroupName] <String> [-Name] <String> |
| 18 | + [-KeyName] <String> [-Permissions] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] |
| 19 | + [<CommonParameters>] |
| 20 | +``` |
| 21 | + |
| 22 | +### InputObjectSet |
| 23 | +``` |
| 24 | +Add-AzureRmIoTDeviceProvisioningServiceAccessPolicy [-InputObject] <PSProvisioningServiceDescription> |
| 25 | + [-KeyName] <String> [-Permissions] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] |
| 26 | + [<CommonParameters>] |
| 27 | +``` |
| 28 | + |
| 29 | +### ResourceIdSet |
| 30 | +``` |
| 31 | +Add-AzureRmIoTDeviceProvisioningServiceAccessPolicy [-ResourceId] <String> [-KeyName] <String> |
| 32 | + [-Permissions] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>] |
| 33 | +``` |
| 34 | + |
| 35 | +## DESCRIPTION |
| 36 | +For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-dps/about-iot-dps. |
| 37 | + |
| 38 | +## EXAMPLES |
| 39 | + |
| 40 | +### Example 1 |
| 41 | +``` |
| 42 | +PS C:\> Add-AzureRmIoTDeviceProvisioningServiceAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -KeyName "mypolicy" -Permissions "ServiceConfig, EnrollmentWrite" |
| 43 | +
|
| 44 | +KeyName : mypolicy |
| 45 | +PrimaryKey : hyZJm8W7rra9O7eKhkLu9m/CIPPt9x1NXVMbMJa1rvg= |
| 46 | +SecondaryKey : vbIwGCBQCIbS5BKFKdddM6uZHLhNTuz9r8CZYgmTmpY= |
| 47 | +Rights : ServiceConfig, EnrollmentWrite |
| 48 | +``` |
| 49 | + |
| 50 | +Add a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentWrite and ServiceConfig rights. |
| 51 | + |
| 52 | +### Example 2 |
| 53 | +``` |
| 54 | +PS C:\> Add-AzureRmIoTDpsAccessPolicy -ResourceGroupName "myresourcegroup" -Name "myiotdps" -KeyName "mypolicy2" -Permissions "EnrollmentRead" |
| 55 | +
|
| 56 | +KeyName Rights |
| 57 | +------- ------ |
| 58 | +mypolicy1 ServiceConfig, EnrollmentWrite |
| 59 | +mypolicy2 EnrollmentRead |
| 60 | +``` |
| 61 | + |
| 62 | +Add a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentRead right. |
| 63 | + |
| 64 | +## PARAMETERS |
| 65 | + |
| 66 | +### -DefaultProfile |
| 67 | +The credentials, account, tenant, and subscription used for communication with Azure. |
| 68 | + |
| 69 | +```yaml |
| 70 | +Type: IAzureContextContainer |
| 71 | +Parameter Sets: (All) |
| 72 | +Aliases: AzureRmContext, AzureCredential |
| 73 | + |
| 74 | +Required: False |
| 75 | +Position: Named |
| 76 | +Default value: None |
| 77 | +Accept pipeline input: False |
| 78 | +Accept wildcard characters: False |
| 79 | +``` |
| 80 | +
|
| 81 | +### -InputObject |
| 82 | +IoT Device Provisioning Service Object |
| 83 | +
|
| 84 | +```yaml |
| 85 | +Type: PSProvisioningServiceDescription |
| 86 | +Parameter Sets: InputObjectSet |
| 87 | +Aliases: |
| 88 | + |
| 89 | +Required: True |
| 90 | +Position: 0 |
| 91 | +Default value: None |
| 92 | +Accept pipeline input: True (ByValue) |
| 93 | +Accept wildcard characters: False |
| 94 | +``` |
| 95 | +
|
| 96 | +### -KeyName |
| 97 | +IoT Device Provisioning Service access policy key name |
| 98 | +
|
| 99 | +```yaml |
| 100 | +Type: String |
| 101 | +Parameter Sets: (All) |
| 102 | +Aliases: |
| 103 | + |
| 104 | +Required: True |
| 105 | +Position: 1 |
| 106 | +Default value: None |
| 107 | +Accept pipeline input: True (ByPropertyName) |
| 108 | +Accept wildcard characters: False |
| 109 | +``` |
| 110 | +
|
| 111 | +### -Name |
| 112 | +Name of the IoT Device Provisioning Service |
| 113 | +
|
| 114 | +```yaml |
| 115 | +Type: String |
| 116 | +Parameter Sets: ResourceSet |
| 117 | +Aliases: |
| 118 | + |
| 119 | +Required: True |
| 120 | +Position: 1 |
| 121 | +Default value: None |
| 122 | +Accept pipeline input: True (ByPropertyName) |
| 123 | +Accept wildcard characters: False |
| 124 | +``` |
| 125 | +
|
| 126 | +### -Permissions |
| 127 | +IoT Device Provisioning Service access policy permissions |
| 128 | +
|
| 129 | +```yaml |
| 130 | +Type: String |
| 131 | +Parameter Sets: (All) |
| 132 | +Aliases: |
| 133 | + |
| 134 | +Required: True |
| 135 | +Position: 2 |
| 136 | +Default value: None |
| 137 | +Accept pipeline input: True (ByPropertyName) |
| 138 | +Accept wildcard characters: False |
| 139 | +``` |
| 140 | +
|
| 141 | +### -ResourceGroupName |
| 142 | +Name of the Resource Group |
| 143 | +
|
| 144 | +```yaml |
| 145 | +Type: String |
| 146 | +Parameter Sets: ResourceSet |
| 147 | +Aliases: |
| 148 | + |
| 149 | +Required: True |
| 150 | +Position: 0 |
| 151 | +Default value: None |
| 152 | +Accept pipeline input: True (ByPropertyName) |
| 153 | +Accept wildcard characters: False |
| 154 | +``` |
| 155 | +
|
| 156 | +### -ResourceId |
| 157 | +IoT Device Provisioning Service Resource Id |
| 158 | +
|
| 159 | +```yaml |
| 160 | +Type: String |
| 161 | +Parameter Sets: ResourceIdSet |
| 162 | +Aliases: |
| 163 | + |
| 164 | +Required: True |
| 165 | +Position: 0 |
| 166 | +Default value: None |
| 167 | +Accept pipeline input: True (ByPropertyName) |
| 168 | +Accept wildcard characters: False |
| 169 | +``` |
| 170 | +
|
| 171 | +### -Confirm |
| 172 | +Prompts you for confirmation before running the cmdlet. |
| 173 | +
|
| 174 | +```yaml |
| 175 | +Type: SwitchParameter |
| 176 | +Parameter Sets: (All) |
| 177 | +Aliases: cf |
| 178 | + |
| 179 | +Required: False |
| 180 | +Position: Named |
| 181 | +Default value: None |
| 182 | +Accept pipeline input: False |
| 183 | +Accept wildcard characters: False |
| 184 | +``` |
| 185 | +
|
| 186 | +### -WhatIf |
| 187 | +Shows what would happen if the cmdlet runs. |
| 188 | +The cmdlet is not run. |
| 189 | +
|
| 190 | +```yaml |
| 191 | +Type: SwitchParameter |
| 192 | +Parameter Sets: (All) |
| 193 | +Aliases: wi |
| 194 | + |
| 195 | +Required: False |
| 196 | +Position: Named |
| 197 | +Default value: None |
| 198 | +Accept pipeline input: False |
| 199 | +Accept wildcard characters: False |
| 200 | +``` |
| 201 | +
|
| 202 | +### CommonParameters |
| 203 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). |
| 204 | +
|
| 205 | +## INPUTS |
| 206 | +
|
| 207 | +### Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSProvisioningServiceDescription |
| 208 | +System.String |
| 209 | +
|
| 210 | +## OUTPUTS |
| 211 | +
|
| 212 | +### Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAuthorizationRuleAccessRightsDescription |
| 213 | +System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Management.DeviceProvisioningServices.Models.PSSharedAccessSignatureAuthorizationRuleAccessRights, Microsoft.Azure.Commands.DeviceProvisioningServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] |
| 214 | + |
| 215 | +## NOTES |
| 216 | + |
| 217 | +## RELATED LINKS |
| 218 | + |
0 commit comments