Skip to content

Commit f1b9fab

Browse files
[skip ci] Archive 7f979cb (#29403)
1 parent 7f979cb commit f1b9fab

343 files changed

Lines changed: 59393 additions & 6142 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.format.ps1xml

Lines changed: 462 additions & 0 deletions
Large diffs are not rendered by default.

generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.DeviceRegistry.private.dll'
1313
FormatsToProcess = './Az.DeviceRegistry.format.ps1xml'
14-
FunctionsToExport = 'Get-AzDeviceRegistryAsset', 'Get-AzDeviceRegistryAssetEndpointProfile', 'Get-AzDeviceRegistryBillingContainer', 'Get-AzDeviceRegistryNamespace', 'Get-AzDeviceRegistryNamespaceAsset', 'Get-AzDeviceRegistryNamespaceDevice', 'Get-AzDeviceRegistryNamespaceDiscoveredAsset', 'Get-AzDeviceRegistryNamespaceDiscoveredDevice', 'Get-AzDeviceRegistrySchema', 'Get-AzDeviceRegistrySchemaRegistry', 'Get-AzDeviceRegistrySchemaVersion', 'Move-AzDeviceRegistryNamespace', 'New-AzDeviceRegistryAsset', 'New-AzDeviceRegistryAssetEndpointProfile', 'New-AzDeviceRegistryNamespace', 'New-AzDeviceRegistryNamespaceAsset', 'New-AzDeviceRegistryNamespaceDevice', 'New-AzDeviceRegistryNamespaceDiscoveredAsset', 'New-AzDeviceRegistryNamespaceDiscoveredDevice', 'New-AzDeviceRegistrySchema', 'New-AzDeviceRegistrySchemaRegistry', 'New-AzDeviceRegistrySchemaVersion', 'Remove-AzDeviceRegistryAsset', 'Remove-AzDeviceRegistryAssetEndpointProfile', 'Remove-AzDeviceRegistryNamespace', 'Remove-AzDeviceRegistryNamespaceAsset', 'Remove-AzDeviceRegistryNamespaceDevice', 'Remove-AzDeviceRegistryNamespaceDiscoveredAsset', 'Remove-AzDeviceRegistryNamespaceDiscoveredDevice', 'Remove-AzDeviceRegistrySchema', 'Remove-AzDeviceRegistrySchemaRegistry', 'Remove-AzDeviceRegistrySchemaVersion', 'Update-AzDeviceRegistryAsset', 'Update-AzDeviceRegistryAssetEndpointProfile', 'Update-AzDeviceRegistryNamespace', 'Update-AzDeviceRegistryNamespaceAsset', 'Update-AzDeviceRegistryNamespaceDevice', 'Update-AzDeviceRegistryNamespaceDiscoveredAsset', 'Update-AzDeviceRegistryNamespaceDiscoveredDevice', 'Update-AzDeviceRegistrySchema', 'Update-AzDeviceRegistrySchemaRegistry', 'Update-AzDeviceRegistrySchemaVersion'
14+
FunctionsToExport = 'Get-AzDeviceRegistryAsset', 'Get-AzDeviceRegistryAssetEndpointProfile', 'Get-AzDeviceRegistryBillingContainer', 'Get-AzDeviceRegistryCredentials', 'Get-AzDeviceRegistryNamespace', 'Get-AzDeviceRegistryNamespaceAsset', 'Get-AzDeviceRegistryNamespaceDevice', 'Get-AzDeviceRegistryNamespaceDiscoveredAsset', 'Get-AzDeviceRegistryNamespaceDiscoveredDevice', 'Get-AzDeviceRegistryPolicy', 'Get-AzDeviceRegistrySchema', 'Get-AzDeviceRegistrySchemaRegistry', 'Get-AzDeviceRegistrySchemaVersion', 'Initialize-AzDeviceRegistryPolicyBringYourOwnRoot', 'Move-AzDeviceRegistryNamespace', 'New-AzDeviceRegistryAsset', 'New-AzDeviceRegistryAssetEndpointProfile', 'New-AzDeviceRegistryCredentials', 'New-AzDeviceRegistryNamespace', 'New-AzDeviceRegistryNamespaceAsset', 'New-AzDeviceRegistryNamespaceDevice', 'New-AzDeviceRegistryNamespaceDiscoveredAsset', 'New-AzDeviceRegistryNamespaceDiscoveredDevice', 'New-AzDeviceRegistryPolicy', 'New-AzDeviceRegistrySchema', 'New-AzDeviceRegistrySchemaRegistry', 'New-AzDeviceRegistrySchemaVersion', 'Remove-AzDeviceRegistryAsset', 'Remove-AzDeviceRegistryAssetEndpointProfile', 'Remove-AzDeviceRegistryCredentials', 'Remove-AzDeviceRegistryNamespace', 'Remove-AzDeviceRegistryNamespaceAsset', 'Remove-AzDeviceRegistryNamespaceDevice', 'Remove-AzDeviceRegistryNamespaceDiscoveredAsset', 'Remove-AzDeviceRegistryNamespaceDiscoveredDevice', 'Remove-AzDeviceRegistryPolicy', 'Remove-AzDeviceRegistrySchema', 'Remove-AzDeviceRegistrySchemaRegistry', 'Remove-AzDeviceRegistrySchemaVersion', 'Revoke-AzDeviceRegistryNamespaceDevice', 'Revoke-AzDeviceRegistryPolicyIssuer', 'Sync-AzDeviceRegistryCredentials', 'Update-AzDeviceRegistryAsset', 'Update-AzDeviceRegistryAssetEndpointProfile', 'Update-AzDeviceRegistryCredentials', 'Update-AzDeviceRegistryNamespace', 'Update-AzDeviceRegistryNamespaceAsset', 'Update-AzDeviceRegistryNamespaceDevice', 'Update-AzDeviceRegistryNamespaceDiscoveredAsset', 'Update-AzDeviceRegistryNamespaceDiscoveredDevice', 'Update-AzDeviceRegistryPolicy', 'Update-AzDeviceRegistrySchema', 'Update-AzDeviceRegistrySchemaRegistry', 'Update-AzDeviceRegistrySchemaVersion'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DeviceRegistry'

generated/DeviceRegistry/DeviceRegistry.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DeviceRegistry")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]
27-
28-

generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAsset.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ INPUTOBJECT <IDeviceRegistryIdentity>: Identity Parameter
4949
[Location <String>]: The name of the Azure region.
5050
[NamespaceName <String>]: The name of the namespace.
5151
[OperationId <String>]: The ID of an ongoing async operation.
52+
[PolicyName <String>]: The name of the Policy proxy resource.
5253
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
5354
[SchemaName <String>]: Schema name parameter.
5455
[SchemaRegistryName <String>]: Schema registry name parameter.
@@ -154,8 +155,7 @@ begin {
154155

155156
$context = Get-AzContext
156157
if (-not $context -and -not $testPlayback) {
157-
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
158-
exit
158+
throw "No Azure login detected. Please run 'Connect-AzAccount' to log in."
159159
}
160160

161161
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {

generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAssetEndpointProfile.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ INPUTOBJECT <IDeviceRegistryIdentity>: Identity Parameter
4949
[Location <String>]: The name of the Azure region.
5050
[NamespaceName <String>]: The name of the namespace.
5151
[OperationId <String>]: The ID of an ongoing async operation.
52+
[PolicyName <String>]: The name of the Policy proxy resource.
5253
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
5354
[SchemaName <String>]: Schema name parameter.
5455
[SchemaRegistryName <String>]: Schema registry name parameter.
@@ -154,8 +155,7 @@ begin {
154155

155156
$context = Get-AzContext
156157
if (-not $context -and -not $testPlayback) {
157-
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
158-
exit
158+
throw "No Azure login detected. Please run 'Connect-AzAccount' to log in."
159159
}
160160

161161
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {

generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryBillingContainer.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ INPUTOBJECT <IDeviceRegistryIdentity>: Identity Parameter
5050
[Location <String>]: The name of the Azure region.
5151
[NamespaceName <String>]: The name of the namespace.
5252
[OperationId <String>]: The ID of an ongoing async operation.
53+
[PolicyName <String>]: The name of the Policy proxy resource.
5354
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
5455
[SchemaName <String>]: Schema name parameter.
5556
[SchemaRegistryName <String>]: Schema registry name parameter.
@@ -146,8 +147,7 @@ begin {
146147

147148
$context = Get-AzContext
148149
if (-not $context -and -not $testPlayback) {
149-
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
150-
exit
150+
throw "No Azure login detected. Please run 'Connect-AzAccount' to log in."
151151
}
152152

153153
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
14+
# is regenerated.
15+
# ----------------------------------------------------------------------------------
16+
17+
<#
18+
.Synopsis
19+
Get a Credential
20+
.Description
21+
Get a Credential
22+
.Example
23+
Get-AzDeviceRegistryCredentials -ResourceGroupName "my-resource-group" -NamespaceName "my-namespace"
24+
25+
.Inputs
26+
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity
27+
.Outputs
28+
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential
29+
.Notes
30+
COMPLEX PARAMETER PROPERTIES
31+
32+
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
33+
34+
INPUTOBJECT <IDeviceRegistryIdentity>: Identity Parameter
35+
[AssetEndpointProfileName <String>]: Asset Endpoint Profile name parameter.
36+
[AssetName <String>]: Asset name parameter.
37+
[BillingContainerName <String>]: Name of the billing container.
38+
[DeviceName <String>]: The name of the device.
39+
[DiscoveredAssetName <String>]: The name of the discovered asset.
40+
[DiscoveredDeviceName <String>]: The name of the discovered device.
41+
[Id <String>]: Resource identity path
42+
[Location <String>]: The name of the Azure region.
43+
[NamespaceName <String>]: The name of the namespace.
44+
[OperationId <String>]: The ID of an ongoing async operation.
45+
[PolicyName <String>]: The name of the Policy proxy resource.
46+
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
47+
[SchemaName <String>]: Schema name parameter.
48+
[SchemaRegistryName <String>]: Schema registry name parameter.
49+
[SchemaVersionName <String>]: Schema version name parameter.
50+
[SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID.
51+
.Link
52+
https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistrycredentials
53+
#>
54+
function Get-AzDeviceRegistryCredentials {
55+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential])]
56+
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
57+
param(
58+
[Parameter(ParameterSetName='Get', Mandatory)]
59+
[Parameter(ParameterSetName='List', Mandatory)]
60+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
61+
[System.String]
62+
# The name of the namespace.
63+
${NamespaceName},
64+
65+
[Parameter(ParameterSetName='Get', Mandatory)]
66+
[Parameter(ParameterSetName='List', Mandatory)]
67+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
68+
[System.String]
69+
# The name of the resource group.
70+
# The name is case insensitive.
71+
${ResourceGroupName},
72+
73+
[Parameter(ParameterSetName='Get')]
74+
[Parameter(ParameterSetName='List')]
75+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
76+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
77+
[System.String[]]
78+
# The ID of the target subscription.
79+
# The value must be an UUID.
80+
${SubscriptionId},
81+
82+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
83+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
84+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity]
85+
# Identity Parameter
86+
${InputObject},
87+
88+
[Parameter()]
89+
[Alias('AzureRMContext', 'AzureCredential')]
90+
[ValidateNotNull()]
91+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
92+
[System.Management.Automation.PSObject]
93+
# The DefaultProfile parameter is not functional.
94+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
95+
${DefaultProfile},
96+
97+
[Parameter(DontShow)]
98+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
99+
[System.Management.Automation.SwitchParameter]
100+
# Wait for .NET debugger to attach
101+
${Break},
102+
103+
[Parameter(DontShow)]
104+
[ValidateNotNull()]
105+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
106+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
107+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
108+
${HttpPipelineAppend},
109+
110+
[Parameter(DontShow)]
111+
[ValidateNotNull()]
112+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
113+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
114+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
115+
${HttpPipelinePrepend},
116+
117+
[Parameter(DontShow)]
118+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
119+
[System.Uri]
120+
# The URI for the proxy server to use
121+
${Proxy},
122+
123+
[Parameter(DontShow)]
124+
[ValidateNotNull()]
125+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
126+
[System.Management.Automation.PSCredential]
127+
# Credentials for a proxy server to use for the remote call
128+
${ProxyCredential},
129+
130+
[Parameter(DontShow)]
131+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
132+
[System.Management.Automation.SwitchParameter]
133+
# Use the default credentials for the proxy
134+
${ProxyUseDefaultCredentials}
135+
)
136+
137+
begin {
138+
try {
139+
$outBuffer = $null
140+
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
141+
$PSBoundParameters['OutBuffer'] = 1
142+
}
143+
$parameterSet = $PSCmdlet.ParameterSetName
144+
145+
$testPlayback = $false
146+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
147+
148+
$context = Get-AzContext
149+
if (-not $context -and -not $testPlayback) {
150+
throw "No Azure login detected. Please run 'Connect-AzAccount' to log in."
151+
}
152+
153+
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
154+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
155+
}
156+
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
157+
if ($preTelemetryId -eq '') {
158+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
159+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
160+
} else {
161+
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
162+
if ($internalCalledCmdlets -eq '') {
163+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
164+
} else {
165+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
166+
}
167+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
168+
}
169+
170+
$mapping = @{
171+
Get = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_Get';
172+
GetViaIdentity = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_GetViaIdentity';
173+
List = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_List';
174+
}
175+
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
176+
if ($testPlayback) {
177+
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
178+
} else {
179+
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
180+
}
181+
}
182+
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
183+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
184+
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
185+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
186+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
187+
}
188+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
189+
if ($wrappedCmd -eq $null) {
190+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
191+
}
192+
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
193+
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
194+
$steppablePipeline.Begin($PSCmdlet)
195+
} catch {
196+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
197+
throw
198+
}
199+
}
200+
201+
process {
202+
try {
203+
$steppablePipeline.Process($_)
204+
} catch {
205+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
206+
throw
207+
}
208+
209+
finally {
210+
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
211+
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
212+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
213+
}
214+
215+
}
216+
end {
217+
try {
218+
$steppablePipeline.End()
219+
220+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
221+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
222+
if ($preTelemetryId -eq '') {
223+
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
224+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
225+
}
226+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
227+
228+
} catch {
229+
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
230+
throw
231+
}
232+
}
233+
}

generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespace.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ INPUTOBJECT <IDeviceRegistryIdentity>: Identity Parameter
5353
[Location <String>]: The name of the Azure region.
5454
[NamespaceName <String>]: The name of the namespace.
5555
[OperationId <String>]: The ID of an ongoing async operation.
56+
[PolicyName <String>]: The name of the Policy proxy resource.
5657
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
5758
[SchemaName <String>]: Schema name parameter.
5859
[SchemaRegistryName <String>]: Schema registry name parameter.
@@ -158,8 +159,7 @@ begin {
158159

159160
$context = Get-AzContext
160161
if (-not $context -and -not $testPlayback) {
161-
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
162-
exit
162+
throw "No Azure login detected. Please run 'Connect-AzAccount' to log in."
163163
}
164164

165165
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {

0 commit comments

Comments
 (0)