Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Az.network function1 #18966

Merged
merged 28 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4dfbe27
updated readme
kukulkarni1 Jul 15, 2022
db5b027
Added custom script for get traffic collector
kukulkarni1 Jul 18, 2022
bb8f081
readme indentation
kukulkarni1 Jul 18, 2022
d0f68f8
resolving compile issues
kukulkarni1 Jul 18, 2022
f0ebf4d
resolving compile issues
kukulkarni1 Jul 18, 2022
31f160c
removed extra file
kukulkarni1 Jul 18, 2022
ba7e6fa
renamed file
kukulkarni1 Jul 19, 2022
82e1aa6
added new collector policy cmdlet
kukulkarni1 Jul 19, 2022
e497394
solving compile issues
kukulkarni1 Jul 19, 2022
6253baa
solving compile issues
kukulkarni1 Jul 19, 2022
e424ea6
solving compile issues
kukulkarni1 Jul 19, 2022
ce56968
added new ps script
kukulkarni1 Jul 19, 2022
3cd1cf9
added new ps script
kukulkarni1 Jul 19, 2022
8302601
New cmdlet csharp script
kukulkarni1 Jul 20, 2022
d1efa74
New cmdlet csharp bug fix
kukulkarni1 Jul 20, 2022
be35ed5
change operationId in readme
kukulkarni1 Jul 21, 2022
39e45d2
Changed functions to export
kukulkarni1 Jul 21, 2022
6c2a104
removing new cmdlet
kukulkarni1 Jul 21, 2022
eccb83b
Updated swagger commit id
kukulkarni1 Jul 29, 2022
cf1fd66
added customization for location property
kukulkarni1 Aug 3, 2022
1b5568d
Adding all files after running buildmodule
kukulkarni1 Aug 3, 2022
8a0489a
updated docs and examples
kukulkarni1 Aug 3, 2022
f212db6
minor typo
kukulkarni1 Aug 3, 2022
09c0c8c
removed set cmdlet, simplified custom cmdlets
kukulkarni1 Aug 4, 2022
5f5a30d
removed set cmdlet
kukulkarni1 Aug 4, 2022
13c6c8e
Added update cmdlet
kukulkarni1 Aug 5, 2022
b4a799b
updated examples
kukulkarni1 Aug 12, 2022
dae6e1c
updating docs folder
kukulkarni1 Aug 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/NetworkFunction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ directive:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
hide: true
- where:
verb: Set
subject: (.)*(ByResourceGroup)$
hide: true
- where:
subject: (.)*(BySubscription)$
hide: true
kukulkarni1 marked this conversation as resolved.
Show resolved Hide resolved
- where:
subject: (.)*(Operation)$
hide: true

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
kukulkarni1 marked this conversation as resolved.
Show resolved Hide resolved
# 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 Azure Traffic Collector in a specified resource group
.Description
Gets the specified Azure Traffic Collector in a specified resource group
.Example
{{ Add code here }}
.Example
{{ Add code here }}
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
.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 <INetworkFunctionIdentity>: Identity Parameter
[AzureTrafficCollectorName <String>]: Azure Traffic Collector name
[CollectorPolicyName <String>]: Collector Policy Name
[Id <String>]: Resource identity path
[ResourceGroupName <String>]: The name of the resource group.
[SubscriptionId <String>]: Azure Subscription ID.
.Link
https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollector
#>
function Get-AzNetworkFunctionAzureTrafficCollector {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
[Alias('AzureTrafficCollectorName')]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
[System.String]
# Azure Traffic Collector name
${Name},

[Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='List')]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
[System.String]
# The name of the resource group.
${ResourceGroupName},

[Parameter(ParameterSetName='Get')]
[Parameter(ParameterSetName='List')]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String[]]
# Azure Subscription ID.
${SubscriptionId},

[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},

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

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

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

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

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

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

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.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 = $Host.Version.ToString()
}
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
if ($preTelemetryId -eq '') {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.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.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_Get';
GetViaIdentity = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_GetViaIdentity';
List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_List';
}
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
throw
}
}

process {
try {
$steppablePipeline.Process($_)
} catch {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
throw
}

finally {
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
}

}
end {
try {
$steppablePipeline.End()

[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
if ($preTelemetryId -eq '') {
[Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.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
}
}
}
Loading