diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.format.ps1xml b/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.format.ps1xml
index 216278404339..127287dcb7fa 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.format.ps1xml
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.format.ps1xml
@@ -835,182 +835,6 @@
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CertificateAuthorityConfiguration
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CertificateAuthorityConfiguration#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- KeyType
-
-
- Subject
-
-
- ValidityNotAfter
-
-
- ValidityNotBefore
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Credential
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Credential#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Location
-
-
- Name
-
-
- SystemDataCreatedAt
-
-
- SystemDataCreatedBy
-
-
- SystemDataCreatedByType
-
-
- SystemDataLastModifiedAt
-
-
- SystemDataLastModifiedBy
-
-
- SystemDataLastModifiedByType
-
-
- ResourceGroupName
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialListResult
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialListResult#Multiple
-
-
-
-
-
-
-
-
-
-
-
- NextLink
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialProperties
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialProperties#Multiple
-
-
-
-
-
-
-
-
-
-
-
- ProvisioningState
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialUpdateTags
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.CredentialUpdateTags#Multiple
-
-
-
-
-
-
-
-
-
-
-
- Item
-
-
-
-
-
-
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.DataPoint
@@ -1201,28 +1025,6 @@
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.DeviceCredentialPolicy
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.DeviceCredentialPolicy#Multiple
-
-
-
-
-
-
-
-
-
-
-
- ResourceId
-
-
-
-
-
-
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.DeviceMessagingEndpoint
@@ -1369,9 +1171,6 @@
-
-
-
@@ -1418,9 +1217,6 @@
OperationId
-
- PolicyName
-
ResourceGroupName
@@ -1933,50 +1729,6 @@
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.LeafCertificateConfiguration
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.LeafCertificateConfiguration#Multiple
-
-
-
-
-
-
-
-
-
-
-
- ValidityPeriodInDay
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.LeafCertificateConfigurationUpdate
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.LeafCertificateConfigurationUpdate#Multiple
-
-
-
-
-
-
-
-
-
-
-
- ValidityPeriodInDay
-
-
-
-
-
-
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ManagementAction
@@ -4401,142 +4153,6 @@
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Policy
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.Policy#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Location
-
-
- Name
-
-
- SystemDataCreatedAt
-
-
- SystemDataCreatedBy
-
-
- SystemDataCreatedByType
-
-
- SystemDataLastModifiedAt
-
-
- SystemDataLastModifiedBy
-
-
- SystemDataLastModifiedByType
-
-
- ResourceGroupName
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyListResult
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyListResult#Multiple
-
-
-
-
-
-
-
-
-
-
-
- NextLink
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyProperties
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyProperties#Multiple
-
-
-
-
-
-
-
-
-
-
-
- ProvisioningState
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyUpdateTags
-
- Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.PolicyUpdateTags#Multiple
-
-
-
-
-
-
-
-
-
-
-
- Item
-
-
-
-
-
-
Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ProxyResource
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.psd1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.psd1
index 5d279cfc37e3..3508e6e00177 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.psd1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/Az.DeviceRegistry.psd1
@@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.DeviceRegistry.private.dll'
FormatsToProcess = './Az.DeviceRegistry.format.ps1xml'
- 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', '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', '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'
+ 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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DeviceRegistry'
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/Properties/AssemblyInfo.cs b/generated/DeviceRegistry/DeviceRegistry.Autorest/Properties/AssemblyInfo.cs
index 9ed6211508db..d4e4fc189b47 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/Properties/AssemblyInfo.cs
@@ -20,8 +20,8 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DeviceRegistry")]
-[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
-[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")]
+[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAsset.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAsset.ps1
index bfeae22ef746..f9dd2fcfde78 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAsset.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAsset.ps1
@@ -49,7 +49,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAssetEndpointProfile.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAssetEndpointProfile.ps1
index 210383b87366..bce68b43f375 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAssetEndpointProfile.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryAssetEndpointProfile.ps1
@@ -49,7 +49,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryBillingContainer.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryBillingContainer.ps1
index ee604b0a37ec..c1f3c491639c 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryBillingContainer.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryBillingContainer.ps1
@@ -50,7 +50,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryCredentials.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryCredentials.ps1
deleted file mode 100644
index 57a1a6a56f95..000000000000
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryCredentials.ps1
+++ /dev/null
@@ -1,236 +0,0 @@
-
-# ----------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
-# is regenerated.
-# ----------------------------------------------------------------------------------
-
-<#
-.Synopsis
-Get a Credential
-.Description
-Get a Credential
-.Example
-Get-AzDeviceRegistryCredentials -NamespaceName my-namespace -ResourceGroupName my-resource-group
-.Example
-Get-AzDeviceRegistryNamespace -Name my-namespace -ResourceGroupName my-resource-group | Get-AzDeviceRegistryCredentials
-
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential
-.Notes
-COMPLEX PARAMETER PROPERTIES
-
-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.
-
-INPUTOBJECT : Identity Parameter
- [AssetEndpointProfileName ]: Asset Endpoint Profile name parameter.
- [AssetName ]: Asset name parameter.
- [BillingContainerName ]: Name of the billing container.
- [DeviceName ]: The name of the device.
- [DiscoveredAssetName ]: The name of the discovered asset.
- [DiscoveredDeviceName ]: The name of the discovered device.
- [Id ]: Resource identity path
- [Location ]: The name of the Azure region.
- [NamespaceName ]: The name of the namespace.
- [OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [SchemaName ]: Schema name parameter.
- [SchemaRegistryName ]: Schema registry name parameter.
- [SchemaVersionName ]: Schema version name parameter.
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
-.Link
-https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistrycredentials
-#>
-function Get-AzDeviceRegistryCredentials {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential])]
-[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
-param(
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the namespace.
- ${NamespaceName},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter(ParameterSetName='Get')]
- [Parameter(ParameterSetName='List')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String[]]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity]
- # Identity Parameter
- ${InputObject},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
-
- $context = Get-AzContext
- if (-not $context -and -not $testPlayback) {
- Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
- exit
- }
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- Get = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_Get';
- GetViaIdentity = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_GetViaIdentity';
- List = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_List';
- }
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
- if ($testPlayback) {
- $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
- } else {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- 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)){
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
- }
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- if ($wrappedCmd -eq $null) {
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
- }
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespace.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespace.ps1
index aaa828a386f0..a5526eca8c5f 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespace.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespace.ps1
@@ -53,7 +53,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceAsset.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceAsset.ps1
index b6d4afb73093..8ad5473611e3 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceAsset.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceAsset.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ NAMESPACEINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDevice.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDevice.ps1
index f618009bd549..d1ddea093dc5 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDevice.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDevice.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ NAMESPACEINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredAsset.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredAsset.ps1
index 99130565a058..38b576539c8b 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredAsset.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredAsset.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ NAMESPACEINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredDevice.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredDevice.ps1
index d9c1d7eab189..fd55e192f8ff 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredDevice.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryNamespaceDiscoveredDevice.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ NAMESPACEINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryPolicy.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryPolicy.ps1
deleted file mode 100644
index 61a61509af70..000000000000
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistryPolicy.ps1
+++ /dev/null
@@ -1,269 +0,0 @@
-
-# ----------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
-# is regenerated.
-# ----------------------------------------------------------------------------------
-
-<#
-.Synopsis
-Get a Policy
-.Description
-Get a Policy
-.Example
-Get-AzDeviceRegistryPolicy -NamespaceName my-namespace -ResourceGroupName my-resource-group
-.Example
-Get-AzDeviceRegistryPolicy -Name my-policy-1 -NamespaceName my-namespace -ResourceGroupName my-resource-group
-
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IPolicy
-.Notes
-COMPLEX PARAMETER PROPERTIES
-
-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.
-
-INPUTOBJECT : Identity Parameter
- [AssetEndpointProfileName ]: Asset Endpoint Profile name parameter.
- [AssetName ]: Asset name parameter.
- [BillingContainerName ]: Name of the billing container.
- [DeviceName ]: The name of the device.
- [DiscoveredAssetName ]: The name of the discovered asset.
- [DiscoveredDeviceName ]: The name of the discovered device.
- [Id ]: Resource identity path
- [Location ]: The name of the Azure region.
- [NamespaceName ]: The name of the namespace.
- [OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [SchemaName ]: Schema name parameter.
- [SchemaRegistryName ]: Schema registry name parameter.
- [SchemaVersionName ]: Schema version name parameter.
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
-
-NAMESPACEINPUTOBJECT : Identity Parameter
- [AssetEndpointProfileName ]: Asset Endpoint Profile name parameter.
- [AssetName ]: Asset name parameter.
- [BillingContainerName ]: Name of the billing container.
- [DeviceName ]: The name of the device.
- [DiscoveredAssetName ]: The name of the discovered asset.
- [DiscoveredDeviceName ]: The name of the discovered device.
- [Id ]: Resource identity path
- [Location ]: The name of the Azure region.
- [NamespaceName ]: The name of the namespace.
- [OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [SchemaName ]: Schema name parameter.
- [SchemaRegistryName ]: Schema registry name parameter.
- [SchemaVersionName ]: Schema version name parameter.
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
-.Link
-https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistrypolicy
-#>
-function Get-AzDeviceRegistryPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IPolicy])]
-[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
-param(
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory)]
- [Alias('PolicyName')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the Policy tracked resource.
- ${Name},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the namespace.
- ${NamespaceName},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter(ParameterSetName='Get')]
- [Parameter(ParameterSetName='List')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String[]]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity]
- # Identity Parameter
- ${InputObject},
-
- [Parameter(ParameterSetName='GetViaIdentityNamespace', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity]
- # Identity Parameter
- ${NamespaceInputObject},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
-
- $context = Get-AzContext
- if (-not $context -and -not $testPlayback) {
- Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
- exit
- }
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- Get = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryPolicy_Get';
- GetViaIdentity = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryPolicy_GetViaIdentity';
- GetViaIdentityNamespace = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryPolicy_GetViaIdentityNamespace';
- List = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryPolicy_List';
- }
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
- if ($testPlayback) {
- $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
- } else {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- 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)){
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
- }
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- if ($wrappedCmd -eq $null) {
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
- }
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchema.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchema.ps1
index 95b35a8c20e5..9d71c221272c 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchema.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchema.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ SCHEMAREGISTRYINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaRegistry.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaRegistry.ps1
index a5f25ae31cc8..ee6b2b08a594 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaRegistry.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaRegistry.ps1
@@ -51,7 +51,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaVersion.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaVersion.ps1
index c492c3a63bd4..e68f60715a6b 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaVersion.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Get-AzDeviceRegistrySchemaVersion.ps1
@@ -59,7 +59,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -77,7 +76,6 @@ SCHEMAINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -95,7 +93,6 @@ SCHEMAREGISTRYINPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Move-AzDeviceRegistryNamespace.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Move-AzDeviceRegistryNamespace.ps1
index e876cb44a680..68c21f02de4e 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Move-AzDeviceRegistryNamespace.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/Move-AzDeviceRegistryNamespace.ps1
@@ -66,7 +66,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryCredentials.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryCredentials.ps1
deleted file mode 100644
index d8c7be2a53c9..000000000000
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryCredentials.ps1
+++ /dev/null
@@ -1,252 +0,0 @@
-
-# ----------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
-# is regenerated.
-# ----------------------------------------------------------------------------------
-
-<#
-.Synopsis
-Create a Credential
-.Description
-Create a Credential
-.Example
-New-AzDeviceRegistryCredentials -NamespaceName my-namespace -ResourceGroupName my-resource-group -Location eastus2 -Tag @{"environment" = "production"; "team" = "iot"}
-.Example
-New-AzDeviceRegistryCredentials -NamespaceName my-namespace -ResourceGroupName my-resource-group -JsonFilePath "C:\credentials\config.json"
-.Example
-$jsonString = @"
-{
- "location": "eastus2",
- "tags": {
- "environment": "production",
- "team": "iot"
- }
-}
-"@
-
-New-AzDeviceRegistryCredentials -NamespaceName my-namespace -ResourceGroupName my-resource-group -JsonString $jsonString
-
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential
-.Link
-https://learn.microsoft.com/powershell/module/az.deviceregistry/new-azdeviceregistrycredentials
-#>
-function New-AzDeviceRegistryCredentials {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential])]
-[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
-param(
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the namespace.
- ${NamespaceName},
-
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # The geo-location where the resource lives
- ${Location},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ITrackedResourceTags]))]
- [System.Collections.Hashtable]
- # Resource tags.
- ${Tag},
-
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # Path of Json file supplied to the Create operation
- ${JsonFilePath},
-
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # Json string supplied to the Create operation
- ${JsonString},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command as a job
- ${AsJob},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command asynchronously
- ${NoWait},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
-
- $context = Get-AzContext
- if (-not $context -and -not $testPlayback) {
- Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
- exit
- }
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- CreateExpanded = 'Az.DeviceRegistry.private\New-AzDeviceRegistryCredentials_CreateExpanded';
- CreateViaJsonFilePath = 'Az.DeviceRegistry.private\New-AzDeviceRegistryCredentials_CreateViaJsonFilePath';
- CreateViaJsonString = 'Az.DeviceRegistry.private\New-AzDeviceRegistryCredentials_CreateViaJsonString';
- }
- if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
- if ($testPlayback) {
- $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
- } else {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- 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)){
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
- }
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- if ($wrappedCmd -eq $null) {
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
- }
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryNamespaceDevice.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryNamespaceDevice.ps1
index 284d2edfbd40..98baca15159e 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryNamespaceDevice.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryNamespaceDevice.ps1
@@ -175,12 +175,6 @@ param(
# Set of most recently removed endpoints.
${OutboundUnassigned},
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # Resource Id of the Policy.
- ${PolicyResourceId},
-
[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ITrackedResourceTags]))]
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryPolicy.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryPolicy.ps1
deleted file mode 100644
index 99a493e67439..000000000000
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/New-AzDeviceRegistryPolicy.ps1
+++ /dev/null
@@ -1,295 +0,0 @@
-
-# ----------------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
-# is regenerated.
-# ----------------------------------------------------------------------------------
-
-<#
-.Synopsis
-Create a Policy
-.Description
-Create a Policy
-.Example
-$jsonString = @"
-{
- "location": "eastus2",
- "properties": {
- "certificate": {
- "certificateAuthorityConfiguration": {
- "keyType": "ECC"
- },
- "leafCertificateConfiguration": {
- "validityPeriodInDays": 90
- }
- }
- },
- "tags": {
- "environment": "production",
- "team": "iot"
- }
-}
-"@
-
-New-AzDeviceRegistryPolicy -Name my-policy-ecc -NamespaceName my-namespace -ResourceGroupName my-resource-group -JsonString $jsonString
-.Example
-$jsonString = @"
-{
- "location": "eastus2",
- "properties": {
- "certificate": {
- "certificateAuthorityConfiguration": {
- "keyType": "RSA"
- },
- "leafCertificateConfiguration": {
- "validityPeriodInDays": 365
- }
- }
- },
- "tags": {
- "environment": "production",
- "certType": "RSA"
- }
-}
-"@
-
-New-AzDeviceRegistryPolicy -Name my-policy-rsa -NamespaceName my-namespace -ResourceGroupName my-resource-group -JsonString $jsonString
-.Example
-New-AzDeviceRegistryPolicy -Name my-policy -NamespaceName my-namespace -ResourceGroupName my-resource-group -JsonFilePath "C:\policies\policy-config.json"
-
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IPolicy
-.Link
-https://learn.microsoft.com/powershell/module/az.deviceregistry/new-azdeviceregistrypolicy
-#>
-function New-AzDeviceRegistryPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IPolicy])]
-[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
-param(
- [Parameter(Mandatory)]
- [Alias('PolicyName')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the Policy tracked resource.
- ${Name},
-
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the namespace.
- ${NamespaceName},
-
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # The geo-location where the resource lives
- ${Location},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.Int32]
- # The validity period in days.
- ${LeafCertificateConfigurationValidityPeriodInDay},
-
- [Parameter(ParameterSetName='CreateExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ITrackedResourceTags]))]
- [System.Collections.Hashtable]
- # Resource tags.
- ${Tag},
-
- [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # Path of Json file supplied to the Create operation
- ${JsonFilePath},
-
- [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Body')]
- [System.String]
- # Json string supplied to the Create operation
- ${JsonString},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command as a job
- ${AsJob},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command asynchronously
- ${NoWait},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
-
- $context = Get-AzContext
- if (-not $context -and -not $testPlayback) {
- Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
- exit
- }
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- CreateExpanded = 'Az.DeviceRegistry.private\New-AzDeviceRegistryPolicy_CreateExpanded';
- CreateViaJsonFilePath = 'Az.DeviceRegistry.private\New-AzDeviceRegistryPolicy_CreateViaJsonFilePath';
- CreateViaJsonString = 'Az.DeviceRegistry.private\New-AzDeviceRegistryPolicy_CreateViaJsonString';
- }
- if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
- if ($testPlayback) {
- $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
- } else {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- 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)){
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
- }
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- if ($wrappedCmd -eq $null) {
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
- }
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
diff --git a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/ProxyCmdletDefinitions.ps1
index 78ad191bb33c..03b8d0d8a6d3 100644
--- a/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/DeviceRegistry/DeviceRegistry.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -49,7 +49,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -277,7 +276,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -506,7 +504,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -689,227 +686,6 @@ end {
}
}
-<#
-.Synopsis
-Get a Credential
-.Description
-Get a Credential
-.Example
-Get-AzDeviceRegistryCredentials -NamespaceName my-namespace -ResourceGroupName my-resource-group
-.Example
-Get-AzDeviceRegistryNamespace -Name my-namespace -ResourceGroupName my-resource-group | Get-AzDeviceRegistryCredentials
-
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential
-.Notes
-COMPLEX PARAMETER PROPERTIES
-
-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.
-
-INPUTOBJECT : Identity Parameter
- [AssetEndpointProfileName ]: Asset Endpoint Profile name parameter.
- [AssetName ]: Asset name parameter.
- [BillingContainerName ]: Name of the billing container.
- [DeviceName ]: The name of the device.
- [DiscoveredAssetName ]: The name of the discovered asset.
- [DiscoveredDeviceName ]: The name of the discovered device.
- [Id ]: Resource identity path
- [Location ]: The name of the Azure region.
- [NamespaceName ]: The name of the namespace.
- [OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [SchemaName ]: Schema name parameter.
- [SchemaRegistryName ]: Schema registry name parameter.
- [SchemaVersionName ]: Schema version name parameter.
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
-.Link
-https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistrycredentials
-#>
-function Get-AzDeviceRegistryCredentials {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.ICredential])]
-[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
-param(
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the namespace.
- ${NamespaceName},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter(ParameterSetName='Get')]
- [Parameter(ParameterSetName='List')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String[]]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Models.IDeviceRegistryIdentity]
- # Identity Parameter
- ${InputObject},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
-
- $context = Get-AzContext
- if (-not $context -and -not $testPlayback) {
- Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
- exit
- }
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- Get = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_Get';
- GetViaIdentity = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_GetViaIdentity';
- List = 'Az.DeviceRegistry.private\Get-AzDeviceRegistryCredentials_List';
- }
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
- if ($testPlayback) {
- $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
- } else {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- 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)){
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
- }
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- if ($wrappedCmd -eq $null) {
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
- }
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DeviceRegistry.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
-
<#
.Synopsis
Get a NamespaceAsset
@@ -955,7 +731,6 @@ INPUTOBJECT : Identity Parameter
[Location ]: The name of the Azure region.
[NamespaceName ]: The name of the namespace.
[OperationId ]: The ID of an ongoing async operation.
- [PolicyName ]: The name of the Policy tracked resource.
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SchemaName ]: Schema name parameter.
[SchemaRegistryName ]: Schema registry name parameter.
@@ -973,7 +748,6 @@ NAMESPACEINPUTOBJECT