@@ -27,12 +27,23 @@ Get-AzDigitalTwinsEndpoint -ResourceGroupName azps_test_group -ResourceName azps
2727. Inputs
2828Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.IDigitalTwinsIdentity
2929. Outputs
30- Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.Api20220531. IDigitalTwinsEndpointResource
30+ Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.IDigitalTwinsEndpointResource
3131. Notes
3232COMPLEX PARAMETER PROPERTIES
3333
3434To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
3535
36+ DIGITALTWINSINSTANCEINPUTOBJECT <IDigitalTwinsIdentity>: Identity Parameter
37+ [EndpointName <String>]: Name of Endpoint Resource.
38+ [Id <String>]: Resource identity path
39+ [Location <String>]: Location of DigitalTwinsInstance.
40+ [PrivateEndpointConnectionName <String>]: The name of the private endpoint connection.
41+ [ResourceGroupName <String>]: The name of the resource group that contains the DigitalTwinsInstance.
42+ [ResourceId <String>]: The name of the private link resource.
43+ [ResourceName <String>]: The name of the DigitalTwinsInstance.
44+ [SubscriptionId <String>]: The subscription identifier.
45+ [TimeSeriesDatabaseConnectionName <String>]: Name of time series database connection.
46+
3647INPUTOBJECT <IDigitalTwinsIdentity>: Identity Parameter
3748 [EndpointName <String>]: Name of Endpoint Resource.
3849 [Id <String>]: Resource identity path
@@ -47,10 +58,11 @@ INPUTOBJECT <IDigitalTwinsIdentity>: Identity Parameter
4758https://learn.microsoft.com/powershell/module/az.digitaltwins/get-azdigitaltwinsendpoint
4859#>
4960function Get-AzDigitalTwinsEndpoint {
50- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.Api20220531. IDigitalTwinsEndpointResource ])]
61+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.IDigitalTwinsEndpointResource ])]
5162[CmdletBinding (DefaultParameterSetName = ' List' , PositionalBinding = $false )]
5263param (
5364 [Parameter (ParameterSetName = ' Get' , Mandatory )]
65+ [Parameter (ParameterSetName = ' GetViaIdentityDigitalTwinsInstance' , Mandatory )]
5466 [Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Category (' Path' )]
5567 [System.String ]
5668 # Name of Endpoint Resource.
@@ -82,9 +94,14 @@ param(
8294 [Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Category (' Path' )]
8395 [Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.IDigitalTwinsIdentity ]
8496 # Identity Parameter
85- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
8697 ${InputObject} ,
8798
99+ [Parameter (ParameterSetName = ' GetViaIdentityDigitalTwinsInstance' , Mandatory , ValueFromPipeline )]
100+ [Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Category (' Path' )]
101+ [Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Models.IDigitalTwinsIdentity ]
102+ # Identity Parameter
103+ ${DigitalTwinsInstanceInputObject} ,
104+
88105 [Parameter ()]
89106 [Alias (' AzureRMContext' , ' AzureCredential' )]
90107 [ValidateNotNull ()]
@@ -141,6 +158,15 @@ begin {
141158 $PSBoundParameters [' OutBuffer' ] = 1
142159 }
143160 $parameterSet = $PSCmdlet.ParameterSetName
161+
162+ $testPlayback = $false
163+ $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
164+
165+ $context = Get-AzContext
166+ if (-not $context -and -not $testPlayback ) {
167+ Write-Error " No Azure login detected. Please run 'Connect-AzAccount' to log in."
168+ exit
169+ }
144170
145171 if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
146172 [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
@@ -162,11 +188,10 @@ begin {
162188 $mapping = @ {
163189 Get = ' Az.DigitalTwins.private\Get-AzDigitalTwinsEndpoint_Get' ;
164190 GetViaIdentity = ' Az.DigitalTwins.private\Get-AzDigitalTwinsEndpoint_GetViaIdentity' ;
191+ GetViaIdentityDigitalTwinsInstance = ' Az.DigitalTwins.private\Get-AzDigitalTwinsEndpoint_GetViaIdentityDigitalTwinsInstance' ;
165192 List = ' Az.DigitalTwins.private\Get-AzDigitalTwinsEndpoint_List' ;
166193 }
167- if ((' Get' , ' List' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' )) {
168- $testPlayback = $false
169- $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.DigitalTwins.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
194+ if ((' Get' , ' List' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
170195 if ($testPlayback ) {
171196 $PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
172197 } else {
@@ -180,6 +205,9 @@ begin {
180205 [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
181206 }
182207 $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Cmdlet)
208+ if ($wrappedCmd -eq $null ) {
209+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Function)
210+ }
183211 $scriptCmd = {& $wrappedCmd @PSBoundParameters }
184212 $steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
185213 $steppablePipeline.Begin ($PSCmdlet )
0 commit comments