diff --git a/src/MobileNetwork/Az.MobileNetwork.psd1 b/src/MobileNetwork/Az.MobileNetwork.psd1 index cebbc01103ec..666fd47bfa9d 100644 --- a/src/MobileNetwork/Az.MobileNetwork.psd1 +++ b/src/MobileNetwork/Az.MobileNetwork.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/20/2023 +# Generated on: 4/26/2023 # @{ @@ -146,7 +146,7 @@ PrivateData = @{ # IconUri = '' # ReleaseNotes of this module - ReleaseNotes = '* The ''Update-AzMobileNetwork*'' cmdlets has been improved to support more parameter changes.' + # ReleaseNotes = '' # Prerelease string of this module # Prerelease = '' diff --git a/src/MobileNetwork/ChangeLog.md b/src/MobileNetwork/ChangeLog.md index cda0c9903629..e018b03435e6 100644 --- a/src/MobileNetwork/ChangeLog.md +++ b/src/MobileNetwork/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* The function of the cmdlet `New-AzMobileNetworkSite` has been extended. Allows users to quickly deploy a new site under an existing mobile network using optional parameters, reducing the number of commands they need to execute. ## Version 0.1.1 * The `Update-AzMobileNetwork*` cmdlets has been improved to support more parameter changes. diff --git a/src/MobileNetwork/MobileNetwork.sln b/src/MobileNetwork/MobileNetwork.sln index 48bacfa1bc33..a2c44817fe2b 100644 --- a/src/MobileNetwork/MobileNetwork.sln +++ b/src/MobileNetwork/MobileNetwork.sln @@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{17CC7646-092F-413C-9A6C-3407CF1929A7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{E647309F-BCDF-4A20-A518-7CB715793740}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{D78AB1F8-03B0-4D92-9142-E721F92DE7E2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{BA3C242C-7DE1-4191-A643-5ADD1C2BBEE3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{9F12E822-DD68-468D-A82C-844E9C5CC39E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{A6B3A4C7-6E2B-4B9D-AA04-6B75F185D9A8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{6EB2A327-BAF6-4BBC-B957-B7C6C01CED51}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3780019C-1FB2-4244-B296-352593772984}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{32BAEE06-ED3F-4CA3-9F68-A3C57F658C50}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{A07628A1-C00F-46D0-B453-D7A451C0E6A7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{FFCE7E00-C4CA-459C-A669-00651E8BC9EC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{DDDE15AC-C94B-409C-BF7B-F1CA090B27EC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.MobileNetwork", "Az.MobileNetwork.csproj", "{B5FE95A8-5409-468E-96B9-87D6792DB2E9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.MobileNetwork", "Az.MobileNetwork.csproj", "{8264B2E8-578B-43A6-973D-C50CAF10A93B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -26,33 +26,33 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {17CC7646-092F-413C-9A6C-3407CF1929A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17CC7646-092F-413C-9A6C-3407CF1929A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17CC7646-092F-413C-9A6C-3407CF1929A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17CC7646-092F-413C-9A6C-3407CF1929A7}.Release|Any CPU.Build.0 = Release|Any CPU - {D78AB1F8-03B0-4D92-9142-E721F92DE7E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D78AB1F8-03B0-4D92-9142-E721F92DE7E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D78AB1F8-03B0-4D92-9142-E721F92DE7E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D78AB1F8-03B0-4D92-9142-E721F92DE7E2}.Release|Any CPU.Build.0 = Release|Any CPU - {9F12E822-DD68-468D-A82C-844E9C5CC39E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F12E822-DD68-468D-A82C-844E9C5CC39E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F12E822-DD68-468D-A82C-844E9C5CC39E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F12E822-DD68-468D-A82C-844E9C5CC39E}.Release|Any CPU.Build.0 = Release|Any CPU - {6EB2A327-BAF6-4BBC-B957-B7C6C01CED51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EB2A327-BAF6-4BBC-B957-B7C6C01CED51}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EB2A327-BAF6-4BBC-B957-B7C6C01CED51}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EB2A327-BAF6-4BBC-B957-B7C6C01CED51}.Release|Any CPU.Build.0 = Release|Any CPU - {32BAEE06-ED3F-4CA3-9F68-A3C57F658C50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32BAEE06-ED3F-4CA3-9F68-A3C57F658C50}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32BAEE06-ED3F-4CA3-9F68-A3C57F658C50}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32BAEE06-ED3F-4CA3-9F68-A3C57F658C50}.Release|Any CPU.Build.0 = Release|Any CPU - {FFCE7E00-C4CA-459C-A669-00651E8BC9EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FFCE7E00-C4CA-459C-A669-00651E8BC9EC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FFCE7E00-C4CA-459C-A669-00651E8BC9EC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FFCE7E00-C4CA-459C-A669-00651E8BC9EC}.Release|Any CPU.Build.0 = Release|Any CPU - {B5FE95A8-5409-468E-96B9-87D6792DB2E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5FE95A8-5409-468E-96B9-87D6792DB2E9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5FE95A8-5409-468E-96B9-87D6792DB2E9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5FE95A8-5409-468E-96B9-87D6792DB2E9}.Release|Any CPU.Build.0 = Release|Any CPU + {E647309F-BCDF-4A20-A518-7CB715793740}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E647309F-BCDF-4A20-A518-7CB715793740}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E647309F-BCDF-4A20-A518-7CB715793740}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E647309F-BCDF-4A20-A518-7CB715793740}.Release|Any CPU.Build.0 = Release|Any CPU + {BA3C242C-7DE1-4191-A643-5ADD1C2BBEE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA3C242C-7DE1-4191-A643-5ADD1C2BBEE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA3C242C-7DE1-4191-A643-5ADD1C2BBEE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA3C242C-7DE1-4191-A643-5ADD1C2BBEE3}.Release|Any CPU.Build.0 = Release|Any CPU + {A6B3A4C7-6E2B-4B9D-AA04-6B75F185D9A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6B3A4C7-6E2B-4B9D-AA04-6B75F185D9A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6B3A4C7-6E2B-4B9D-AA04-6B75F185D9A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6B3A4C7-6E2B-4B9D-AA04-6B75F185D9A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3780019C-1FB2-4244-B296-352593772984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3780019C-1FB2-4244-B296-352593772984}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3780019C-1FB2-4244-B296-352593772984}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3780019C-1FB2-4244-B296-352593772984}.Release|Any CPU.Build.0 = Release|Any CPU + {A07628A1-C00F-46D0-B453-D7A451C0E6A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A07628A1-C00F-46D0-B453-D7A451C0E6A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A07628A1-C00F-46D0-B453-D7A451C0E6A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A07628A1-C00F-46D0-B453-D7A451C0E6A7}.Release|Any CPU.Build.0 = Release|Any CPU + {DDDE15AC-C94B-409C-BF7B-F1CA090B27EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDDE15AC-C94B-409C-BF7B-F1CA090B27EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDDE15AC-C94B-409C-BF7B-F1CA090B27EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDDE15AC-C94B-409C-BF7B-F1CA090B27EC}.Release|Any CPU.Build.0 = Release|Any CPU + {8264B2E8-578B-43A6-973D-C50CAF10A93B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8264B2E8-578B-43A6-973D-C50CAF10A93B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8264B2E8-578B-43A6-973D-C50CAF10A93B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8264B2E8-578B-43A6-973D-C50CAF10A93B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/MobileNetwork/README.md b/src/MobileNetwork/README.md index 1ba30d3f99e0..87995e80ba71 100644 --- a/src/MobileNetwork/README.md +++ b/src/MobileNetwork/README.md @@ -58,6 +58,7 @@ identity-correction-for-post: true nested-object-to-string: true directive: + # Change interopSettings type from to - from: swagger-document where: $.definitions.PacketCoreControlPlanePropertiesFormat.properties.interopSettings transform: >- @@ -67,6 +68,7 @@ directive: "description": "Settings to allow interoperability with third party components e.g. RANs and UEs." } + # Remove parameters from swagger file - from: swagger-document where: $.definitions transform: delete $.CoreNetworkTypeRm @@ -74,6 +76,7 @@ directive: where: $.definitions transform: delete $.PduSessionTypeRm + # Replace [`default`] with ['default'] - from: swagger-document where: $ transform: return $.replace(/\`default\`/g, "'default'") @@ -94,6 +97,7 @@ directive: - where: verb: Set remove: true + - where: subject: ^AttachedDataNetworkTag$ set: @@ -138,11 +142,13 @@ directive: subject: ^Slouse$ set: subject: Slice + - where: parameter-name: DefaultSlouseId set: parameter-name: DefaultSliceId + # Due to business requirements, the logic of some commands is customized and they need to be hidden - where: verb: Update subject: ^AttachedDataNetwork$|^DataNetwork$|^PacketCoreControlPlane$|^PacketCoreDataPlane$|^Service$|^SimGroup$|^SimPolicy$|^Slice$ @@ -152,63 +158,40 @@ directive: verb: Update subject: ^AttachedDataNetwork$|^DataNetwork$|^PacketCoreControlPlane$|^PacketCoreDataPlane$|^Service$|^SimGroup$|^SimPolicy$|^Slice$ hide: true + - where: + verb: New + subject: ^Site$ + hide: true - # - where: - # verb: Invoke - # subject: ^BulkSimDelete$ - # set: - # verb: Remove + # Due to business needs, some commands are deleted and not exposed to the public - where: verb: Invoke subject: ^BulkSimDelete$ remove: true - # - where: - # verb: Invoke - # subject: ^BulkSimUpload$ - # set: - # verb: Update - where: verb: Invoke subject: ^BulkSimUpload$ remove: true - # - where: - # verb: Invoke - # subject: ^BulkSimUploadEncrypted$ - # set: - # verb: Update - where: verb: Invoke subject: ^BulkSimUploadEncrypted$ remove: true - # - where: - # verb: Invoke - # subject: ^CollectPacketCoreControlPlaneDiagnosticPackage$ - # set: - # verb: Update - where: verb: Invoke subject: ^CollectPacketCoreControlPlaneDiagnosticPackage$ remove: true - # - where: - # verb: Invoke - # subject: ^ReinstallPacketCoreControlPlane$ - # set: - # verb: Reset - where: verb: Invoke subject: ^ReinstallPacketCoreControlPlane$ remove: true - # - where: - # verb: Invoke - # subject: ^RollbackPacketCoreControlPlane$ - # set: - # verb: Revoke - where: verb: Invoke subject: ^RollbackPacketCoreControlPlane$ remove: true + # Some of the parameters are of type Object and need to be expanded into a command for the convenience of the user # The following are commented out and their generated cmdlets may be renamed and custom logic + # Do not delete this code # - model-cmdlet: # - SliceConfiguration # SlouseId -> SliceId # - DataNetworkConfiguration diff --git a/src/MobileNetwork/custom/New-AzMobileNetworkSite.ps1 b/src/MobileNetwork/custom/New-AzMobileNetworkSite.ps1 new file mode 100644 index 000000000000..5ca6f6c055fb --- /dev/null +++ b/src/MobileNetwork/custom/New-AzMobileNetworkSite.ps1 @@ -0,0 +1,445 @@ + +# ---------------------------------------------------------------------------------- +# 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 mobile network site. +Must be created in the same location as its parent mobile network. +.Description +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Example +New-AzMobileNetworkSite -MobileNetworkName azps-mn -Name azps-mn-site -ResourceGroupName azps_test_group -Location eastus -Tag @{"site"="123"} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite +.Link +https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksite +#> +function New-AzMobileNetworkSite { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite])] + [CmdletBinding(DefaultParameterSetName = 'CreateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network. + ${MobileNetworkName}, + + [Parameter(Mandatory)] + [Alias('SiteName')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network site. + ${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')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + # New-AzMobileNetworkPacketCoreControlPlane + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType] + # The platform type where packet core is deployed. + ${PlatformType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${ControlPlaneAccessInterfaceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${ControlPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${ControlPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${ControlPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Arc custom location resource ID. + ${CustomLocationId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Stack Edge device resource ID. + ${AzureStackEdgeDeviceId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType] + # How to authenticate users who access local diagnostics APIs. + ${LocalDiagnosticAccessAuthenticationType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType] + # The core network technology generation (5G core or EPC / 4G core). + ${CoreNetworkTechnology}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku] + # The SKU defining the throughput and SIM allowances for this packet core control plane deployment. + ${Sku}, + + # New-AzMobileNetworkPacketCoreDataPlane + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${UserPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneAccessInterfaceName}, + + # New-AzMobileNetworkAttachedDataNetwork + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The DNS servers to signal to UEs to use for this attached data network. + # This configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + ${DnsAddress}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled] + # Whether NAPT is enabled for connections to this attached data network. + ${NaptConfigurationEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${UserPlaneDataInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneDataInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneDataInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneDataInterfaceName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will dynamically assign IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. + # If you define both, they must be of the same size. + ${UserEquipmentAddressPoolPrefix}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will assign static IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # The static IP address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource.At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. + # If both are defined, they must be of the same size. + ${UserEquipmentStaticAddressPoolPrefix}, + + # New-AzMobileNetworkDataNetwork + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the data network. + ${DataNetworkName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${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} + ) + + process { + try { + # Remove all user input parameters. + $hasDataNetworkName = $PSBoundParameters.Remove('DataNetworkName') + + $hasPlatformType = $PSBoundParameters.Remove('PlatformType') + $hasControlPlaneAccessInterfaceName = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceName') + $hasControlPlaneAccessInterfaceIpv4Address = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Address') + $hasControlPlaneAccessInterfaceIpv4Gateway = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Gateway') + $hasControlPlaneAccessInterfaceIpv4Subnet = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Subnet') + $hasCustomLocationId = $PSBoundParameters.Remove('CustomLocationId') + $hasAzureStackEdgeDeviceId = $PSBoundParameters.Remove('AzureStackEdgeDeviceId') + $hasLocalDiagnosticAccessAuthenticationType = $PSBoundParameters.Remove('LocalDiagnosticAccessAuthenticationType') + $hasCoreNetworkTechnology = $PSBoundParameters.Remove('CoreNetworkTechnology') + $hasSku = $PSBoundParameters.Remove('Sku') + + $hasUserPlaneAccessInterfaceIpv4Address = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Address') + $hasUserPlaneAccessInterfaceIpv4Gateway = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Gateway') + $hasUserPlaneAccessInterfaceIpv4Subnet = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Subnet') + $hasUserPlaneAccessInterfaceName = $PSBoundParameters.Remove('UserPlaneAccessInterfaceName') + + $hasDnsAddress = $PSBoundParameters.Remove('DnsAddress') + $hasNaptConfigurationEnabled = $PSBoundParameters.Remove('NaptConfigurationEnabled') + $hasUserPlaneDataInterfaceIpv4Address = $PSBoundParameters.Remove('UserPlaneDataInterfaceIpv4Address') + $hasUserPlaneDataInterfaceIpv4Gateway = $PSBoundParameters.Remove('UserPlaneDataInterfaceIpv4Gateway') + $hasUserPlaneDataInterfaceIpv4Subnet = $PSBoundParameters.Remove('UserPlaneDataInterfaceIpv4Subnet') + $hasUserPlaneDataInterfaceName = $PSBoundParameters.Remove('UserPlaneDataInterfaceName') + $hasUserEquipmentAddressPoolPrefix = $PSBoundParameters.Remove('UserEquipmentAddressPoolPrefix') + $hasUserEquipmentStaticAddressPoolPrefix = $PSBoundParameters.Remove('UserEquipmentStaticAddressPoolPrefix') + + # Create Azure MobileNetwork Site + Az.MobileNetwork.private\New-AzMobileNetworkSite_CreateExpanded @PSBoundParameters + + # New-AzMobileNetworkDataNetwork + $null = $PSBoundParameters.Remove('Name') + if ($hasDataNetworkName) { + + $PSBoundParameters.Add('Name', $DataNetworkName) + + Az.MobileNetwork.private\New-AzMobileNetworkDataNetwork_CreateExpanded @PSBoundParameters + } + + # New-AzMobileNetworkPacketCoreControlPlane + $null = $PSBoundParameters.Remove('MobileNetworkName') + $null = $PSBoundParameters.Remove('DataNetworkName') + $null = $PSBoundParameters.Remove('Name') + if ($hasPlatformType -And $hasControlPlaneAccessInterfaceName ` + -And $hasControlPlaneAccessInterfaceIpv4Address -And $hasControlPlaneAccessInterfaceIpv4Gateway ` + -And $hasControlPlaneAccessInterfaceIpv4Subnet -And $hasAzureStackEdgeDeviceId ` + -And $hasLocalDiagnosticAccessAuthenticationType -And $hasCoreNetworkTechnology -And $hasSku) { + + $SiteResourceId = New-AzMobileNetworkSiteResourceIdObject -Id "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.MobileNetwork/mobileNetworks/$MobileNetworkName/sites/$Name" + $PSBoundParameters.Add('Site', $SiteResourceId) + $PSBoundParameters.Add('Name', $Name + '-PacketCoreControlPlane') + + $PSBoundParameters.Add('PlatformType', $PlatformType) + $PSBoundParameters.Add('ControlPlaneAccessInterfaceName', $ControlPlaneAccessInterfaceName) + $PSBoundParameters.Add('ControlPlaneAccessInterfaceIpv4Address', $ControlPlaneAccessInterfaceIpv4Address) + $PSBoundParameters.Add('ControlPlaneAccessInterfaceIpv4Gateway', $ControlPlaneAccessInterfaceIpv4Gateway) + $PSBoundParameters.Add('ControlPlaneAccessInterfaceIpv4Subnet', $ControlPlaneAccessInterfaceIpv4Subnet) + $PSBoundParameters.Add('AzureStackEdgeDeviceId', $AzureStackEdgeDeviceId) + $PSBoundParameters.Add('LocalDiagnosticAccessAuthenticationType', $LocalDiagnosticAccessAuthenticationType) + $PSBoundParameters.Add('CoreNetworkTechnology', $CoreNetworkTechnology) + $PSBoundParameters.Add('Sku', $Sku) + + if ($hasCustomLocationId) { + $PSBoundParameters.Add('CustomLocationId', $CustomLocationId) + } + + Az.MobileNetwork.private\New-AzMobileNetworkPacketCoreControlPlane_CreateExpanded @PSBoundParameters + + # New-AzMobileNetworkPacketCoreDataPlane + $null = $PSBoundParameters.Remove('Site') + $null = $PSBoundParameters.Remove('Name') + $null = $PSBoundParameters.Remove('PlatformType') + $null = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceName') + $null = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Address') + $null = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Gateway') + $null = $PSBoundParameters.Remove('ControlPlaneAccessInterfaceIpv4Subnet') + $null = $PSBoundParameters.Remove('CustomLocationId') + $null = $PSBoundParameters.Remove('AzureStackEdgeDeviceId') + $null = $PSBoundParameters.Remove('LocalDiagnosticAccessAuthenticationType') + $null = $PSBoundParameters.Remove('CoreNetworkTechnology') + $null = $PSBoundParameters.Remove('Sku') + if ($hasUserPlaneAccessInterfaceIpv4Address -And $hasUserPlaneAccessInterfaceIpv4Gateway ` + -And $hasUserPlaneAccessInterfaceIpv4Subnet -And $hasUserPlaneAccessInterfaceName) { + + $PSBoundParameters.Add('UserPlaneAccessInterfaceIpv4Address', $UserPlaneAccessInterfaceIpv4Address) + $PSBoundParameters.Add('UserPlaneAccessInterfaceIpv4Gateway', $UserPlaneAccessInterfaceIpv4Gateway) + $PSBoundParameters.Add('UserPlaneAccessInterfaceIpv4Subnet', $UserPlaneAccessInterfaceIpv4Subnet) + $PSBoundParameters.Add('UserPlaneAccessInterfaceName', $UserPlaneAccessInterfaceName) + $PSBoundParameters.Add('PacketCoreControlPlane', $Name + '-PacketCoreControlPlane') + $PSBoundParameters.Add('Name', $Name + '-PacketCoreDataPlane') + + Az.MobileNetwork.private\New-AzMobileNetworkPacketCoreDataPlane_CreateExpanded @PSBoundParameters + + # New-AzMobileNetworkAttachedDataNetwork + $null = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Address') + $null = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Gateway') + $null = $PSBoundParameters.Remove('UserPlaneAccessInterfaceIpv4Subnet') + $null = $PSBoundParameters.Remove('UserPlaneAccessInterfaceName') + $null = $PSBoundParameters.Remove('PacketCoreControlPlane') + $null = $PSBoundParameters.Remove('Name') + if ($hasDnsAddress -And $hasUserPlaneDataInterfaceIpv4Address -And $hasUserPlaneDataInterfaceIpv4Gateway ` + -And $hasUserPlaneDataInterfaceIpv4Subnet -And $hasUserPlaneDataInterfaceName ` + -And ($hasUserEquipmentStaticAddressPoolPrefix -Or $hasUserEquipmentAddressPoolPrefix)) { + + $PSBoundParameters.Add('DnsAddress', $DnsAddress) + $PSBoundParameters.Add('UserPlaneDataInterfaceIpv4Address', $UserPlaneDataInterfaceIpv4Address) + $PSBoundParameters.Add('UserPlaneDataInterfaceIpv4Gateway', $UserPlaneDataInterfaceIpv4Gateway) + $PSBoundParameters.Add('UserPlaneDataInterfaceIpv4Subnet', $UserPlaneDataInterfaceIpv4Subnet) + $PSBoundParameters.Add('UserPlaneDataInterfaceName', $UserPlaneDataInterfaceName) + $PSBoundParameters.Add('PacketCoreControlPlaneName', $Name + '-PacketCoreControlPlane') + $PSBoundParameters.Add('PacketCoreDataPlaneName', $Name + '-PacketCoreDataPlane') + $PSBoundParameters.Add('Name', $DataNetworkName) + + if ($hasNaptConfigurationEnabled) { + $PSBoundParameters.Add('NaptConfigurationEnabled', $NaptConfigurationEnabled) + } + if ($hasUserEquipmentStaticAddressPoolPrefix) { + $PSBoundParameters.Add('UserEquipmentStaticAddressPoolPrefix', $UserEquipmentStaticAddressPoolPrefix) + } + if ($hasUserEquipmentAddressPoolPrefix) { + $PSBoundParameters.Add('UserEquipmentAddressPoolPrefix', $UserEquipmentAddressPoolPrefix) + } + + Az.MobileNetwork.private\New-AzMobileNetworkAttachedDataNetwork_CreateExpanded @PSBoundParameters + } + elseif ($hasDnsAddress -Or $hasUserPlaneDataInterfaceIpv4Address -Or $hasUserPlaneDataInterfaceIpv4Gateway ` + -Or $hasUserPlaneDataInterfaceIpv4Subnet -Or $hasUserPlaneDataInterfaceName ` + -Or $hasUserEquipmentStaticAddressPoolPrefix -Or $hasUserEquipmentAddressPoolPrefix) { + Write-Warning "In order to create a Mobile Network Attached Data Network successfully, please ensure that parameters [-DnsAddress], [-UserPlaneDataInterfaceIpv4Address], [-UserPlaneDataInterfaceIpv4Gateway], [-UserPlaneDataInterfaceIpv4Subnet], [-UserPlaneDataInterfaceName] are correctly filled." + } + } + elseif ($hasUserPlaneAccessInterfaceIpv4Address -Or $hasUserPlaneAccessInterfaceIpv4Gateway ` + -Or $hasUserPlaneAccessInterfaceIpv4Subnet -Or $hasUserPlaneAccessInterfaceName) { + Write-Warning "In order to create a Mobile Network Packet Core Data Plane successfully, please ensure that parameters [-UserPlaneAccessInterfaceIpv4Address], [-UserPlaneAccessInterfaceIpv4Gateway], [-UserPlaneAccessInterfaceIpv4Subnet], [-UserPlaneAccessInterfaceName] are correctly filled." + } + } + elseif ($hasPlatformType -Or $hasControlPlaneAccessInterfaceName ` + -Or $hasControlPlaneAccessInterfaceIpv4Address -Or $hasControlPlaneAccessInterfaceIpv4Gateway ` + -Or $hasControlPlaneAccessInterfaceIpv4Subnet -Or $hasAzureStackEdgeDeviceId ` + -Or $hasLocalDiagnosticAccessAuthenticationType -Or $hasCoreNetworkTechnology -Or $hasSku) { + Write-Warning "In order to create a Mobile Network Packet Core Control Plane successfully, please ensure that parameters [-PlatformType], [-ControlPlaneAccessInterfaceName], [-ControlPlaneAccessInterfaceIpv4Address], [-ControlPlaneAccessInterfaceIpv4Gateway], [-ControlPlaneAccessInterfaceIpv4Subnet], [-AzureStackEdgeDeviceId], [-LocalDiagnosticAccessAuthenticationType], [-CoreNetworkTechnology], [-Sku] are correctly filled." + } + } + catch { + throw + } + } +} diff --git a/src/MobileNetwork/exports/New-AzMobileNetworkSite.ps1 b/src/MobileNetwork/exports/New-AzMobileNetworkSite.ps1 index 74a01c576dde..25ef98379fa5 100644 --- a/src/MobileNetwork/exports/New-AzMobileNetworkSite.ps1 +++ b/src/MobileNetwork/exports/New-AzMobileNetworkSite.ps1 @@ -60,6 +60,13 @@ param( # The ID of the target subscription. ${SubscriptionId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # New-AzMobileNetworkDataNetwork + # The name of the data network. + ${DataNetworkName}, + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] [System.String] @@ -73,6 +80,157 @@ param( # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType] + # New-AzMobileNetworkPacketCoreControlPlane + # The platform type where packet core is deployed. + ${PlatformType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${ControlPlaneAccessInterfaceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${ControlPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${ControlPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${ControlPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Arc custom location resource ID. + ${CustomLocationId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Stack Edge device resource ID. + ${AzureStackEdgeDeviceId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType] + # How to authenticate users who access local diagnostics APIs. + ${LocalDiagnosticAccessAuthenticationType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType] + # The core network technology generation (5G core or EPC / 4G core). + ${CoreNetworkTechnology}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku] + # The SKU defining the throughput and SIM allowances for this packet core control plane deployment. + ${Sku}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # New-AzMobileNetworkPacketCoreDataPlane + # The IPv4 address. + ${UserPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneAccessInterfaceName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # New-AzMobileNetworkAttachedDataNetwork + # The DNS servers to signal to UEs to use for this attached data network. + # This configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + ${DnsAddress}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled] + # Whether NAPT is enabled for connections to this attached data network. + ${NaptConfigurationEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${UserPlaneDataInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneDataInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneDataInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneDataInterfaceName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will dynamically assign IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. + # If you define both, they must be of the same size. + ${UserEquipmentAddressPoolPrefix}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will assign static IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # The static IP address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource.At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. + # If both are defined, they must be of the same size. + ${UserEquipmentStaticAddressPoolPrefix}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -160,7 +318,7 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.MobileNetwork.private\New-AzMobileNetworkSite_CreateExpanded'; + CreateExpanded = 'Az.MobileNetwork.custom\New-AzMobileNetworkSite'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id diff --git a/src/MobileNetwork/exports/ProxyCmdletDefinitions.ps1 b/src/MobileNetwork/exports/ProxyCmdletDefinitions.ps1 index 7155bbc9a534..ddd1c35b9f73 100644 --- a/src/MobileNetwork/exports/ProxyCmdletDefinitions.ps1 +++ b/src/MobileNetwork/exports/ProxyCmdletDefinitions.ps1 @@ -4553,203 +4553,6 @@ end { } } -<# -.Synopsis -Creates or updates a mobile network site. -Must be created in the same location as its parent mobile network. -.Description -Creates or updates a mobile network site. -Must be created in the same location as its parent mobile network. -.Example -New-AzMobileNetworkSite -MobileNetworkName azps-mn -Name azps-mn-site -ResourceGroupName azps_test_group -Location eastus -Tag @{"site"="123"} - -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite -.Link -https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksite -#> -function New-AzMobileNetworkSite { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] - [System.String] - # The name of the mobile network. - ${MobileNetworkName}, - - [Parameter(Mandatory)] - [Alias('SiteName')] - [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] - [System.String] - # The name of the mobile network site. - ${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')] - [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 DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${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 - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - CreateExpanded = 'Az.MobileNetwork.private\New-AzMobileNetworkSite_CreateExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - <# .Synopsis Creates or updates a network slice. @@ -8706,6 +8509,361 @@ end { } } +<# +.Synopsis +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Description +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Example +New-AzMobileNetworkSite -MobileNetworkName azps-mn -Name azps-mn-site -ResourceGroupName azps_test_group -Location eastus -Tag @{"site"="123"} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite +.Link +https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksite +#> +function New-AzMobileNetworkSite { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network. + ${MobileNetworkName}, + + [Parameter(Mandatory)] + [Alias('SiteName')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network site. + ${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()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # New-AzMobileNetworkDataNetwork + # The name of the data network. + ${DataNetworkName}, + + [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')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api30.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType] + # New-AzMobileNetworkPacketCoreControlPlane + # The platform type where packet core is deployed. + ${PlatformType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${ControlPlaneAccessInterfaceName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${ControlPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${ControlPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${ControlPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Arc custom location resource ID. + ${CustomLocationId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # Azure Stack Edge device resource ID. + ${AzureStackEdgeDeviceId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType] + # How to authenticate users who access local diagnostics APIs. + ${LocalDiagnosticAccessAuthenticationType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType] + # The core network technology generation (5G core or EPC / 4G core). + ${CoreNetworkTechnology}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku] + # The SKU defining the throughput and SIM allowances for this packet core control plane deployment. + ${Sku}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # New-AzMobileNetworkPacketCoreDataPlane + # The IPv4 address. + ${UserPlaneAccessInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneAccessInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneAccessInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneAccessInterfaceName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # New-AzMobileNetworkAttachedDataNetwork + # The DNS servers to signal to UEs to use for this attached data network. + # This configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + ${DnsAddress}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled])] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled] + # Whether NAPT is enabled for connections to this attached data network. + ${NaptConfigurationEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 address. + ${UserPlaneDataInterfaceIpv4Address}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The default IPv4 gateway (router). + ${UserPlaneDataInterfaceIpv4Gateway}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The IPv4 subnet. + ${UserPlaneDataInterfaceIpv4Subnet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String] + # The logical name for this interface. + # This should match one of the interfaces configured on your Azure Stack Edge device. + ${UserPlaneDataInterfaceName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will dynamically assign IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. + # If you define both, they must be of the same size. + ${UserEquipmentAddressPoolPrefix}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Body')] + [System.String[]] + # The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will assign static IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. + # The static IP address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource.At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. + # If both are defined, they must be of the same size. + ${UserEquipmentStaticAddressPoolPrefix}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${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 + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.MobileNetwork.custom\New-AzMobileNetworkSite'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + <# .Synopsis Create an in-memory object for SiteResourceId. @@ -9241,7 +9399,7 @@ Updates data network. .Description Updates data network. .Example -Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="`12"} +Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="12"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetworkIdentity @@ -9735,7 +9893,7 @@ Updates packet core data planes. .Description Updates packet core data planes. .Example -Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123} +Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetworkIdentity diff --git a/src/MobileNetwork/exports/Update-AzMobileNetworkDataNetwork.ps1 b/src/MobileNetwork/exports/Update-AzMobileNetworkDataNetwork.ps1 index 8a9644a7961f..15e50c4734be 100644 --- a/src/MobileNetwork/exports/Update-AzMobileNetworkDataNetwork.ps1 +++ b/src/MobileNetwork/exports/Update-AzMobileNetworkDataNetwork.ps1 @@ -20,7 +20,7 @@ Updates data network. .Description Updates data network. .Example -Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="`12"} +Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="12"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetworkIdentity diff --git a/src/MobileNetwork/exports/Update-AzMobileNetworkPacketCoreDataPlane.ps1 b/src/MobileNetwork/exports/Update-AzMobileNetworkPacketCoreDataPlane.ps1 index cdf1a312bd15..f6f1f44edf94 100644 --- a/src/MobileNetwork/exports/Update-AzMobileNetworkPacketCoreDataPlane.ps1 +++ b/src/MobileNetwork/exports/Update-AzMobileNetworkPacketCoreDataPlane.ps1 @@ -20,7 +20,7 @@ Updates packet core data planes. .Description Updates packet core data planes. .Example -Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123} +Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123"} .Inputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.IMobileNetworkIdentity diff --git a/src/MobileNetwork/generate-info.json b/src/MobileNetwork/generate-info.json index 9d5f129017d4..475d5b42d964 100644 --- a/src/MobileNetwork/generate-info.json +++ b/src/MobileNetwork/generate-info.json @@ -1,8 +1,8 @@ { - "swagger_commit": "6b992c049ed7d6a95465d5c0a2234fc54c87b9bf", + "swagger_commit": "38311a16b5bfcb756164c6c48a64b0bc90d01a54", "node": "v14.15.5", "autorest": "`-- (empty)", - "autorest_core": "3.9.4", + "autorest_core": "3.9.5", "autorest_modelerfour": "4.15.414", "autorest_powershell": "3.0.504" } diff --git a/src/MobileNetwork/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs b/src/MobileNetwork/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs index 1fa409380d00..ba5a116d4212 100644 --- a/src/MobileNetwork/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs +++ b/src/MobileNetwork/generated/cmdlets/NewAzMobileNetworkSite_CreateExpanded.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Cmdlets /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}" /// + [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzMobileNetworkSite_CreateExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite))] [global::Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Description(@"Creates or updates a mobile network site. Must be created in the same location as its parent mobile network.")] diff --git a/src/MobileNetwork/help/New-AzMobileNetworkSite.md b/src/MobileNetwork/help/New-AzMobileNetworkSite.md index 495124908d27..18669ecbe45e 100644 --- a/src/MobileNetwork/help/New-AzMobileNetworkSite.md +++ b/src/MobileNetwork/help/New-AzMobileNetworkSite.md @@ -15,8 +15,18 @@ Must be created in the same location as its parent mobile network. ``` New-AzMobileNetworkSite -MobileNetworkName -Name -ResourceGroupName - -Location [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] + -Location [-DataNetworkName ] [-SubscriptionId ] [-AzureStackEdgeDeviceId ] + [-ControlPlaneAccessInterfaceIpv4Address ] [-ControlPlaneAccessInterfaceIpv4Gateway ] + [-ControlPlaneAccessInterfaceIpv4Subnet ] [-ControlPlaneAccessInterfaceName ] + [-CoreNetworkTechnology ] [-CustomLocationId ] [-DnsAddress ] + [-LocalDiagnosticAccessAuthenticationType ] [-NaptConfigurationEnabled ] + [-PlatformType ] [-Sku ] [-Tag ] + [-UserEquipmentAddressPoolPrefix ] [-UserEquipmentStaticAddressPoolPrefix ] + [-UserPlaneAccessInterfaceIpv4Address ] [-UserPlaneAccessInterfaceIpv4Gateway ] + [-UserPlaneAccessInterfaceIpv4Subnet ] [-UserPlaneAccessInterfaceName ] + [-UserPlaneDataInterfaceIpv4Address ] [-UserPlaneDataInterfaceIpv4Gateway ] + [-UserPlaneDataInterfaceIpv4Subnet ] [-UserPlaneDataInterfaceName ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -56,6 +66,128 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -AzureStackEdgeDeviceId +Azure Stack Edge device resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ControlPlaneAccessInterfaceIpv4Address +The IPv4 address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ControlPlaneAccessInterfaceIpv4Gateway +The default IPv4 gateway (router). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ControlPlaneAccessInterfaceIpv4Subnet +The IPv4 subnet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ControlPlaneAccessInterfaceName +The logical name for this interface. +This should match one of the interfaces configured on your Azure Stack Edge device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CoreNetworkTechnology +The core network technology generation (5G core or EPC / 4G core). + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.CoreNetworkType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomLocationId +Azure Arc custom location resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataNetworkName +New-AzMobileNetworkDataNetwork +The name of the data network. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -72,6 +204,38 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DnsAddress +New-AzMobileNetworkAttachedDataNetwork +The DNS servers to signal to UEs to use for this attached data network. +This configuration is mandatory - if you don't want DNS servers, you must provide an empty array. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocalDiagnosticAccessAuthenticationType +How to authenticate users who access local diagnostics APIs. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.AuthenticationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The geo-location where the resource lives @@ -117,6 +281,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -NaptConfigurationEnabled +Whether NAPT is enabled for connections to this attached data network. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.NaptEnabled +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -132,6 +311,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -PlatformType +New-AzMobileNetworkPacketCoreControlPlane +The platform type where packet core is deployed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.PlatformType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -148,6 +343,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Sku +The SKU defining the throughput and SIM allowances for this packet core control plane deployment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Support.BillingSku +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SubscriptionId The ID of the target subscription. @@ -178,6 +388,163 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -UserEquipmentAddressPoolPrefix +The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will dynamically assign IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. +You must define at least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix. +If you define both, they must be of the same size. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserEquipmentStaticAddressPoolPrefix +The user equipment (UE) address pool prefixes for the attached data network from which the packet core instance will assign static IP addresses to UEs.The packet core instance assigns an IP address to a UE when the UE sets up a PDU session. +The static IP address for a specific UE is set in StaticIPConfiguration on the corresponding SIM resource.At least one of userEquipmentAddressPoolPrefix and userEquipmentStaticAddressPoolPrefix must be defined. +If both are defined, they must be of the same size. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneAccessInterfaceIpv4Address +New-AzMobileNetworkPacketCoreDataPlane +The IPv4 address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneAccessInterfaceIpv4Gateway +The default IPv4 gateway (router). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneAccessInterfaceIpv4Subnet +The IPv4 subnet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneAccessInterfaceName +The logical name for this interface. +This should match one of the interfaces configured on your Azure Stack Edge device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneDataInterfaceIpv4Address +The IPv4 address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneDataInterfaceIpv4Gateway +The default IPv4 gateway (router). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneDataInterfaceIpv4Subnet +The IPv4 subnet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPlaneDataInterfaceName +The logical name for this interface. +This should match one of the interfaces configured on your Azure Stack Edge device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/MobileNetwork/internal/New-AzMobileNetworkSite.ps1 b/src/MobileNetwork/internal/New-AzMobileNetworkSite.ps1 new file mode 100644 index 000000000000..a4f138c69de3 --- /dev/null +++ b/src/MobileNetwork/internal/New-AzMobileNetworkSite.ps1 @@ -0,0 +1,180 @@ + +# ---------------------------------------------------------------------------------- +# 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 mobile network site. +Must be created in the same location as its parent mobile network. +.Description +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Example +New-AzMobileNetworkSite -MobileNetworkName azps-mn -Name azps-mn-site -ResourceGroupName azps_test_group -Location eastus -Tag @{"site"="123"} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite +.Link +https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksite +#> +function New-AzMobileNetworkSite { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network. + ${MobileNetworkName}, + + [Parameter(Mandatory)] + [Alias('SiteName')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network site. + ${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')] + [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 DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${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-AzMobileNetworkSite_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 + } +} +} diff --git a/src/MobileNetwork/internal/ProxyCmdletDefinitions.ps1 b/src/MobileNetwork/internal/ProxyCmdletDefinitions.ps1 index f17431058359..43430e6767e8 100644 --- a/src/MobileNetwork/internal/ProxyCmdletDefinitions.ps1 +++ b/src/MobileNetwork/internal/ProxyCmdletDefinitions.ps1 @@ -124,6 +124,171 @@ end { } } +<# +.Synopsis +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Description +Creates or updates a mobile network site. +Must be created in the same location as its parent mobile network. +.Example +New-AzMobileNetworkSite -MobileNetworkName azps-mn -Name azps-mn-site -ResourceGroupName azps_test_group -Location eastus -Tag @{"site"="123"} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite +.Link +https://learn.microsoft.com/powershell/module/az.mobilenetwork/new-azmobilenetworksite +#> +function New-AzMobileNetworkSite { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.ISite])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network. + ${MobileNetworkName}, + + [Parameter(Mandatory)] + [Alias('SiteName')] + [Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Category('Path')] + [System.String] + # The name of the mobile network site. + ${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')] + [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 DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${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-AzMobileNetworkSite_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 + } +} +} + <# .Synopsis Updates an attached data network tags. @@ -280,7 +445,7 @@ Updates data network tags. .Description Updates data network tags. .Example -Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="`12"} +Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="12"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.IDataNetwork @@ -562,7 +727,7 @@ Updates packet core data planes tags. .Description Updates packet core data planes tags. .Example -Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123} +Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.IPacketCoreDataPlane diff --git a/src/MobileNetwork/internal/Update-AzMobileNetworkDataNetwork.ps1 b/src/MobileNetwork/internal/Update-AzMobileNetworkDataNetwork.ps1 index 09b2fd9845f3..9a5877c736f5 100644 --- a/src/MobileNetwork/internal/Update-AzMobileNetworkDataNetwork.ps1 +++ b/src/MobileNetwork/internal/Update-AzMobileNetworkDataNetwork.ps1 @@ -20,7 +20,7 @@ Updates data network tags. .Description Updates data network tags. .Example -Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="`12"} +Update-AzMobileNetworkDataNetwork -MobileNetworkName azps-mn -DataNetworkName azps-mn-datanetwork -ResourceGroupName azps_test_group -Tag @{"abc"="12"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.IDataNetwork diff --git a/src/MobileNetwork/internal/Update-AzMobileNetworkPacketCoreDataPlane.ps1 b/src/MobileNetwork/internal/Update-AzMobileNetworkPacketCoreDataPlane.ps1 index 556f03cd16de..48fcbd0706ef 100644 --- a/src/MobileNetwork/internal/Update-AzMobileNetworkPacketCoreDataPlane.ps1 +++ b/src/MobileNetwork/internal/Update-AzMobileNetworkPacketCoreDataPlane.ps1 @@ -20,7 +20,7 @@ Updates packet core data planes tags. .Description Updates packet core data planes tags. .Example -Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123} +Update-AzMobileNetworkPacketCoreDataPlane -PacketCoreControlPlaneName azps-mn-pccp -PacketCoreDataPlaneName azps-mn-pcdp -ResourceGroupName azps_test_group -Tag @{"abc"="123"} .Outputs Microsoft.Azure.PowerShell.Cmdlets.MobileNetwork.Models.Api20221101.IPacketCoreDataPlane