Skip to content

[MobileNetwork] Additional change mobile network #20610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/MobileNetwork/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
/*.ps1
/*.ps1xml
Expand Down
2 changes: 1 addition & 1 deletion src/MobileNetwork/Az.MobileNetwork.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.MobileNetwork.private.dll'
FormatsToProcess = './Az.MobileNetwork.format.ps1xml'
FunctionsToExport = 'Get-AzMobileNetwork', 'Get-AzMobileNetworkAttachedDataNetwork', 'Get-AzMobileNetworkDataNetwork', 'Get-AzMobileNetworkPacketCoreControlPlane', 'Get-AzMobileNetworkPacketCoreControlPlaneVersion', 'Get-AzMobileNetworkPacketCoreDataPlane', 'Get-AzMobileNetworkService', 'Get-AzMobileNetworkSim', 'Get-AzMobileNetworkSimGroup', 'Get-AzMobileNetworkSimPolicy', 'Get-AzMobileNetworkSite', 'Get-AzMobileNetworkSlice', 'New-AzMobileNetwork', 'New-AzMobileNetworkAttachedDataNetwork', 'New-AzMobileNetworkDataNetwork', 'New-AzMobileNetworkDataNetworkConfigurationObject', 'New-AzMobileNetworkPacketCoreControlPlane', 'New-AzMobileNetworkPacketCoreDataPlane', 'New-AzMobileNetworkPccRuleConfigurationObject', 'New-AzMobileNetworkService', 'New-AzMobileNetworkServiceDataFlowTemplateObject', 'New-AzMobileNetworkServiceResourceIdObject', 'New-AzMobileNetworkSim', 'New-AzMobileNetworkSimGroup', 'New-AzMobileNetworkSimNameAndEncryptedPropertiesObject', 'New-AzMobileNetworkSimNameAndPropertiesObject', 'New-AzMobileNetworkSimPolicy', 'New-AzMobileNetworkSimStaticIPPropertiesObject', 'New-AzMobileNetworkSite', 'New-AzMobileNetworkSiteResourceIdObject', 'New-AzMobileNetworkSlice', 'New-AzMobileNetworkSliceConfigurationObject', 'Remove-AzMobileNetwork', 'Remove-AzMobileNetworkAttachedDataNetwork', 'Remove-AzMobileNetworkBulkSimDelete', 'Remove-AzMobileNetworkDataNetwork', 'Remove-AzMobileNetworkPacketCoreControlPlane', 'Remove-AzMobileNetworkPacketCoreDataPlane', 'Remove-AzMobileNetworkService', 'Remove-AzMobileNetworkSim', 'Remove-AzMobileNetworkSimGroup', 'Remove-AzMobileNetworkSimPolicy', 'Remove-AzMobileNetworkSite', 'Remove-AzMobileNetworkSlice', 'Reset-AzMobileNetworkReinstallPacketCoreControlPlane', 'Revoke-AzMobileNetworkRollbackPacketCoreControlPlane', 'Update-AzMobileNetwork', 'Update-AzMobileNetworkAttachedDataNetwork', 'Update-AzMobileNetworkBulkSimUpload', 'Update-AzMobileNetworkBulkSimUploadEncrypted', 'Update-AzMobileNetworkCollectPacketCoreControlPlaneDiagnosticPackage', 'Update-AzMobileNetworkDataNetwork', 'Update-AzMobileNetworkPacketCoreControlPlane', 'Update-AzMobileNetworkPacketCoreDataPlane', 'Update-AzMobileNetworkService', 'Update-AzMobileNetworkSimGroup', 'Update-AzMobileNetworkSimPolicy', 'Update-AzMobileNetworkSite', 'Update-AzMobileNetworkSlice', '*'
FunctionsToExport = 'Get-AzMobileNetwork', 'Get-AzMobileNetworkAttachedDataNetwork', 'Get-AzMobileNetworkDataNetwork', 'Get-AzMobileNetworkPacketCoreControlPlane', 'Get-AzMobileNetworkPacketCoreControlPlaneVersion', 'Get-AzMobileNetworkPacketCoreDataPlane', 'Get-AzMobileNetworkService', 'Get-AzMobileNetworkSim', 'Get-AzMobileNetworkSimGroup', 'Get-AzMobileNetworkSimPolicy', 'Get-AzMobileNetworkSite', 'Get-AzMobileNetworkSlice', 'New-AzMobileNetwork', 'New-AzMobileNetworkAttachedDataNetwork', 'New-AzMobileNetworkDataNetwork', 'New-AzMobileNetworkDataNetworkConfigurationObject', 'New-AzMobileNetworkPacketCoreControlPlane', 'New-AzMobileNetworkPacketCoreDataPlane', 'New-AzMobileNetworkPccRuleConfigurationObject', 'New-AzMobileNetworkService', 'New-AzMobileNetworkServiceDataFlowTemplateObject', 'New-AzMobileNetworkServiceResourceIdObject', 'New-AzMobileNetworkSim', 'New-AzMobileNetworkSimGroup', 'New-AzMobileNetworkSimPolicy', 'New-AzMobileNetworkSimStaticIPPropertiesObject', 'New-AzMobileNetworkSite', 'New-AzMobileNetworkSiteResourceIdObject', 'New-AzMobileNetworkSlice', 'New-AzMobileNetworkSliceConfigurationObject', 'Remove-AzMobileNetwork', 'Remove-AzMobileNetworkAttachedDataNetwork', 'Remove-AzMobileNetworkDataNetwork', 'Remove-AzMobileNetworkPacketCoreControlPlane', 'Remove-AzMobileNetworkPacketCoreDataPlane', 'Remove-AzMobileNetworkService', 'Remove-AzMobileNetworkSim', 'Remove-AzMobileNetworkSimGroup', 'Remove-AzMobileNetworkSimPolicy', 'Remove-AzMobileNetworkSite', 'Remove-AzMobileNetworkSlice', 'Update-AzMobileNetwork', 'Update-AzMobileNetworkAttachedDataNetwork', 'Update-AzMobileNetworkDataNetwork', 'Update-AzMobileNetworkPacketCoreControlPlane', 'Update-AzMobileNetworkPacketCoreDataPlane', 'Update-AzMobileNetworkService', 'Update-AzMobileNetworkSimGroup', 'Update-AzMobileNetworkSimPolicy', 'Update-AzMobileNetworkSite', 'Update-AzMobileNetworkSlice', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Expand Down
107 changes: 89 additions & 18 deletions src/MobileNetwork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the MobileNetwork service.
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
Expand Down Expand Up @@ -82,6 +82,11 @@ directive:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^BulkViaIdentity$|^Bulk$|^Collect$|^CollectViaIdentity$
remove: true

- where:
verb: New
subject: SimGroup
hide: true

- where:
verb: Set
remove: true
Expand Down Expand Up @@ -129,47 +134,73 @@ directive:
subject: ^Slouse$
set:
subject: Slice
- where:
parameter-name: DefaultSlouseId
set:
parameter-name: DefaultSliceId

# - where:
# verb: Invoke
# subject: ^BulkSimDelete$
# set:
# verb: Remove
- where:
verb: Invoke
subject: ^BulkSimDelete$
set:
verb: Remove
remove: true
# - where:
# verb: Invoke
# subject: ^BulkSimUpload$
# set:
# verb: Update
- where:
verb: Invoke
subject: ^BulkSimUpload$
set:
verb: Update
remove: true
# - where:
# verb: Invoke
# subject: ^BulkSimUploadEncrypted$
# set:
# verb: Update
- where:
verb: Invoke
subject: ^BulkSimUploadEncrypted$
set:
verb: Update
remove: true
# - where:
# verb: Invoke
# subject: ^CollectPacketCoreControlPlaneDiagnosticPackage$
# set:
# verb: Update
- where:
verb: Invoke
subject: ^CollectPacketCoreControlPlaneDiagnosticPackage$
set:
verb: Update
remove: true
# - where:
# verb: Invoke
# subject: ^ReinstallPacketCoreControlPlane$
# set:
# verb: Reset
- where:
verb: Invoke
subject: ^ReinstallPacketCoreControlPlane$
set:
verb: Reset
remove: true
# - where:
# verb: Invoke
# subject: ^RollbackPacketCoreControlPlane$
# set:
# verb: Revoke
- where:
verb: Invoke
subject: ^RollbackPacketCoreControlPlane$
set:
verb: Revoke
remove: true

# The following are commented out and their generated cmdlets may be renamed and custom logic
# - model-cmdlet:
# - SimNameAndEncryptedProperties
# - SimNameAndProperties
# - SliceConfiguration
# - SliceConfiguration # SlouseId -> SliceId
# - DataNetworkConfiguration
# - ServiceResourceId
# - SiteResourceId
# - SimStaticIPProperties
# - SimStaticIPProperties # SlouseId -> SliceId
# - PccRuleConfiguration
# - ServiceDataFlowTemplate

Expand Down Expand Up @@ -247,5 +278,45 @@ directive:
- Name
- ResourceGroupName
- ProvisioningState
- IdentityType
- where:
model-name: PacketCoreControlPlane
set:
format-table:
properties:
- Location
- Name
- ResourceGroupName
- ProvisioningState
- where:
model-name: PacketCoreDataPlane
set:
format-table:
properties:
- Location
- Name
- ResourceGroupName
- ProvisioningState
- where:
model-name: AttachedDataNetwork
set:
format-table:
properties:
- Location
- Name
- ResourceGroupName
- ProvisioningState
- where:
model-name: Sim
set:
format-table:
properties:
- Name
- ResourceGroupName
- ProvisioningState
- where:
model-name: PacketCoreControlPlaneVersion
set:
format-table:
properties:
- Name
```
200 changes: 200 additions & 0 deletions src/MobileNetwork/custom/New-AzMobileNetworkSimGroup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Creates or updates a SIM group.
.Description
Creates or updates a SIM group.
.Example
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"

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISimGroup
.Link
https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksimgroup
#>
function New-AzMobileNetworkSimGroup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISimGroup])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Alias('SimGroupName')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')]
[System.String]
# The name of the SIM Group.
${Name},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
${SubscriptionId},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[System.String]
# The geo-location where the resource lives
${Location},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[System.String]
# The key URL, unversioned.
# For example: https://contosovault.vault.azure.net/keys/azureKey.
${EncryptionKeyUrl},

[Parameter()]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.ManagedServiceIdentityType])]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.ManagedServiceIdentityType]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
${IdentityUserAssignedIdentity},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[System.String]
# Mobile network resource ID.
${MobileNetworkId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},

[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Azure')]
[System.Management.Automation.PSObject]
# The credentials, account, tenant, and subscription used for communication with Azure.
${DefaultProfile},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Run the command as a job
${AsJob},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Wait for .NET debugger to attach
${Break},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Run the command asynchronously
${NoWait},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Uri]
# The URI for the proxy server to use
${Proxy},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Management.Automation.PSCredential]
# Credentials for a proxy server to use for the remote call
${ProxyCredential},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)

begin {
try {
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$mapping = @{
CreateExpanded = 'Az.MobileNetwork.private\New-AzMobileNetworkSimGroup_CreateExpanded';
}
if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}

$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [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
}
}
}
Loading