exported/New-Subnet.ps1
function New-Subnet { [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${Name}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${Description}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${AvailabilityZoneReferenceName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${AvailabilityZoneReferenceUuid}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${ClusterReferenceName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${ClusterReferenceUuid}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${DefaultGatewayIp}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [System.Nullable[int]] ${PrefixLength}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${SubnetIp}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${BootFileName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${DomainName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string[]] ${DomainNameServerList}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string[]] ${DomainSearchList}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${TftpServerName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${Fqdn}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${Ip}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${Ipv6}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [System.Nullable[int]] ${DhcpPort}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [Nutanix.Powershell.Models.IIpPool[]] ${PoolList}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${NetworkFunctionChainReferenceName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${NetworkFunctionChainReferenceUuid}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${SubnetType}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [System.Nullable[int]] ${VlanId}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [string] ${VswitchName}, [Parameter(ParameterSetName='Expanded', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [System.Collections.Generic.IDictionary[string,string]] ${Categories}, [Parameter(ParameterSetName='Expanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='SendAsync Pipeline Steps to be appended to the front of the pipeline')] [ValidateNotNull()] [Microsoft.Rest.ClientRuntime.SendAsyncStep[]] ${HttpPipelineAppend}, [Parameter(ParameterSetName='Expanded', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='SendAsync Pipeline Steps to be prepended to the front of the pipeline')] [ValidateNotNull()] [Microsoft.Rest.ClientRuntime.SendAsyncStep[]] ${HttpPipelinePrepend}, [Parameter(ParameterSetName='Expanded', HelpMessage='The URI for the proxy server to use')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='The URI for the proxy server to use')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='The URI for the proxy server to use')] [uri] ${Proxy}, [Parameter(ParameterSetName='Expanded', HelpMessage='Credentials for a proxy server to use for the remote call')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Credentials for a proxy server to use for the remote call')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Credentials for a proxy server to use for the remote call')] [ValidateNotNull()] [pscredential] ${ProxyCredential}, [Parameter(ParameterSetName='Expanded', HelpMessage='Use the default credentials for the proxy')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Use the default credentials for the proxy')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Use the default credentials for the proxy')] [switch] ${ProxyUseDefaultCredentials}, [Parameter(ParameterSetName='Expanded', HelpMessage='The Username for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='The Username for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='The Username for authentication')] [string] ${Username}, [Parameter(ParameterSetName='Expanded', HelpMessage='The Password for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='The Password for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='The Password for authentication')] [securestring] ${Password}, [Parameter(ParameterSetName='Expanded', HelpMessage='Skip the ssl validation')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Skip the ssl validation')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Skip the ssl validation')] [switch] ${SkipSSL}, [Parameter(ParameterSetName='Expanded', HelpMessage='The Nutanix Credential object for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='The Nutanix Credential object for authentication')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='The Nutanix Credential object for authentication')] [ValidateNotNull()] [Nutanix.Powershell.Models.NutanixCredential] ${Credential}, [Parameter(ParameterSetName='Expanded', HelpMessage='Server address')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Server address')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Server address')] [string] ${Server}, [Parameter(ParameterSetName='Expanded', HelpMessage='Server Port, defaults to 9440')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Server Port, defaults to 9440')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Server Port, defaults to 9440')] [string] ${Port}, [Parameter(ParameterSetName='Expanded', HelpMessage='The HTTP protocol, defaults to https')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='The HTTP protocol, defaults to https')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='The HTTP protocol, defaults to https')] [string] ${Protocol}, [Parameter(ParameterSetName='Expanded', HelpMessage='Run the command asynchronous')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', HelpMessage='Run the command asynchronous')] [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', HelpMessage='Run the command asynchronous')] [switch] ${Async}, [Parameter(ParameterSetName='SubnetApiVersionMetadataSpec', Mandatory=$true, ValueFromPipeline=$true, HelpMessage='An intentful representation of a subnet')] [Nutanix.Powershell.Models.ISubnetIntentInput] ${Body}, [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='The subnet kind metadata')] [Nutanix.Powershell.Models.ISubnetMetadata] ${Metadata}, [Parameter(ParameterSetName='SubnetApiVersionMetadataSpecExpanded', Mandatory=$true, HelpMessage='An intentful representation of a subnet spec')] [Nutanix.Powershell.Models.ISubnet] ${Spec}) begin { switch ($PsCmdlet.ParameterSetName) { 'Expanded' { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Subnet_Expanded', [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters } $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } 'SubnetApiVersionMetadataSpec' { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Subnet_SubnetApiVersionMetadataSpec', [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters } $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } 'SubnetApiVersionMetadataSpecExpanded' { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Subnet_SubnetApiVersionMetadataSpecExpanded', [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters } $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } default { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand('Nutanix.private\New-Subnet_SubnetApiVersionMetadataSpec', [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters } $steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } <# .ForwardHelpTargetName Nutanix.private\New-Subnet_Expanded .ForwardHelpCategory Cmdlet #> } |