|
| 1 | + |
| 2 | +# ---------------------------------------------------------------------------------- |
| 3 | +# |
| 4 | +# Copyright Microsoft Corporation |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# ---------------------------------------------------------------------------------- |
| 15 | +<# |
| 16 | +.Synopsis |
| 17 | +Return the requested IP pool. |
| 18 | +.Description |
| 19 | +Return the requested IP pool. |
| 20 | +.Example |
| 21 | +To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/get-azsippool |
| 22 | +.Inputs |
| 23 | +Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity |
| 24 | +.Outputs |
| 25 | +Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.IIPPool |
| 26 | +.Notes |
| 27 | +COMPLEX PARAMETER PROPERTIES |
| 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 <IFabricAdminIdentity>: Identity Parameter |
| 31 | + [Drive <String>]: Name of the storage drive. |
| 32 | + [EdgeGateway <String>]: Name of the edge gateway. |
| 33 | + [EdgeGatewayPool <String>]: Name of the edge gateway pool. |
| 34 | + [FabricLocation <String>]: Fabric location. |
| 35 | + [FileShare <String>]: Fabric file share name. |
| 36 | + [IPPool <String>]: IP pool name. |
| 37 | + [Id <String>]: Resource identity path |
| 38 | + [InfraRole <String>]: Infrastructure role name. |
| 39 | + [InfraRoleInstance <String>]: Name of an infrastructure role instance. |
| 40 | + [Location <String>]: Location of the resource. |
| 41 | + [LogicalNetwork <String>]: Name of the logical network. |
| 42 | + [LogicalSubnet <String>]: Name of the logical subnet. |
| 43 | + [MacAddressPool <String>]: Name of the MAC address pool. |
| 44 | + [Operation <String>]: Operation identifier. |
| 45 | + [ResourceGroupName <String>]: Name of the resource group. |
| 46 | + [ScaleUnit <String>]: Name of the scale units. |
| 47 | + [ScaleUnitNode <String>]: Name of the scale unit node. |
| 48 | + [SlbMuxInstance <String>]: Name of a SLB MUX instance. |
| 49 | + [StoragePool <String>]: Storage pool name. |
| 50 | + [StorageSubSystem <String>]: Name of the storage system. |
| 51 | + [SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
| 52 | + [Volume <String>]: Name of the storage volume. |
| 53 | +.Link |
| 54 | +https://docs.microsoft.com/en-us/powershell/module/azs.fabric.admin/get-azsippool |
| 55 | +#> |
| 56 | +function Get-AzsIPPool { |
| 57 | +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.Api20160501.IIPPool])] |
| 58 | +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] |
| 59 | +param( |
| 60 | + [Parameter(ParameterSetName='Get')] |
| 61 | + [Parameter(ParameterSetName='List')] |
| 62 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] |
| 63 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')] |
| 64 | + [System.String] |
| 65 | + # Location of the resource. |
| 66 | + ${Location}, |
| 67 | + |
| 68 | + [Parameter(ParameterSetName='Get', Mandatory)] |
| 69 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] |
| 70 | + [System.String] |
| 71 | + # IP pool name. |
| 72 | + ${Name}, |
| 73 | + |
| 74 | + [Parameter(ParameterSetName='Get')] |
| 75 | + [Parameter(ParameterSetName='List')] |
| 76 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] |
| 77 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')] |
| 78 | + [System.String] |
| 79 | + # Name of the resource group. |
| 80 | + ${ResourceGroupName}, |
| 81 | + |
| 82 | + [Parameter(ParameterSetName='Get')] |
| 83 | + [Parameter(ParameterSetName='List')] |
| 84 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] |
| 85 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] |
| 86 | + [System.String[]] |
| 87 | + # Subscription credentials that uniquely identify Microsoft Azure subscription. |
| 88 | + # The subscription ID forms part of the URI for every service call. |
| 89 | + ${SubscriptionId}, |
| 90 | + |
| 91 | + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] |
| 92 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Path')] |
| 93 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Models.IFabricAdminIdentity] |
| 94 | + # Identity Parameter |
| 95 | + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. |
| 96 | + ${InputObject}, |
| 97 | + |
| 98 | + [Parameter(ParameterSetName='List')] |
| 99 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Query')] |
| 100 | + [System.String] |
| 101 | + # OData filter parameter. |
| 102 | + ${Filter}, |
| 103 | + |
| 104 | + [Parameter()] |
| 105 | + [Alias('AzureRMContext', 'AzureCredential')] |
| 106 | + [ValidateNotNull()] |
| 107 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Azure')] |
| 108 | + [System.Management.Automation.PSObject] |
| 109 | + # The credentials, account, tenant, and subscription used for communication with Azure. |
| 110 | + ${DefaultProfile}, |
| 111 | + |
| 112 | + [Parameter(DontShow)] |
| 113 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 114 | + [System.Management.Automation.SwitchParameter] |
| 115 | + # Wait for .NET debugger to attach |
| 116 | + ${Break}, |
| 117 | + |
| 118 | + [Parameter(DontShow)] |
| 119 | + [ValidateNotNull()] |
| 120 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 121 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]] |
| 122 | + # SendAsync Pipeline Steps to be appended to the front of the pipeline |
| 123 | + ${HttpPipelineAppend}, |
| 124 | + |
| 125 | + [Parameter(DontShow)] |
| 126 | + [ValidateNotNull()] |
| 127 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 128 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Runtime.SendAsyncStep[]] |
| 129 | + # SendAsync Pipeline Steps to be prepended to the front of the pipeline |
| 130 | + ${HttpPipelinePrepend}, |
| 131 | + |
| 132 | + [Parameter()] |
| 133 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 134 | + [System.Management.Automation.SwitchParameter] |
| 135 | + # Returns true when the command succeeds |
| 136 | + ${PassThru}, |
| 137 | + |
| 138 | + [Parameter(DontShow)] |
| 139 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 140 | + [System.Uri] |
| 141 | + # The URI for the proxy server to use |
| 142 | + ${Proxy}, |
| 143 | + |
| 144 | + [Parameter(DontShow)] |
| 145 | + [ValidateNotNull()] |
| 146 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 147 | + [System.Management.Automation.PSCredential] |
| 148 | + # Credentials for a proxy server to use for the remote call |
| 149 | + ${ProxyCredential}, |
| 150 | + |
| 151 | + [Parameter(DontShow)] |
| 152 | + [Microsoft.Azure.PowerShell.Cmdlets.FabricAdmin.Category('Runtime')] |
| 153 | + [System.Management.Automation.SwitchParameter] |
| 154 | + # Use the default credentials for the proxy |
| 155 | + ${ProxyUseDefaultCredentials} |
| 156 | +) |
| 157 | + |
| 158 | +process { |
| 159 | + # Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here |
| 160 | + if ($PSBoundParameters.ContainsKey(('Name'))) |
| 161 | + { |
| 162 | + if ($null -ne $Name -and $Name.Contains('/')) |
| 163 | + { |
| 164 | + $PSBoundParameters['Name'] = $Name.Split("/")[-1] |
| 165 | + } |
| 166 | + } |
| 167 | + |
| 168 | + Azs.Fabric.Admin.internal\Get-AzsIPPool @PSBoundParameters |
| 169 | +} |
| 170 | +} |
0 commit comments