|
| 1 | + |
| 2 | +# ---------------------------------------------------------------------------------- |
| 3 | +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.6, generator: @autorest/powershell@3.0.478) |
| 4 | +# Changes may cause incorrect behavior and will be lost if the code is regenerated. |
| 5 | +# ---------------------------------------------------------------------------------- |
| 6 | + |
| 7 | +<# |
| 8 | +.Synopsis |
| 9 | +Get an update location based on name. |
| 10 | +.Description |
| 11 | +Get an update location based on name. |
| 12 | +.Example |
| 13 | +PS C:\> {{ Add code here }} |
| 14 | +
|
| 15 | +{{ Add output here }} |
| 16 | +.Example |
| 17 | +PS C:\> {{ Add code here }} |
| 18 | +
|
| 19 | +{{ Add output here }} |
| 20 | +
|
| 21 | +.Inputs |
| 22 | +Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity |
| 23 | +.Outputs |
| 24 | +Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateLocation |
| 25 | +.Notes |
| 26 | +COMPLEX PARAMETER PROPERTIES |
| 27 | +
|
| 28 | +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. |
| 29 | +
|
| 30 | +INPUTOBJECT <IUpdateAdminIdentity>: Identity Parameter |
| 31 | + [Id <String>]: Resource identity path |
| 32 | + [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. |
| 33 | + [RunName <String>]: Update run identifier. |
| 34 | + [SubscriptionId <String>]: The ID of the target subscription. |
| 35 | + [UpdateLocation <String>]: The name of the update location. |
| 36 | + [UpdateName <String>]: Name of the update. |
| 37 | +.Link |
| 38 | +https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdatelocation |
| 39 | +#> |
| 40 | +function Get-AzsUpdateLocation { |
| 41 | +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateLocation])] |
| 42 | +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] |
| 43 | +param( |
| 44 | + [Parameter(ParameterSetName='Get')] |
| 45 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')] |
| 46 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')] |
| 47 | + [System.String] |
| 48 | + # The name of the update location. |
| 49 | + ${Name}, |
| 50 | + |
| 51 | + [Parameter(ParameterSetName='Get')] |
| 52 | + [Parameter(ParameterSetName='List')] |
| 53 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')] |
| 54 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')] |
| 55 | + [System.String] |
| 56 | + # The name of the resource group. |
| 57 | + # The name is case insensitive. |
| 58 | + ${ResourceGroupName}, |
| 59 | + |
| 60 | + [Parameter(ParameterSetName='Get')] |
| 61 | + [Parameter(ParameterSetName='List')] |
| 62 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')] |
| 63 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] |
| 64 | + [System.String[]] |
| 65 | + # The ID of the target subscription. |
| 66 | + ${SubscriptionId}, |
| 67 | + |
| 68 | + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] |
| 69 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')] |
| 70 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity] |
| 71 | + # Identity Parameter |
| 72 | + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. |
| 73 | + ${InputObject}, |
| 74 | + |
| 75 | + [Parameter()] |
| 76 | + [Alias('AzureRMContext', 'AzureCredential')] |
| 77 | + [ValidateNotNull()] |
| 78 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Azure')] |
| 79 | + [System.Management.Automation.PSObject] |
| 80 | + # The credentials, account, tenant, and subscription used for communication with Azure. |
| 81 | + ${DefaultProfile}, |
| 82 | + |
| 83 | + [Parameter(DontShow)] |
| 84 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 85 | + [System.Management.Automation.SwitchParameter] |
| 86 | + # Wait for .NET debugger to attach |
| 87 | + ${Break}, |
| 88 | + |
| 89 | + [Parameter(DontShow)] |
| 90 | + [ValidateNotNull()] |
| 91 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 92 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.SendAsyncStep[]] |
| 93 | + # SendAsync Pipeline Steps to be appended to the front of the pipeline |
| 94 | + ${HttpPipelineAppend}, |
| 95 | + |
| 96 | + [Parameter(DontShow)] |
| 97 | + [ValidateNotNull()] |
| 98 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 99 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.SendAsyncStep[]] |
| 100 | + # SendAsync Pipeline Steps to be prepended to the front of the pipeline |
| 101 | + ${HttpPipelinePrepend}, |
| 102 | + |
| 103 | + [Parameter(DontShow)] |
| 104 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 105 | + [System.Uri] |
| 106 | + # The URI for the proxy server to use |
| 107 | + ${Proxy}, |
| 108 | + |
| 109 | + [Parameter(DontShow)] |
| 110 | + [ValidateNotNull()] |
| 111 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 112 | + [System.Management.Automation.PSCredential] |
| 113 | + # Credentials for a proxy server to use for the remote call |
| 114 | + ${ProxyCredential}, |
| 115 | + |
| 116 | + [Parameter(DontShow)] |
| 117 | + [Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')] |
| 118 | + [System.Management.Automation.SwitchParameter] |
| 119 | + # Use the default credentials for the proxy |
| 120 | + ${ProxyUseDefaultCredentials} |
| 121 | +) |
| 122 | + |
| 123 | +process { |
| 124 | + # Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here |
| 125 | + |
| 126 | + if ($PSBoundParameters.ContainsKey(('Name'))) |
| 127 | + { |
| 128 | + if ($null -ne $Name -and $Name.Contains('/')) |
| 129 | + { |
| 130 | + $PSBoundParameters['Name'] = $Name.Split("/")[-1] |
| 131 | + } |
| 132 | + } |
| 133 | + |
| 134 | + Azs.Update.Admin.internal\Get-AzsUpdateLocation @PSBoundParameters |
| 135 | +} |
| 136 | +} |
0 commit comments