NetworkSecurityPerimeter.Autorest/exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # 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 Gets the specified NSP access rule by name. .Description Gets the specified NSP access rule by name. .Example Get-AzNetworkSecurityPerimeterAccessRule -ProfileName profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example Get-AzNetworkSecurityPerimeterAccessRule -Name ar3 -ProfileName profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example $GETObj = Get-AzNetworkSecurityPerimeterAccessRule -Name ar3 -ProfileName profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 Get-AzNetworkSecurityPerimeterAccessRule -InputObject $GETObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PROFILEINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeteraccessrule #> function Get-AzNetworkSecurityPerimeterAccessRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityProfile', Mandatory)] [Alias('AccessRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP access rule. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('SecurityPerimeterProfileName', 'NSPProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${ProfileName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='GetViaIdentityProfile', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${ProfileInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAccessRule_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAccessRule_GetViaIdentity'; GetViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAccessRule_GetViaIdentityNetworkSecurityPerimeter'; GetViaIdentityProfile = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAccessRule_GetViaIdentityProfile'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAccessRule_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter .Description Gets the list of resources that are onboarded with NSP. These resources can be associated with a network security perimeter .Example Get-AzNetworkSecurityPerimeterAssociableResourceType -Location eastus2euap .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IPerimeterAssociableResource .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeterassociableresourcetype #> function Get-AzNetworkSecurityPerimeterAssociableResourceType { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IPerimeterAssociableResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The location of network security perimeter. ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAssociableResourceType_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the specified NSP association by name. .Description Gets the specified NSP association by name. .Example Get-AzNetworkSecurityPerimeterAssociation -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example Get-AzNetworkSecurityPerimeterAssociation -Name association3 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example $GETObj = Get-AzNetworkSecurityPerimeterAssociation -Name association3 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 Get-AzNetworkSecurityPerimeterAssociation -InputObject $GETObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeterassociation #> function Get-AzNetworkSecurityPerimeterAssociation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('AssociationName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP association. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAssociation_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAssociation_GetViaIdentity'; GetViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAssociation_GetViaIdentityNetworkSecurityPerimeter'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterAssociation_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the specified NSP linkReference resource. .Description Gets the specified NSP linkReference resource. .Example Get-AzNetworkSecurityPerimeterLinkReference -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp3 .Example Get-AzNetworkSecurityPerimeterLinkReference -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp3 -Name Ref-from-t-link1-1738a5f3-78f8-4f1b-8f30-ffe0eaa74495 .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLinkReference .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeterlinkreference #> function Get-AzNetworkSecurityPerimeterLinkReference { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLinkReference])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('LinkReferenceName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP linkReference. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLinkReference_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLinkReference_GetViaIdentity'; GetViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLinkReference_GetViaIdentityNetworkSecurityPerimeter'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLinkReference_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the specified NSP link resource. .Description Gets the specified NSP link resource. .Example Get-AzNetworkSecurityPerimeterLink -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp2 .Example Get-AzNetworkSecurityPerimeterLink -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp2 -Name t-link1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeterlink #> function Get-AzNetworkSecurityPerimeterLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('LinkName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP link. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLink_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLink_GetViaIdentity'; GetViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLink_GetViaIdentityNetworkSecurityPerimeter'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterLink_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the specified NSP profile. .Description Gets the specified NSP profile. .Example Get-AzNetworkSecurityPerimeterProfile -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example Get-AzNetworkSecurityPerimeterProfile -Name profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example $GETObj = Get-AzNetworkSecurityPerimeterProfile -Name profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 Get-AzNetworkSecurityPerimeterProfile -InputObject $GETObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeterprofile #> function Get-AzNetworkSecurityPerimeterProfile { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('ProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='GetViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterProfile_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterProfile_GetViaIdentity'; GetViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterProfile_GetViaIdentityNetworkSecurityPerimeter'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeterProfile_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Gets the specified network security perimeter by the name. .Description Gets the specified network security perimeter by the name. .Example Get-AzNetworkSecurityPerimeter -ResourceGroupName ResourceGroup-1 .Example Get-AzNetworkSecurityPerimeter .Example Get-AzNetworkSecurityPerimeter -Name nsp3 -ResourceGroupName ResourceGroup-1 .Example $GETObj = Get-AzNetworkSecurityPerimeter -Name nsp3 -ResourceGroupName ResourceGroup-1 Get-AzNetworkSecurityPerimeter -InputObject $GETObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/get-aznetworksecurityperimeter #> function Get-AzNetworkSecurityPerimeter { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'SecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.String] # SkipToken is only used if a previous operation returned a partial result. # If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. ${SkipToken}, [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Query')] [System.Int32] # An optional query parameter which specifies the maximum number of records to be returned by the server. ${Top}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Get = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeter_Get'; GetViaIdentity = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeter_GetViaIdentity'; List = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeter_List'; List1 = 'Az.NetworkSecurityPerimeter.private\Get-AzNetworkSecurityPerimeter_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 a network access rule. .Description Create a network access rule. .Example New-AzNetworkSecurityPerimeterAccessRule -Name accessRule1 -ProfileName profile2 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 -AddressPrefix '10.10.0.0/16' -Direction 'Inbound' -Location eastus2euap .Example $emails = @("test123@microsoft.com", "test321@microsoft.com") New-AzNetworkSecurityPerimeterAccessRule -Name accessRule2 -ProfileName profile2 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 -EmailAddress $emails -Direction 'Outbound' -Location eastus2euap .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <INspAccessRule>: The NSP access rule resource [Id <String>]: Resource ID. [Location <String>]: Resource location. [Tag <IResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AddressPrefix <List<String>>]: Inbound address prefixes (IPv4/IPv6) [Direction <String>]: Direction that specifies whether the access rules is inbound/outbound. [EmailAddress <List<String>>]: Outbound rules email address format. [FullyQualifiedDomainName <List<String>>]: Outbound rules fully qualified domain name format. [PhoneNumber <List<String>>]: Outbound rules phone number format. [ServiceTag <List<String>>]: Inbound rules service tag names. [Subscription <List<ISubscriptionId>>]: List of subscription ids [Id <String>]: Subscription id in the ARM id format. PROFILEINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. SUBSCRIPTION <ISubscriptionId[]>: List of subscription ids [Id <String>]: Subscription id in the ARM id format. .Link https://learn.microsoft.com/powershell/module/az.network/new-aznetworksecurityperimeteraccessrule #> function New-AzNetworkSecurityPerimeterAccessRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityProfile', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('AccessRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP access rule. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('SecurityPerimeterProfileName', 'NSPProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${ProfileName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='CreateViaIdentityProfile', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${ProfileInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityProfile', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule] # The NSP access rule resource ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [Alias('Id')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${AccessRuleId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Inbound address prefixes (IPv4/IPv6) ${AddressPrefix}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.PSArgumentCompleterAttribute("Inbound", "Outbound")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Direction that specifies whether the access rules is inbound/outbound. ${Direction}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Outbound rules email address format. ${EmailAddress}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Outbound rules fully qualified domain name format. ${FullyQualifiedDomainName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Outbound rules phone number format. ${PhoneNumber}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Inbound rules service tag names. ${ServiceTag}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.ISubscriptionId[]] # List of subscription ids ${Subscription}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Parameter(ParameterSetName='CreateViaIdentityProfileExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Create = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_Create'; CreateExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateExpanded'; CreateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentityExpanded'; CreateViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentityNetworkSecurityPerimeter'; CreateViaIdentityNetworkSecurityPerimeterExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentityNetworkSecurityPerimeterExpanded'; CreateViaIdentityProfile = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentityProfile'; CreateViaIdentityProfileExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentityProfileExpanded'; CreateViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAccessRule_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 a NSP resource association. .Description Create a NSP resource association. .Example $profileId = '/subscriptions/<SubscriptionId>/resourceGroups/ResourceGroup-1/providers/Microsoft.Network/networkSecurityPerimeters/nsp3/profiles/profile2' $privateLinkResourceId = '/subscriptions/<SubscriptionId>/resourceGroups/ResourceGroup-1/providers/Microsoft.KeyVault/vaults/rp4' New-AzNetworkSecurityPerimeterAssociation -Name association1 -SecurityPerimeterName nsp3 -ResourceGroupName ResourceGroup-1 -Location eastus2euap -AccessMode Learning -ProfileId $profileId -PrivateLinkResourceId $privateLinkResourceId .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <INspAssociation>: The NSP resource association resource [Id <String>]: Resource ID. [Location <String>]: Resource location. [Tag <IResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AccessMode <String>]: Access mode on the association. [PrivateLinkResourceId <String>]: Resource ID. [ProfileId <String>]: Resource ID. .Link https://learn.microsoft.com/powershell/module/az.network/new-aznetworksecurityperimeterassociation #> function New-AzNetworkSecurityPerimeterAssociation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('AssociationName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP association. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation] # The NSP resource association resource ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.PSArgumentCompleterAttribute("Learning", "Enforced", "Audit")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Access mode on the association. ${AccessMode}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Alias('Id')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${AssociationId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${PrivateLinkResourceId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${ProfileId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Create = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_Create'; CreateExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateExpanded'; CreateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaIdentityExpanded'; CreateViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaIdentityNetworkSecurityPerimeter'; CreateViaIdentityNetworkSecurityPerimeterExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaIdentityNetworkSecurityPerimeterExpanded'; CreateViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 NSP link resource. .Description Create NSP link resource. .Example $remoteNsp = "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/psrg_ex/providers/Microsoft.Network/networkSecurityPerimeters/nsp7" New-AzNetworkSecurityPerimeterLink -Name exlink3 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp6 -AutoApprovedRemotePerimeterResourceId $remoteNsp -LocalInboundProfile @('*') -RemoteInboundProfile @('*') .Example $remoteNsp = "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/psrg_ex/providers/Microsoft.Network/networkSecurityPerimeters/nsp7" New-AzNetworkSecurityPerimeterLink -Name exlink4 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp6 -AutoApprovedRemotePerimeterResourceId $remoteNsp -LocalInboundProfile @('*') -RemoteInboundProfile @('*') .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <INspLink>: The network security perimeter link resource [AutoApprovedRemotePerimeterResourceId <String>]: Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource. [Description <String>]: A message passed to the owner of the remote NSP link resource with this connection request. In case of Auto-approved flow, it is default to 'Auto Approved'. Restricted to 140 chars. [LocalInboundProfile <List<String>>]: Local Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. [RemoteInboundProfile <List<String>>]: Remote Inbound profile names to which Inbound is allowed. Use ['*'] to allow inbound to all profiles. This property can only be updated in auto-approval mode. .Link https://learn.microsoft.com/powershell/module/az.network/new-aznetworksecurityperimeterlink #> function New-AzNetworkSecurityPerimeterLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('LinkName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP link. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink] # The network security perimeter link resource ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Perimeter ARM Id for the remote NSP with which the link gets created in Auto-approval mode. # It should be used when the NSP admin have Microsoft.Network/networkSecurityPerimeters/linkPerimeter/action permission on the remote NSP resource. ${AutoApprovedRemotePerimeterResourceId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # A message passed to the owner of the remote NSP link resource with this connection request. # In case of Auto-approved flow, it is default to 'Auto Approved'. # Restricted to 140 chars. ${Description}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Local Inbound profile names to which Inbound is allowed. # Use ['*'] to allow inbound to all profiles. ${LocalInboundProfile}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Remote Inbound profile names to which Inbound is allowed. # Use ['*'] to allow inbound to all profiles. # This property can only be updated in auto-approval mode. ${RemoteInboundProfile}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Create = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_Create'; CreateExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateExpanded'; CreateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaIdentityExpanded'; CreateViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaIdentityNetworkSecurityPerimeter'; CreateViaIdentityNetworkSecurityPerimeterExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaIdentityNetworkSecurityPerimeterExpanded'; CreateViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 a network profile. .Description Create a network profile. .Example New-AzNetworkSecurityPerimeterProfile -Name profile1 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Example New-AzNetworkSecurityPerimeterProfile -Name profile2 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <INspProfile>: The network security perimeter profile resource [Id <String>]: Resource ID. [Location <String>]: Resource location. [Tag <IResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.network/new-aznetworksecurityperimeterprofile #> function New-AzNetworkSecurityPerimeterProfile { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('ProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspProfile] # The network security perimeter profile resource ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Alias('Id')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${ProfileId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityNetworkSecurityPerimeterExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Create = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_Create'; CreateExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateExpanded'; CreateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateViaIdentityExpanded'; CreateViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateViaIdentityNetworkSecurityPerimeter'; CreateViaIdentityNetworkSecurityPerimeterExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateViaIdentityNetworkSecurityPerimeterExpanded'; CreateViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterProfile_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 a Network Security Perimeter. .Description Create a Network Security Perimeter. .Example New-AzNetworkSecurityPerimeter -ResourceGroupName ResourceGroup-1 -Name nsp1 -Location eastus2euap .Example New-AzNetworkSecurityPerimeter -ResourceGroupName ResourceGroup-1 -Name nsp2 -Location eastus2euap .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <INetworkSecurityPerimeter>: The Network Security Perimeter resource [Id <String>]: Resource ID. [Location <String>]: Resource location. [Tag <IResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.network/new-aznetworksecurityperimeter #> function New-AzNetworkSecurityPerimeter { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'SecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${Name}, [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter] # The Network Security Perimeter resource ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Alias('Id')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Resource ID. ${SecurityPerimeterId}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Create = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeter_Create'; CreateExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeter_CreateExpanded'; CreateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeter_CreateViaIdentityExpanded'; CreateViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeter_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeter_CreateViaJsonString'; } if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes an NSP access rule. .Description Deletes an NSP access rule. .Example Remove-AzNetworkSecurityPerimeterAccessRule -Name ar5 -ProfileName profile4 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 .Example $accessRuleObj = Get-AzNetworkSecurityPerimeterAccessRule -Name ar6 -ProfileName profile4 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 Remove-AzNetworkSecurityPerimeterAccessRule -InputObject $accessRuleObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PROFILEINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeteraccessrule #> function Remove-AzNetworkSecurityPerimeterAccessRule { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityProfile', Mandatory)] [Alias('AccessRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP access rule. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('SecurityPerimeterProfileName', 'NSPProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${ProfileName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter(ParameterSetName='DeleteViaIdentityProfile', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${ProfileInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAccessRule_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAccessRule_DeleteViaIdentity'; DeleteViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAccessRule_DeleteViaIdentityNetworkSecurityPerimeter'; DeleteViaIdentityProfile = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAccessRule_DeleteViaIdentityProfile'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes an NSP association resource. .Description Deletes an NSP association resource. .Example Remove-AzNetworkSecurityPerimeterAssociation -Name association4 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 .Example $associationObj = Get-AzNetworkSecurityPerimeterAssociation -Name association5 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 Remove-AzNetworkSecurityPerimeterAssociation -InputObject $associationObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeterassociation #> function Remove-AzNetworkSecurityPerimeterAssociation { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('AssociationName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP association. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAssociation_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAssociation_DeleteViaIdentity'; DeleteViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterAssociation_DeleteViaIdentityNetworkSecurityPerimeter'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes an NSP LinkReference resource. .Description Deletes an NSP LinkReference resource. .Example Remove-AzNetworkSecurityPerimeterLinkReference -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp3 -Name Ref-from-t-link1-1738a5f3-78f8-4f1b-8f30-ffe0eaa74495 .Example $linkRefObj = Get-AzNetworkSecurityPerimeterLinkReference -ResourceGroupName psrg_Ex -SecurityPerimeterName ext-nsp11 -Name Ref-from-t-linkD4-902f9e36-84c2-43d6-983d-677f70568a30 Remove-AzNetworkSecurityPerimeterLinkReference -InputObject $linkRefObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeterlinkreference #> function Remove-AzNetworkSecurityPerimeterLinkReference { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('LinkReferenceName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP linkReference. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLinkReference_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLinkReference_DeleteViaIdentity'; DeleteViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLinkReference_DeleteViaIdentityNetworkSecurityPerimeter'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes an NSP Link resource. .Description Deletes an NSP Link resource. .Example Remove-AzNetworkSecurityPerimeterLink -Name t-linkD3 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp8 .Example $linkObj = Get-AzNetworkSecurityPerimeterLink -Name t-linkD4 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp10 Remove-AzNetworkSecurityPerimeterLink -InputObject $linkObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeterlink #> function Remove-AzNetworkSecurityPerimeterLink { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('LinkName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP link. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLink_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLink_DeleteViaIdentity'; DeleteViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterLink_DeleteViaIdentityNetworkSecurityPerimeter'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes an NSP profile. .Description Deletes an NSP profile. .Example Remove-AzNetworkSecurityPerimeterProfile -Name profile6 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 .Example $profileObj = Get-AzNetworkSecurityPerimeterProfile -Name profile7 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp4 Remove-AzNetworkSecurityPerimeterProfile -InputObject $profileObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. NETWORKSECURITYPERIMETERINPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeterprofile #> function Remove-AzNetworkSecurityPerimeterProfile { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory)] [Alias('ProfileName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the NSP profile. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${SecurityPerimeterName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityNetworkSecurityPerimeter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${NetworkSecurityPerimeterInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterProfile_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterProfile_DeleteViaIdentity'; DeleteViaIdentityNetworkSecurityPerimeter = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeterProfile_DeleteViaIdentityNetworkSecurityPerimeter'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Deletes a network security perimeter. .Description Deletes a network security perimeter. .Example Remove-AzNetworkSecurityPerimeter -Name nsp5 -ResourceGroupName ResourceGroup-1 .Example $nspObj = Get-AzNetworkSecurityPerimeter -Name nsp6 -ResourceGroupName ResourceGroup-1 Remove-AzNetworkSecurityPerimeter -InputObject $nspObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/remove-aznetworksecurityperimeter #> function Remove-AzNetworkSecurityPerimeter { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'SecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Delete = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeter_Delete'; DeleteViaIdentity = 'Az.NetworkSecurityPerimeter.private\Remove-AzNetworkSecurityPerimeter_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Patch Tags for a Network Security Perimeter. .Description Patch Tags for a Network Security Perimeter. .Example Update-AzNetworkSecurityPerimeter -Name nsp3 -ResourceGroupName ResourceGroup-1 .Example $GETObj = Get-AzNetworkSecurityPerimeter -Name nsp3 -ResourceGroupName ResourceGroup-1 Update-AzNetworkSecurityPerimeter -InputObject $GETObj .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IUpdateTagsRequest .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity Parameter [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. PARAMETER <IUpdateTagsRequest>: Update tags request. [Tag <IUpdateTagsRequestTags>]: List of tags for Network Security Perimeter [(Any) <String>]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.network/update-aznetworksecurityperimeter #> function Update-AzNetworkSecurityPerimeter { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeter])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Patch', Mandatory)] [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Parameter(ParameterSetName='PatchViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='PatchViaJsonString', Mandatory)] [Alias('NetworkSecurityPerimeterName', 'SecurityPerimeterName', 'NSPName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter. ${Name}, [Parameter(ParameterSetName='Patch', Mandatory)] [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Parameter(ParameterSetName='PatchViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='PatchViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. ${ResourceGroupName}, [Parameter(ParameterSetName='Patch')] [Parameter(ParameterSetName='PatchExpanded')] [Parameter(ParameterSetName='PatchViaJsonFilePath')] [Parameter(ParameterSetName='PatchViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription credentials which uniquely identify the Microsoft Azure subscription. # The subscription ID forms part of the URI for every service call. ${SubscriptionId}, [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IUpdateTagsRequest] # Update tags request. ${Parameter}, [Parameter(ParameterSetName='PatchExpanded')] [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IUpdateTagsRequestTags]))] [System.Collections.Hashtable] # List of tags for Network Security Perimeter ${Tag}, [Parameter(ParameterSetName='PatchViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Path of Json file supplied to the Patch operation ${JsonFilePath}, [Parameter(ParameterSetName='PatchViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Json string supplied to the Patch operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ Patch = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_Patch'; PatchExpanded = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_PatchExpanded'; PatchViaIdentity = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_PatchViaIdentity'; PatchViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_PatchViaIdentityExpanded'; PatchViaJsonFilePath = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_PatchViaJsonFilePath'; PatchViaJsonString = 'Az.NetworkSecurityPerimeter.private\Update-AzNetworkSecurityPerimeter_PatchViaJsonString'; } if (('Patch', 'PatchExpanded', 'PatchViaJsonFilePath', 'PatchViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Updates an access rule. .Description Updates an access rule. .Example Update-AzNetworkSecurityPerimeterAccessRule -Name ar3 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 -ProfileName profile1 -AddressPrefix @('10.10.0.0/17') .Example $GETObj = Get-AzNetworkSecurityPerimeterAccessRule -Name ar3 -ResourceGroupName ResourceGroup-1 -SecurityPerimeterName nsp3 -ProfileName profile1 Update-AzNetworkSecurityPerimeterAccessRule -InputObject $GETObj -AddressPrefix @('10.0.0.0/16') .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. SUBSCRIPTION <ISubscriptionId[]>: Subscription ids [Id <String>]: Subscription id in the ARM id format. .Link https://learn.microsoft.com/powershell/module/az.network/update-aznetworksecurityperimeteraccessrule #> function Update-AzNetworkSecurityPerimeterAccessRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAccessRule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('AccessRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the access rule. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('NetworkSecurityPerimeterName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter ${SecurityPerimeterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the profile ${ProfileName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity parameter. # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Location of the resource ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Address Prefix ${AddressPrefix}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Fully qualified domain name ${FullyQualifiedDomainName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Email Addresses ${EmailAddress}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Phone Numbers ${PhoneNumber}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Service Tags ${ServiceTag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Direction ${Direction}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.ISubscriptionId[]] # Subscription ids ${Subscription}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ UpdateExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterAccessRule'; UpdateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterAccessRule'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Updates an association .Description Updates an association. .Example Update-AzNetworkSecurityPerimeterAssociation -Name association1 -SecurityPerimeterName nsp3 -ResourceGroupName ResourceGroup-1 -AccessMode Enforced .Example $GETObj = Get-AzNetworkSecurityPerimeterAssociation -Name association1 -SecurityPerimeterName nsp3 -ResourceGroupName ResourceGroup-1 Update-AzNetworkSecurityPerimeterAssociation -InputObject $GETObj -AccessMode Learning .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/update-aznetworksecurityperimeterassociation #> function Update-AzNetworkSecurityPerimeterAssociation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspAssociation])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('AssociationName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the association. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('NetworkSecurityPerimeterName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter ${SecurityPerimeterName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity parameter. # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Location of the resource ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Access Mode ${AccessMode}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Private link resource id ${PrivateLinkResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Network security perimeter profile id ${ProfileId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ UpdateExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterAssociation'; UpdateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterAssociation'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 Updates a NSP Link .Description Updates a NSP Link .Example Update-AzNetworkSecurityPerimeterLink -Name t-link2 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp4 -LocalInboundProfile @('*') -RemoteInboundProfile @('*') .Example $getLinkObj = Get-AzNetworkSecurityPerimeterLink -Name t-link2 -ResourceGroupName psrg_ex -SecurityPerimeterName ext-nsp4 Update-AzNetworkSecurityPerimeterLink -InputObject $getLinkObj -LocalInboundProfile @('*') .Inputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. INPUTOBJECT <INetworkSecurityPerimeterIdentity>: Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AccessRuleName <String>]: The name of the NSP access rule. [AssociationName <String>]: The name of the NSP association. [Id <String>]: Resource identity path [LinkName <String>]: The name of the NSP link. [LinkReferenceName <String>]: The name of the NSP linkReference. [Location <String>]: The location of network security perimeter. [NetworkSecurityPerimeterName <String>]: The name of the network security perimeter. [ProfileName <String>]: The name of the NSP profile. [ResourceGroupName <String>]: The name of the resource group. [SubscriptionId <String>]: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. .Link https://learn.microsoft.com/powershell/module/az.network/update-aznetworksecurityperimeterlink #> function Update-AzNetworkSecurityPerimeterLink { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INspLink])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('LinkName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the Link. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Alias('NetworkSecurityPerimeterName')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [System.String] # The name of the network security perimeter ${SecurityPerimeterName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.INetworkSecurityPerimeterIdentity] # Identity parameter. # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Models.IResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Location of the resource ${Location}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String] # Auto approved remote perimeter resource id ${AutoApprovedRemotePerimeterResourceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Local inbound profiles ${LocalInboundProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] # Remote inbound profiles ${RemoteInboundProfile}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.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.NetworkSecurityPerimeter.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 = @{ UpdateExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterLink'; UpdateViaIdentityExpanded = 'Az.NetworkSecurityPerimeter.custom\Update-AzNetworkSecurityPerimeterLink'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) } $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.NetworkSecurityPerimeter.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 } } } # SIG # Begin signature block # MIInwQYJKoZIhvcNAQcCoIInsjCCJ64CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCXqpFo9EPGS3AX # 6ZunoC975GAnCB5jU6ZCg35TTR4MP6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA # DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA # hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG # 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBjXGlYJcUj6RAzXyeNAN # xSpKXAGd7Fh+ocGHPPphcD9LQTOJgG7Y7aYztHqBLJiQQ4eAgZNU4ac6+8LnEGAL # go1ydC5BJEuJQjYKbNTy959HrKSu7LO3Ws0w8jw6pYdC1IMpdTkk2puTgY2PDNzB # tLM4evG7FYer3WX+8t1UMYNTAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQURxxxNPIEPGSO8kqz+bgCAQWGXsEw # RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW # MBQGA1UEBRMNMjMwMDEyKzUwMTgyNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci # tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG # CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 # MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAISxFt/zR2frTFPB45Yd # mhZpB2nNJoOoi+qlgcTlnO4QwlYN1w/vYwbDy/oFJolD5r6FMJd0RGcgEM8q9TgQ # 2OC7gQEmhweVJ7yuKJlQBH7P7Pg5RiqgV3cSonJ+OM4kFHbP3gPLiyzssSQdRuPY # 1mIWoGg9i7Y4ZC8ST7WhpSyc0pns2XsUe1XsIjaUcGu7zd7gg97eCUiLRdVklPmp # XobH9CEAWakRUGNICYN2AgjhRTC4j3KJfqMkU04R6Toyh4/Toswm1uoDcGr5laYn # TfcX3u5WnJqJLhuPe8Uj9kGAOcyo0O1mNwDa+LhFEzB6CB32+wfJMumfr6degvLT # e8x55urQLeTjimBQgS49BSUkhFN7ois3cZyNpnrMca5AZaC7pLI72vuqSsSlLalG # OcZmPHZGYJqZ0BacN274OZ80Q8B11iNokns9Od348bMb5Z4fihxaBWebl8kWEi2O # PvQImOAeq3nt7UWJBzJYLAGEpfasaA3ZQgIcEXdD+uwo6ymMzDY6UamFOfYqYWXk # ntxDGu7ngD2ugKUuccYKJJRiiz+LAUcj90BVcSHRLQop9N8zoALr/1sJuwPrVAtx # HNEgSW+AKBqIxYWM4Ev32l6agSUAezLMbq5f3d8x9qzT031jMDT+sUAoCw0M5wVt # CUQcqINPuYjbS1WgJyZIiEkBMIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq # hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 # IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG # EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG # A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg # Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC # CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 # a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr # rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg # OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy # 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 # sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh # dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k # A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB # w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn # Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 # lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w # ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o # ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa # BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG # AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV # HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG # AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl # AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb # C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l # hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 # I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 # wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 # STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam # ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa # J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah # XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA # 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt # Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr # /Xmfwb1tbWrJUnMTDXpQzTGCGaEwghmdAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAAOvMEAOTKNNBUEAAAAAA68wDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEILoKb94wp5Rk0ARtVGf5vKpO # eAyItSuLzLrAkH/7+DwJMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEAPWM79ZM9MTQArBu55PNHA42jaWRIkp0z4wr6uNXYdfNs7sEDLHjcp4oB # DlhSE+CELJNh9GGp4E1l+7PwstxtNLM4MqIm5iP6S1UwNEEbAhfgIeAvFEtDiA5v # UVcIkHmNE0oR7CYr21k0W1ExSNFRQzyCujd4aVYM4bgwDDjata2PTVhXppugzHaQ # V3C9Z9v+OKIQSmI41KlZPEBzPX/fGfTVgu8oE8AvUrPgfPNm0jcj1DQAvzxTaM5X # 6XlBn01gxfjuOoi85EuOrMOnt84vgXljM8ptTBAkEL6y9bQ6q4JO8JJwu33NNFq9 # KIrk19Vem6BuhF2Fi0RNPi9lwqhOcKGCFyswghcnBgorBgEEAYI3AwMBMYIXFzCC # FxMGCSqGSIb3DQEHAqCCFwQwghcAAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFYBgsq # hkiG9w0BCRABBKCCAUcEggFDMIIBPwIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCCcUhuIuITURVmwCW1Ep7ufw3AraQyEM8DsQ/HJoI8pgAIGZldeO3r9 # GBIyMDI0MDYxODEwMTkzOS41MlowBIACAfSggdikgdUwgdIxCzAJBgNVBAYTAlVT # MRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQK # ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVs # YW5kIE9wZXJhdGlvbnMgTGltaXRlZDEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046 # RDA4Mi00QkZELUVFQkExJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNl # cnZpY2WgghF7MIIHJzCCBQ+gAwIBAgITMwAAAdzB4IzCX1hejgABAAAB3DANBgkq # hkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQ # MA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9u # MSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAeFw0yMzEw # MTIxOTA3MDZaFw0yNTAxMTAxOTA3MDZaMIHSMQswCQYDVQQGEwJVUzETMBEGA1UE # CBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9z # b2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJlbGFuZCBPcGVy # YXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNOOkQwODItNEJG # RC1FRUJBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNlMIIC # IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAi8izIDWyOD2RIonN6WtRYXlK # GphYvzdqafdITknIhU9QLsXqpNwumGEdn2J1/bV/RFoatTwQfJ0Xw3E8xHYpU2IC # 0IY8lryRXUIa+fdt4YHabaW2aolqcbvWYDLCuQoBNieLAos9AsnTQSRfDlNLB+Yl # dt2BAsWUfJ8DkqD6lSwlfOq6aQi8SvQNc++m0AaqR0UsrCjgFOUSCe/N5N9e6TNf # y9C1MAt9Um5NSBFTvOg/9EVa3dZqBqFnpSWgjQULxeUFANUNfkl4wSzHuOAkN0Sc # rjhjyAe4RZEOr5Ib1ejQYg6OK5NYPm6/e+USYgDJH/utIW9wufACox2pzL+KpA8y # UM5x3QBueI/yJrUFARSd9lPdTHIr2ssH9JGIo/IcOWDyhbBfKK/f5sYHp2Z0zrW6 # vqdS18N/nWU9wqErhWjzek4TX+eJaVWcQdBX00nn8NtRKpbZGpNRrY7Yq6+zJEYw # SCMYkDXb9KqtGqW8TZ+I3lmZlW2pI9ZohqzHtrQYH591PD6B5GfoyjZLr79tkTBL # /QgnmBwoaKc1t/JDXGu9Zc+1fMo5+OSHvmJG5ei6sZU9GqSbPlRjP5HnJswlaP6Z # 9warPaFdXyJmcJkMGuudmK+cSsIyHkWV+Dzj3qlPSmGNRMfYYKEci8ThINKTaHBY # /+4cH2ASzyn/097+a30CAwEAAaOCAUkwggFFMB0GA1UdDgQWBBToc9IF3Q58Rfe4 # 1ax2RKtpQZ7d2zAfBgNVHSMEGDAWgBSfpxVdAF5iXYP05dJlpxtTNRnpcjBfBgNV # HR8EWDBWMFSgUqBQhk5odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2Ny # bC9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAxMCgxKS5jcmwwbAYI # KwYBBQUHAQEEYDBeMFwGCCsGAQUFBzAChlBodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAy # MDEwKDEpLmNydDAMBgNVHRMBAf8EAjAAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMI # MA4GA1UdDwEB/wQEAwIHgDANBgkqhkiG9w0BAQsFAAOCAgEA2etvwTCvx5f8fWwq # 3eufBMPHgCqAduQw1Cj6RQbAIg1dLfLUZRx2qwr9HWDpN/u03HWrQ2kqTUlO6lQl # 8d0TEq2S6EcD7zaVPvIhKn9jvh2onTdEJPhD7yihBdMzPGJ7B8StUu3xZ595udxJ # PSLrKkq/zukJiTEzbhtupsz9X4zlUGmkJSztH5wROLP/MQDUBtkv++Je0eavIDQI # Z34+31z5p2xh+bup7lQydLR/9gmYQQyQSoZcLPIsr52H5SwWLR3iWR1wT5mrkk2M # gd6xfXDO0ZUC29fQNgNl03ZZnWST6E4xuVRX8vyfVhbOE//ldCdiXTcB9cSuf7UR # q3KWJ/N3cKEnXG4YbvphtaCJFecO8KLAOq9Ql69VFjWrLjLi+VUppKG1t1+A/IZ5 # 4n9hxIE405zQM1NZuMxsvnSp4gQLSUdKkvatFg1W7eGwfMbyfm7kJBqM/DH0/Omx # kh4VM0fJUXqS6MjhWj0287/MXw63jggyPgztRf1lrhDAZ/kHvXHns6NpfneDFPi/ # Oge8QFcX2oKYdGBcEttGiYl8OfrRqXO/t2kJVAi5DTrafIhkqexfHO4oVvRONdbD # o4WkbVuyNek6jkMweTKyuJvEeivhjPl1mNXIcA3IqjRtKsCVV6KFxobkXvhJlPwW # 3IcBboiAtznD/cP5HWhsOEpnbVYwggdxMIIFWaADAgECAhMzAAAAFcXna54Cm0mZ # AAAAAAAVMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK # V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0 # IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0 # ZSBBdXRob3JpdHkgMjAxMDAeFw0yMTA5MzAxODIyMjVaFw0zMDA5MzAxODMyMjVa # MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS # ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT # HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMIICIjANBgkqhkiG9w0BAQEF # AAOCAg8AMIICCgKCAgEA5OGmTOe0ciELeaLL1yR5vQ7VgtP97pwHB9KpbE51yMo1 # V/YBf2xK4OK9uT4XYDP/XE/HZveVU3Fa4n5KWv64NmeFRiMMtY0Tz3cywBAY6GB9 # alKDRLemjkZrBxTzxXb1hlDcwUTIcVxRMTegCjhuje3XD9gmU3w5YQJ6xKr9cmmv # Haus9ja+NSZk2pg7uhp7M62AW36MEBydUv626GIl3GoPz130/o5Tz9bshVZN7928 # jaTjkY+yOSxRnOlwaQ3KNi1wjjHINSi947SHJMPgyY9+tVSP3PoFVZhtaDuaRr3t # pK56KTesy+uDRedGbsoy1cCGMFxPLOJiss254o2I5JasAUq7vnGpF1tnYN74kpEe # HT39IM9zfUGaRnXNxF803RKJ1v2lIH1+/NmeRd+2ci/bfV+AutuqfjbsNkz2K26o # ElHovwUDo9Fzpk03dJQcNIIP8BDyt0cY7afomXw/TNuvXsLz1dhzPUNOwTM5TI4C # vEJoLhDqhFFG4tG9ahhaYQFzymeiXtcodgLiMxhy16cg8ML6EgrXY28MyTZki1ug # poMhXV8wdJGUlNi5UPkLiWHzNgY1GIRH29wb0f2y1BzFa/ZcUlFdEtsluq9QBXps # xREdcu+N+VLEhReTwDwV2xo3xwgVGD94q0W29R6HXtqPnhZyacaue7e3PmriLq0C # AwEAAaOCAd0wggHZMBIGCSsGAQQBgjcVAQQFAgMBAAEwIwYJKwYBBAGCNxUCBBYE # FCqnUv5kxJq+gpE8RjUpzxD/LwTuMB0GA1UdDgQWBBSfpxVdAF5iXYP05dJlpxtT # NRnpcjBcBgNVHSAEVTBTMFEGDCsGAQQBgjdMg30BATBBMD8GCCsGAQUFBwIBFjNo # dHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL0RvY3MvUmVwb3NpdG9yeS5o # dG0wEwYDVR0lBAwwCgYIKwYBBQUHAwgwGQYJKwYBBAGCNxQCBAweCgBTAHUAYgBD # AEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZW # y4/oolxiaNE9lJBb186aGMQwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDovL2NybC5t # aWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAt # MDYtMjMuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0y # My5jcnQwDQYJKoZIhvcNAQELBQADggIBAJ1VffwqreEsH2cBMSRb4Z5yS/ypb+pc # FLY+TkdkeLEGk5c9MTO1OdfCcTY/2mRsfNB1OW27DzHkwo/7bNGhlBgi7ulmZzpT # Td2YurYeeNg2LpypglYAA7AFvonoaeC6Ce5732pvvinLbtg/SHUB2RjebYIM9W0j # VOR4U3UkV7ndn/OOPcbzaN9l9qRWqveVtihVJ9AkvUCgvxm2EhIRXT0n4ECWOKz3 # +SmJw7wXsFSFQrP8DJ6LGYnn8AtqgcKBGUIZUnWKNsIdw2FzLixre24/LAl4FOmR # sqlb30mjdAy87JGA0j3mSj5mO0+7hvoyGtmW9I/2kQH2zsZ0/fZMcm8Qq3UwxTSw # ethQ/gpY3UA8x1RtnWN0SCyxTkctwRQEcb9k+SS+c23Kjgm9swFXSVRk2XPXfx5b # RAGOWhmRaw2fpCjcZxkoJLo4S5pu+yFUa2pFEUep8beuyOiJXk+d0tBMdrVXVAmx # aQFEfnyhYWxz/gq77EFmPWn9y8FBSX5+k77L+DvktxW/tM4+pTFRhLy/AsGConsX # HRWJjXD+57XQKBqJC4822rpM+Zv/Cuk0+CQ1ZyvgDbjmjJnW4SLq8CdCPSWU5nR0 # W2rRnj7tfqAxM328y+l7vzhwRNGQ8cirOoo6CGJ/2XBjU02N7oJtpQUQwXEGahC0 # HVUzWLOhcGbyoYIC1zCCAkACAQEwggEAoYHYpIHVMIHSMQswCQYDVQQGEwJVUzET # MBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMV # TWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJlbGFu # ZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNOOkQw # ODItNEJGRC1FRUJBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2 # aWNloiMKAQEwBwYFKw4DAhoDFQAcOf9zP7fJGQhQIl9Jsvd2OdASpqCBgzCBgKR+ # MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS # ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT # HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMA0GCSqGSIb3DQEBBQUAAgUA # 6huQDTAiGA8yMDI0MDYxODEyNDgxM1oYDzIwMjQwNjE5MTI0ODEzWjB3MD0GCisG # AQQBhFkKBAExLzAtMAoCBQDqG5ANAgEAMAoCAQACAhR6AgH/MAcCAQACAj7cMAoC # BQDqHOGNAgEAMDYGCisGAQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEA # AgMHoSChCjAIAgEAAgMBhqAwDQYJKoZIhvcNAQEFBQADgYEAWIXmV1VImBuUbEI6 # kvhrmBH1S3po5mgu3FRXHMX5ihZC7LFBe6ctVcXK2u/Trrndc7fIK+4qIkhFFBRN # 9yz7+V223JvtpqWy5KfYMylQeVfqFp7uF/lV3uAjeBzu6loo7YbPLu/xd0H4bHJf # /IYEaWAxA2c8nSBTPsR38geSMw4xggQNMIIECQIBATCBkzB8MQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGlt # ZS1TdGFtcCBQQ0EgMjAxMAITMwAAAdzB4IzCX1hejgABAAAB3DANBglghkgBZQME # AgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMC8GCSqGSIb3DQEJ # BDEiBCDkKlogs8MG+/Hlsw/56QmDsY5wEqv92pQUoYQ0osQepTCB+gYLKoZIhvcN # AQkQAi8xgeowgecwgeQwgb0EIFOnF4pq2UQ/jLypnOO5YvQ67QirEQsOFfZMvKXE # gg03MIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAHc # weCMwl9YXo4AAQAAAdwwIgQgb73jM4wEg7tapihAEeGKVycAGRg95azu6AUfzcnl # Z3cwDQYJKoZIhvcNAQELBQAEggIAZx+oqQt6jRPBT1WqtRNlk0jkZXmGfAdpTGsU # Z46xqjM6MrYC4z3rBZ2dM/FTKqWOdQOm1brH8c2EnXXI1YZiaH860C14iCYFd9ER # f63ehzU6dLkEqpASQ8mpl05sSzkUVi/I6zkQFrAdB1OZD9PWSqraU6Lvu5W0Lchi # MQ9DmLj/adh7HOpe+InbV76Fa5bfm/4x812wZ0Lc0oFj/HEO6eq/6vWEr76h7pG9 # 0IzhcOJpcYPinz0XnTvC+Qor1HcD17nSKL9vvVOsRkhxyw8xegZx5Guct1CQ72WX # MGnHslqhF/8VgeFYHiFgzhfTBJMIHgh+b5Uya+wPypwtSaC4aZ4z3YAS5gkwU/wW # 3DH0Y2abmik14URD6rLKllDRnj59KyMlp4rsxI1JKoT/CLu9Jldz4tlYc87eh8Ev # /pff9ACVzTc6Duskaa05gwggnIzsK3OkBuDQM10Sg19hZ9DPQETAuskt4/s33Ajf # 29igPJKGwflWkc05xogIXrc+CZaWSVFsT0GNOcRwQ3IiXrw2TYrx6MHvI8NuJas2 # bL9Bh4NfD3mFUz1qLkLeekUy/5hZgw5m0ajJ+WfY73krhDzOc2RmpLF5+tSSFiri # ZB0q5w5x4ysizHiVG2EM2MkLv7oqL63CE0vgD6VPKnfx62YXMq+p9N10ADrPFRPZ # km9baHI= # SIG # End signature block |