@@ -36,10 +36,12 @@ IOTHUB <IIotHubSettings[]>: List of IoT Hubs associated with the account.
36
36
https://learn.microsoft.com/powershell/module/az.deviceupdate/new-azdeviceupdateinstance
37
37
#>
38
38
function New-AzDeviceUpdateInstance {
39
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Models.Api20221001. IInstance ])]
39
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Models.IInstance ])]
40
40
[CmdletBinding (DefaultParameterSetName = ' CreateExpanded' , PositionalBinding = $false , SupportsShouldProcess , ConfirmImpact = ' Medium' )]
41
41
param (
42
- [Parameter (Mandatory )]
42
+ [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
43
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
44
+ [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
43
45
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Path' )]
44
46
[System.String ]
45
47
# Account name.
@@ -52,64 +54,93 @@ param(
52
54
# Instance name.
53
55
${Name} ,
54
56
55
- [Parameter (Mandatory )]
57
+ [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
58
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
59
+ [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
56
60
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Path' )]
57
61
[System.String ]
58
62
# The resource group name.
59
63
${ResourceGroupName} ,
60
64
61
- [Parameter ()]
65
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
66
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' )]
67
+ [Parameter (ParameterSetName = ' CreateViaJsonString' )]
62
68
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Path' )]
63
69
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Runtime.DefaultInfo (Script= ' (Get-AzContext).Subscription.Id' )]
64
70
[System.String ]
65
71
# The Azure subscription ID.
66
72
${SubscriptionId} ,
67
73
68
- [Parameter (Mandatory )]
74
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' , Mandatory , ValueFromPipeline )]
75
+ [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Path' )]
76
+ [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Models.IDeviceUpdateIdentity ]
77
+ # Identity Parameter
78
+ ${AccountInputObject} ,
79
+
80
+ [Parameter (ParameterSetName = ' CreateExpanded' , Mandatory )]
81
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' , Mandatory )]
69
82
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
70
83
[System.String ]
71
84
# The geo-location where the resource lives
72
85
${Location} ,
73
86
74
- [Parameter ()]
87
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
88
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' )]
75
89
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
76
90
[System.String ]
77
91
# ConnectionString of the diagnostic storage account
78
92
${DiagnosticStoragePropertyConnectionString} ,
79
93
80
- [Parameter ()]
94
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
95
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' )]
81
96
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
82
97
[System.String ]
83
98
# ResourceId of the diagnostic storage account
84
99
${DiagnosticStoragePropertyResourceId} ,
85
100
86
- [Parameter ()]
101
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
102
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' )]
87
103
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
88
104
[System.Management.Automation.SwitchParameter ]
89
105
# Enables or Disables the diagnostic logs collection
90
106
${EnableDiagnostic} ,
91
107
92
- [Parameter ()]
108
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
109
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' )]
93
110
[AllowEmptyCollection ()]
94
111
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
95
112
[System.String []]
96
113
# List of IoT Hubs associated with the account.
97
114
# To construct, see NOTES section for IOTHUB properties and create a hash table.
98
115
${IotHubId} ,
99
116
100
- [Parameter ()]
117
+ [Parameter (ParameterSetName = ' CreateExpanded' )]
118
+ [Parameter (ParameterSetName = ' CreateViaIdentityAccountExpanded' )]
101
119
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
102
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Runtime.Info (PossibleTypes= ([Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Models.Api30. ITrackedResourceTags ]))]
120
+ [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Runtime.Info (PossibleTypes= ([Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Models.ITrackedResourceTags ]))]
103
121
[System.Collections.Hashtable ]
104
122
# Resource tags.
105
123
${Tag} ,
106
124
125
+ [Parameter (ParameterSetName = ' CreateViaJsonFilePath' , Mandatory )]
126
+ [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
127
+ [System.String ]
128
+ # Path of Json file supplied to the Create operation
129
+ ${JsonFilePath} ,
130
+
131
+ [Parameter (ParameterSetName = ' CreateViaJsonString' , Mandatory )]
132
+ [Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Body' )]
133
+ [System.String ]
134
+ # Json string supplied to the Create operation
135
+ ${JsonString} ,
136
+
107
137
[Parameter ()]
108
138
[Alias (' AzureRMContext' , ' AzureCredential' )]
109
139
[ValidateNotNull ()]
110
140
[Microsoft.Azure.PowerShell.Cmdlets.DeviceUpdate.Category (' Azure' )]
111
141
[System.Management.Automation.PSObject ]
112
- # The credentials, account, tenant, and subscription used for communication with Azure.
142
+ # The DefaultProfile parameter is not functional.
143
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
113
144
${DefaultProfile} ,
114
145
115
146
[Parameter ()]
0 commit comments