|
| 1 | + |
| 2 | +# ---------------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code |
| 14 | +# is regenerated. |
| 15 | +# ---------------------------------------------------------------------------------- |
| 16 | + |
| 17 | +<# |
| 18 | +.Synopsis |
| 19 | +Creates or updates a SIM group. |
| 20 | +.Description |
| 21 | +Creates or updates a SIM group. |
| 22 | +.Example |
| 23 | +New-AzMobileNetworkSimGroup -Name azps-mn-simgroup -ResourceGroupName azps_test_group -Location eastus -MobileNetworkId "/subscriptions/{subId}/resourceGroups/azps_test_group/providers/Microsoft.MobileNetwork/mobileNetworks/azps-mn" |
| 24 | +
|
| 25 | +.Outputs |
| 26 | +Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISimGroup |
| 27 | +.Link |
| 28 | +https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksimgroup |
| 29 | +#> |
| 30 | +function New-AzMobileNetworkSimGroup { |
| 31 | +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISimGroup])] |
| 32 | +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] |
| 33 | +param( |
| 34 | + [Parameter(Mandatory)] |
| 35 | + [Alias('SimGroupName')] |
| 36 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] |
| 37 | + [System.String] |
| 38 | + # The name of the SIM Group. |
| 39 | + ${Name}, |
| 40 | + |
| 41 | + [Parameter(Mandatory)] |
| 42 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] |
| 43 | + [System.String] |
| 44 | + # The name of the resource group. |
| 45 | + # The name is case insensitive. |
| 46 | + ${ResourceGroupName}, |
| 47 | + |
| 48 | + [Parameter()] |
| 49 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] |
| 50 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] |
| 51 | + [System.String] |
| 52 | + # The ID of the target subscription. |
| 53 | + ${SubscriptionId}, |
| 54 | + |
| 55 | + [Parameter(Mandatory)] |
| 56 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 57 | + [System.String] |
| 58 | + # The geo-location where the resource lives |
| 59 | + ${Location}, |
| 60 | + |
| 61 | + [Parameter()] |
| 62 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 63 | + [System.String] |
| 64 | + # The key URL, unversioned. |
| 65 | + # For example: https://contosovault.vault.azure.net/keys/azureKey. |
| 66 | + ${EncryptionKeyUrl}, |
| 67 | + |
| 68 | + [Parameter()] |
| 69 | + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.ManagedServiceIdentityType])] |
| 70 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 71 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.ManagedServiceIdentityType] |
| 72 | + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
| 73 | + ${IdentityType}, |
| 74 | + |
| 75 | + [Parameter()] |
| 76 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 77 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.IUserAssignedIdentities]))] |
| 78 | + [System.Collections.Hashtable] |
| 79 | + # The set of user assigned identities associated with the resource. |
| 80 | + # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. |
| 81 | + # The dictionary values can be empty objects ({}) in requests. |
| 82 | + ${IdentityUserAssignedIdentity}, |
| 83 | + |
| 84 | + [Parameter(Mandatory)] |
| 85 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 86 | + [System.String] |
| 87 | + # Mobile network resource ID. |
| 88 | + ${MobileNetworkId}, |
| 89 | + |
| 90 | + [Parameter()] |
| 91 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] |
| 92 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.ITrackedResourceTags]))] |
| 93 | + [System.Collections.Hashtable] |
| 94 | + # Resource tags. |
| 95 | + ${Tag}, |
| 96 | + |
| 97 | + [Parameter()] |
| 98 | + [Alias('AzureRMContext', 'AzureCredential')] |
| 99 | + [ValidateNotNull()] |
| 100 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Azure')] |
| 101 | + [System.Management.Automation.PSObject] |
| 102 | + # The credentials, account, tenant, and subscription used for communication with Azure. |
| 103 | + ${DefaultProfile}, |
| 104 | + |
| 105 | + [Parameter()] |
| 106 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 107 | + [System.Management.Automation.SwitchParameter] |
| 108 | + # Run the command as a job |
| 109 | + ${AsJob}, |
| 110 | + |
| 111 | + [Parameter(DontShow)] |
| 112 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 113 | + [System.Management.Automation.SwitchParameter] |
| 114 | + # Wait for .NET debugger to attach |
| 115 | + ${Break}, |
| 116 | + |
| 117 | + [Parameter(DontShow)] |
| 118 | + [ValidateNotNull()] |
| 119 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 120 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.SendAsyncStep[]] |
| 121 | + # SendAsync Pipeline Steps to be appended to the front of the pipeline |
| 122 | + ${HttpPipelineAppend}, |
| 123 | + |
| 124 | + [Parameter(DontShow)] |
| 125 | + [ValidateNotNull()] |
| 126 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 127 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.SendAsyncStep[]] |
| 128 | + # SendAsync Pipeline Steps to be prepended to the front of the pipeline |
| 129 | + ${HttpPipelinePrepend}, |
| 130 | + |
| 131 | + [Parameter()] |
| 132 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 133 | + [System.Management.Automation.SwitchParameter] |
| 134 | + # Run the command asynchronously |
| 135 | + ${NoWait}, |
| 136 | + |
| 137 | + [Parameter(DontShow)] |
| 138 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 139 | + [System.Uri] |
| 140 | + # The URI for the proxy server to use |
| 141 | + ${Proxy}, |
| 142 | + |
| 143 | + [Parameter(DontShow)] |
| 144 | + [ValidateNotNull()] |
| 145 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 146 | + [System.Management.Automation.PSCredential] |
| 147 | + # Credentials for a proxy server to use for the remote call |
| 148 | + ${ProxyCredential}, |
| 149 | + |
| 150 | + [Parameter(DontShow)] |
| 151 | + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')] |
| 152 | + [System.Management.Automation.SwitchParameter] |
| 153 | + # Use the default credentials for the proxy |
| 154 | + ${ProxyUseDefaultCredentials} |
| 155 | +) |
| 156 | + |
| 157 | +begin { |
| 158 | + try { |
| 159 | + $outBuffer = $null |
| 160 | + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { |
| 161 | + $PSBoundParameters['OutBuffer'] = 1 |
| 162 | + } |
| 163 | + $parameterSet = $PSCmdlet.ParameterSetName |
| 164 | + |
| 165 | + $mapping = @{ |
| 166 | + CreateExpanded = 'Az.MobileNetwork.private\New-AzMobileNetworkSimGroup_CreateExpanded'; |
| 167 | + } |
| 168 | + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { |
| 169 | + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id |
| 170 | + } |
| 171 | + |
| 172 | + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) |
| 173 | + $scriptCmd = {& $wrappedCmd @PSBoundParameters} |
| 174 | + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) |
| 175 | + $steppablePipeline.Begin($PSCmdlet) |
| 176 | + } catch { |
| 177 | + |
| 178 | + throw |
| 179 | + } |
| 180 | +} |
| 181 | + |
| 182 | +process { |
| 183 | + try { |
| 184 | + $steppablePipeline.Process($_) |
| 185 | + } catch { |
| 186 | + |
| 187 | + throw |
| 188 | + } |
| 189 | + |
| 190 | +} |
| 191 | +end { |
| 192 | + try { |
| 193 | + $steppablePipeline.End() |
| 194 | + |
| 195 | + } catch { |
| 196 | + |
| 197 | + throw |
| 198 | + } |
| 199 | +} |
| 200 | +} |
0 commit comments