diff --git a/src/NetworkFunction/.gitignore b/src/NetworkFunction/.gitignore index 6d872dc2faaf..3c3d57339c8b 100644 --- a/src/NetworkFunction/.gitignore +++ b/src/NetworkFunction/.gitignore @@ -1,5 +1,16 @@ bin obj .vs +generated +internal +exports tools +custom/*.psm1 +custom/autogen-model-cmdlets test/*-TestResults.xml +/*.ps1 +/*.ps1xml +/*.psm1 +/*.snk +/*.csproj +/*.nuspec \ No newline at end of file diff --git a/src/NetworkFunction/Az.NetworkFunction.psd1 b/src/NetworkFunction/Az.NetworkFunction.psd1 index b8646ac0f8dc..c6b7e698622f 100644 --- a/src/NetworkFunction/Az.NetworkFunction.psd1 +++ b/src/NetworkFunction/Az.NetworkFunction.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.NetworkFunction.private.dll' FormatsToProcess = './Az.NetworkFunction.format.ps1xml' - FunctionsToExport = 'Get-AzNetworkFunctionOperation', 'Get-AzNetworkFunctionTrafficCollector', 'Get-AzNetworkFunctionTrafficCollectorPolicy', 'New-AzNetworkFunctionTrafficCollector', 'New-AzNetworkFunctionTrafficCollectorPolicy', 'Remove-AzNetworkFunctionTrafficCollector', 'Remove-AzNetworkFunctionTrafficCollectorPolicy', 'Set-AzNetworkFunctionTrafficCollector', 'Set-AzNetworkFunctionTrafficCollectorPolicy', 'Update-AzNetworkFunctionTrafficCollectorTag', '*' + FunctionsToExport = 'Get-AzNetworkFunctionCollectorPolicy', 'Get-AzNetworkFunctionTrafficCollector', 'New-AzNetworkFunctionCollectorPolicy', 'New-AzNetworkFunctionTrafficCollector', 'Remove-AzNetworkFunctionCollectorPolicy', 'Remove-AzNetworkFunctionTrafficCollector', 'Update-AzNetworkFunctionTrafficCollectorTag', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/NetworkFunction/README.md b/src/NetworkFunction/README.md index 788177a26ba1..d3c0e6c76f5f 100644 --- a/src/NetworkFunction/README.md +++ b/src/NetworkFunction/README.md @@ -16,6 +16,12 @@ This directory contains the PowerShell module for the Az.NetworkFunction service ## Detail This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + ## Development For information on how to develop for `Az.NetworkFunction`, see [how-to.md](how-to.md). @@ -24,11 +30,11 @@ For information on how to develop for `Az.NetworkFunction`, see [how-to.md](how- > see https://aka.ms/autorest ``` yaml -branch: 2f47130d8fb333f55596ca9d149fbdceaff6f4be +branch: 1cefdabe75c75323c6d3def3f6c80850c624bdea require: - $(this-folder)/../readme.azure.noprofile.md input-file: - - $(repo)/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/AzureTrafficCollector.json + - $(repo)/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-08-01/AzureTrafficCollector.json module-version: 0.1.0 title: NetworkFunction subject-prefix: $(service-name) @@ -37,10 +43,20 @@ resourcegroup-append: true nested-object-to-string: true directive: + - where: + subject: ^AzureTrafficCollector(.*) + set: + subject: TrafficCollector$1 - where: variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ hide: true + - from: swagger-document + where: $.paths..operationId + transform: return $.replace(/^(AzureTrafficCollectors)(.+)(_List)$/, "$1$3$2") + - where: + subject: (.)*(Operation)$ + hide: true - where: - verb: Set + verb: New|Set hide: true -``` \ No newline at end of file +``` diff --git a/src/NetworkFunction/custom/New-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/custom/New-AzNetworkFunctionCollectorPolicy.ps1 new file mode 100644 index 000000000000..148bbf160da6 --- /dev/null +++ b/src/NetworkFunction/custom/New-AzNetworkFunctionCollectorPolicy.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates a Collector Policy resource +.Description +Creates or updates a Collector Policy resource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy +.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. + +EMISSIONPOLICY : Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. + +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. +.Link +https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy +#> +function New-AzNetworkFunctionCollectorPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Azure Traffic Collector name + ${AzureTrafficCollectorName}, + + [Parameter(Mandatory)] + [Alias('CollectorPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # The name of the resource group. + ${ResourceGroupName}, + + [Parameter()] + [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()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IEmissionPoliciesPropertiesFormat[]] + # Emission policies. + # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + ${EmissionPolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IIngestionSourcesPropertiesFormat[]] + # Ingestion Sources. + # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + ${IngestionPolicyIngestionSource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] + # The ingestion type. + ${IngestionPolicyIngestionType}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [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} +) + +process { + try { + Az.NetworkFunction.internal\New-AzNetworkFunctionCollectorPolicy @PSBoundParameters + } catch { + throw + } +} +} diff --git a/src/NetworkFunction/custom/New-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/custom/New-AzNetworkFunctionTrafficCollector.ps1 new file mode 100644 index 000000000000..17137be71a3c --- /dev/null +++ b/src/NetworkFunction/custom/New-AzNetworkFunctionTrafficCollector.ps1 @@ -0,0 +1,166 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates a Azure Traffic Collector resource +.Description +Creates or updates a Azure Traffic Collector resource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.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. + +COLLECTORPOLICY : Collector Policies for Azure Traffic Collector. + [Location ]: Resource location. + [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). + [SystemDataCreatedBy ]: The identity that created the resource. + [SystemDataCreatedByType ]: The type of identity that created the resource. + [SystemDataLastModifiedBy ]: The identity that last modified the resource. + [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + [EmissionPolicy ]: Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. + [IngestionPolicyIngestionSource ]: Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. + [IngestionPolicyIngestionType ]: The ingestion type. +.Link +https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector +#> +function New-AzNetworkFunctionTrafficCollector { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('AzureTrafficCollectorName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Azure Traffic Collector name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # The name of the resource group. + ${ResourceGroupName}, + + [Parameter()] + [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()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy[]] + # Collector Policies for Azure Traffic Collector. + # To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table. + ${CollectorPolicy}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [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} +) + +process { + try { + Az.NetworkFunction.internal\New-AzNetworkFunctionTrafficCollector @PSBoundParameters + } catch { + throw + } +} +} diff --git a/src/NetworkFunction/custom/README.md b/src/NetworkFunction/custom/README.md new file mode 100644 index 000000000000..b215827d31cd --- /dev/null +++ b/src/NetworkFunction/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.NetworkFunction` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.NetworkFunction.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.NetworkFunction` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.NetworkFunction.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.NetworkFunction.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.NetworkFunction`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.NetworkFunction`. +- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.NetworkFunction`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/NetworkFunction/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 new file mode 100644 index 000000000000..56ffbb44aa46 --- /dev/null +++ b/src/NetworkFunction/custom/Update-AzNetworkFunctionCollectorPolicy.ps1 @@ -0,0 +1,174 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates a Collector Policy resource +.Description +Creates or updates a Collector Policy resource +.Example +{{ Add code here }} +.Example +{{ Add code here }} +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy +.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. +EMISSIONPOLICY : Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. +.Link +https://docs.microsoft.com/powershell/module/az.networkfunction/set-aznetworkfunctioncollectorpolicy +#> +function Update-AzNetworkFunctionCollectorPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Azure Traffic Collector name + ${AzureTrafficCollectorName}, + + [Parameter(Mandatory)] + [Alias('CollectorPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Collector Policy Name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # The name of the resource group. + ${ResourceGroupName}, + + [Parameter()] + [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()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IEmissionPoliciesPropertiesFormat[]] + # Emission policies. + # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + ${EmissionPolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IIngestionSourcesPropertiesFormat[]] + # Ingestion Sources. + # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + ${IngestionPolicyIngestionSource}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] + # The ingestion type. + ${IngestionPolicyIngestionType}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [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} +) + +process { + try { + Az.NetworkFunction.internal\Set-AzNetworkFunctionCollectorPolicy @PSBoundParameters + } catch { + throw + } +} +} \ No newline at end of file diff --git a/src/NetworkFunction/custom/Update-AzNetworkFunctionTrafficCollector.ps1 b/src/NetworkFunction/custom/Update-AzNetworkFunctionTrafficCollector.ps1 new file mode 100644 index 000000000000..1c826060f80e --- /dev/null +++ b/src/NetworkFunction/custom/Update-AzNetworkFunctionTrafficCollector.ps1 @@ -0,0 +1,163 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates a Azure Traffic Collector resource +.Description +Creates or updates a Azure Traffic Collector resource +.Example +{{ Add code here }} +.Example +{{ Add code here }} +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.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. +COLLECTORPOLICY : Collector Policies for Azure Traffic Collector. + [Location ]: Resource location. + [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). + [SystemDataCreatedBy ]: The identity that created the resource. + [SystemDataCreatedByType ]: The type of identity that created the resource. + [SystemDataLastModifiedBy ]: The identity that last modified the resource. + [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + [EmissionPolicy ]: Emission policies. + [EmissionDestination ]: Emission policy destinations. + [DestinationType ]: Emission destination type. + [EmissionType ]: Emission format type. + [IngestionPolicyIngestionSource ]: Ingestion Sources. + [ResourceId ]: Resource ID. + [SourceType ]: Ingestion source type. + [IngestionPolicyIngestionType ]: The ingestion type. +.Link +https://docs.microsoft.com/powershell/module/az.networkfunction/set-aznetworkfunctiontrafficcollector +#> +function Update-AzNetworkFunctionTrafficCollector { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector])] + [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Alias('AzureTrafficCollectorName')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # Azure Traffic Collector name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] + [System.String] + # The name of the resource group. + ${ResourceGroupName}, + + [Parameter()] + [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()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy[]] + # Collector Policies for Azure Traffic Collector. + # To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table. + ${CollectorPolicy}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [System.String] + # Resource location. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [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()] + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [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} + ) + + process { + try { + Az.NetworkFunction.internal\Set-AzNetworkFunctionTrafficCollector @PSBoundParameters + } catch { + throw + } + } + } \ No newline at end of file diff --git a/src/NetworkFunction/docs/Az.NetworkFunction.md b/src/NetworkFunction/docs/Az.NetworkFunction.md index 12ed835af16f..02e233375d51 100644 --- a/src/NetworkFunction/docs/Az.NetworkFunction.md +++ b/src/NetworkFunction/docs/Az.NetworkFunction.md @@ -1,40 +1,40 @@ --- Module Name: Az.NetworkFunction Module Guid: 1d339b1c-5a86-4fbd-9a2e-d0497c39b397 -Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction +Download Help Link: https://docs.microsoft.com/powershell/module/az.networkfunction Help Version: 1.0.0.0 Locale: en-US --- # Az.NetworkFunction Module ## Description - +Microsoft Azure PowerShell: NetworkFunction cmdlets ## Az.NetworkFunction Cmdlets +### [Get-AzNetworkFunctionCollectorPolicy](Get-AzNetworkFunctionCollectorPolicy.md) +Gets the collector policy in a specified Traffic Collector + ### [Get-AzNetworkFunctionTrafficCollector](Get-AzNetworkFunctionTrafficCollector.md) Gets the specified Azure Traffic Collector in a specified resource group -### [Get-AzNetworkFunctionTrafficCollectorPolicy](Get-AzNetworkFunctionTrafficCollectorPolicy.md) -Gets the collector policy in a specified Traffic Collector +### [New-AzNetworkFunctionCollectorPolicy](New-AzNetworkFunctionCollectorPolicy.md) +Creates or updates a Collector Policy resource ### [New-AzNetworkFunctionTrafficCollector](New-AzNetworkFunctionTrafficCollector.md) Creates or updates a Azure Traffic Collector resource -### [New-AzNetworkFunctionTrafficCollectorPolicy](New-AzNetworkFunctionTrafficCollectorPolicy.md) -Creates or updates a Collector Policy resource +### [Remove-AzNetworkFunctionCollectorPolicy](Remove-AzNetworkFunctionCollectorPolicy.md) +Deletes a specified Collector Policy resource. ### [Remove-AzNetworkFunctionTrafficCollector](Remove-AzNetworkFunctionTrafficCollector.md) Deletes a specified Azure Traffic Collector resource. -### [Remove-AzNetworkFunctionTrafficCollectorPolicy](Remove-AzNetworkFunctionTrafficCollectorPolicy.md) -Deletes a specified Collector Policy resource. +### [Update-AzNetworkFunctionCollectorPolicy](Update-AzNetworkFunctionCollectorPolicy.md) +Creates or updates a Collector Policy resource -### [Set-AzNetworkFunctionTrafficCollector](Set-AzNetworkFunctionTrafficCollector.md) +### [Update-AzNetworkFunctionTrafficCollector](Update-AzNetworkFunctionTrafficCollector.md) Creates or updates a Azure Traffic Collector resource -### [Set-AzNetworkFunctionTrafficCollectorPolicy](Set-AzNetworkFunctionTrafficCollectorPolicy.md) -Creates or updates a Collector Policy resource - ### [Update-AzNetworkFunctionTrafficCollectorTag](Update-AzNetworkFunctionTrafficCollectorTag.md) Updates the specified Azure Traffic Collector tags. diff --git a/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/docs/Get-AzNetworkFunctionCollectorPolicy.md similarity index 52% rename from src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollectorPolicy.md rename to src/NetworkFunction/docs/Get-AzNetworkFunctionCollectorPolicy.md index 2c02b1496cc2..2b7d34571848 100644 --- a/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollectorPolicy.md +++ b/src/NetworkFunction/docs/Get-AzNetworkFunctionCollectorPolicy.md @@ -1,11 +1,11 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/get-aznetworkfunctiontrafficcollectorpolicy +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctioncollectorpolicy schema: 2.0.0 --- -# Get-AzNetworkFunctionTrafficCollectorPolicy +# Get-AzNetworkFunctionCollectorPolicy ## SYNOPSIS Gets the collector policy in a specified Traffic Collector @@ -14,19 +14,20 @@ Gets the collector policy in a specified Traffic Collector ### List (Default) ``` -Get-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -ResourceGroupName - [-SubscriptionId ] [] +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] ``` ### Get ``` -Get-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -CollectorPolicyName - -ResourceGroupName [-SubscriptionId ] [] +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] ``` ### GetViaIdentity ``` -Get-AzNetworkFunctionTrafficCollectorPolicy -InputObject [] +Get-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -34,27 +35,44 @@ Gets the collector policy in a specified Traffic Collector ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get list of collector policies by atc name and resource group ```powershell -{{ Add code here }} +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName test -resourcegroupname test ``` ```output -{{ Add output here }} +[{ +"name": "atc", +"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc/collectorPolicies/cp1", +"etag": "testEtag", +"type": "Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies", +"properties": { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" +} +}] ``` -{{ Add description here }} +This cmdlet gets list of traffic collector policies by atc name and resource group. -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} ## PARAMETERS @@ -73,15 +91,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -CollectorPolicyName -Collector Policy Name +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: System.String -Parameter Sets: Get -Aliases: +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -93,7 +111,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity Parameter Sets: GetViaIdentity Aliases: @@ -104,6 +122,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. @@ -123,7 +156,7 @@ Accept wildcard characters: False Azure Subscription ID. ```yaml -Type: System.String +Type: System.String[] Parameter Sets: Get, List Aliases: @@ -139,11 +172,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy ## NOTES @@ -154,9 +187,10 @@ 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 : Identity Parameter +INPUTOBJECT : Identity Parameter - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - `[CollectorPolicyName ]`: Collector Policy Name + - `[Id ]`: Resource identity path - `[ResourceGroupName ]`: The name of the resource group. - `[SubscriptionId ]`: Azure Subscription ID. diff --git a/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollector.md index a0159e2fc047..de7a67f002f3 100644 --- a/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/docs/Get-AzNetworkFunctionTrafficCollector.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/get-aznetworkfunctiontrafficcollector +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctiontrafficcollector schema: 2.0.0 --- @@ -14,19 +14,26 @@ Gets the specified Azure Traffic Collector in a specified resource group ### List (Default) ``` -Get-AzNetworkFunctionTrafficCollector [-ResourceGroupName ] [-SubscriptionId ] +Get-AzNetworkFunctionTrafficCollector [-SubscriptionId ] [-DefaultProfile ] [] ``` ### Get ``` -Get-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] +Get-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] ``` ### GetViaIdentity ``` -Get-AzNetworkFunctionTrafficCollector -InputObject [] +Get-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -34,27 +41,75 @@ Gets the specified Azure Traffic Collector in a specified resource group ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get list of traffic collectors in selected subscription +```powershell +Get-AzNetworkFunctionTrafficCollector +``` + +```output +[{ + "CollectorPolicies": [ + "testPolicy" + ], + "Etag": "testEtag", + "Id": "id", + "Location": "location", + "Name": "atcname", + "ProvisioningState": {}, + "Tags": {}, + "Type": "Microsoft.NetworkFunction/AzureTrafficCollectors", + "VirtualHubId": null + }] +``` + +This cmdlet gets list of traffic collectors in selected subscription. + +### Example 2: Get list of traffic collectors by resource group ```powershell -{{ Add code here }} +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test ``` ```output -{{ Add output here }} +[{ + "CollectorPolicies": [ + "testPolicy" + ], + "Etag": "testEtag", + "Id": "id", + "Location": "location", + "Name": "atcname", + "ProvisioningState": {}, + "Tags": {}, + "Type": "Microsoft.NetworkFunction/AzureTrafficCollectors", + "VirtualHubId": null + }] ``` -{{ Add description here }} +This cmdlet gets list of traffic collectors by resource group. -### Example 2: {{ Add title here }} +### Example 3: Get list of traffic collectors by name ```powershell -{{ Add code here }} +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test -name test ``` ```output -{{ Add output here }} +[{ + "CollectorPolicies": [ + "testPolicy" + ], + "Etag": "testEtag", + "Id": "id", + "Location": "location", + "Name": "atcname", + "ProvisioningState": {}, + "Tags": {}, + "Type": "Microsoft.NetworkFunction/AzureTrafficCollectors", + "VirtualHubId": null + }] ``` -{{ Add description here }} +This cmdlet gets list of traffic collectors by name. + ## PARAMETERS @@ -63,7 +118,7 @@ The credentials, account, tenant, and subscription used for communication with A ```yaml Type: System.Management.Automation.PSObject -Parameter Sets: Get +Parameter Sets: (All) Aliases: AzureRMContext, AzureCredential Required: False @@ -78,7 +133,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity Parameter Sets: GetViaIdentity Aliases: @@ -95,7 +150,7 @@ Azure Traffic Collector name ```yaml Type: System.String Parameter Sets: Get -Aliases: +Aliases: AzureTrafficCollectorName Required: True Position: Named @@ -109,7 +164,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: Get, List1 Aliases: Required: True @@ -123,8 +178,8 @@ Accept wildcard characters: False Azure Subscription ID. ```yaml -Type: System.String -Parameter Sets: Get, List +Type: System.String[] +Parameter Sets: Get, List, List1 Aliases: Required: False @@ -139,11 +194,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector ## NOTES @@ -154,9 +209,10 @@ 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 : Identity Parameter +INPUTOBJECT : Identity Parameter - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - `[CollectorPolicyName ]`: Collector Policy Name + - `[Id ]`: Resource identity path - `[ResourceGroupName ]`: The name of the resource group. - `[SubscriptionId ]`: Azure Subscription ID. diff --git a/src/NetworkFunction/docs/New-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/docs/New-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..348e32982b99 --- /dev/null +++ b/src/NetworkFunction/docs/New-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,311 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# New-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Creates or updates a Collector Policy resource + +## SYNTAX + +``` +New-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName -Location [-SubscriptionId ] + [-EmissionPolicy ] + [-IngestionPolicyIngestionSource ] + [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Collector Policy resource + +## EXAMPLES + +### Example 1: Create a new traffic collector policy +```powershell +New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus +``` + +```output +{ + "name": "cp1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/AzureTrafficCollector/atc/collectorPolicies/cp1", + "etag": "test", + "type": "Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies", + "properties": { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } + } +} +``` + +This cmdlet creates a new traffic collector policy. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmissionPolicy +Emission policies. +To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IEmissionPoliciesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionSource +Ingestion Sources. +To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IIngestionSourcesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionType +The ingestion type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy + +## NOTES + +ALIASES + +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. + + +EMISSIONPOLICY : Emission policies. + - `[EmissionDestination ]`: Emission policy destinations. + - `[DestinationType ]`: Emission destination type. + - `[EmissionType ]`: Emission format type. + +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + - `[ResourceId ]`: Resource ID. + - `[SourceType ]`: Ingestion source type. + +## RELATED LINKS + diff --git a/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollector.md index 3ae004c06c08..f15076a038ca 100644 --- a/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollector.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollector schema: 2.0.0 --- @@ -12,31 +12,10 @@ Creates or updates a Azure Traffic Collector resource ## SYNTAX -### CreateExpanded (Default) ``` New-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location - [-SubscriptionId ] [-CollectorPolicyList ] [-Tags ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` - -### Create -``` -New-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName - -Parameters [-SubscriptionId ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -### CreateViaIdentity -``` -New-AzNetworkFunctionTrafficCollector -InputObject - -Parameters [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### CreateViaIdentityExpanded -``` -New-AzNetworkFunctionTrafficCollector -InputObject -Location - [-CollectorPolicyList ] [-Tags ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-CollectorPolicy ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -44,27 +23,26 @@ Creates or updates a Azure Traffic Collector resource ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Create a new traffic collector ```powershell -{{ Add code here }} +New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus ``` ```output -{{ Add output here }} +{ + "CollectorPolicies": [], + "Etag": "testEtag", + "Id": "id", + "Location": "eastus", + "Name": "atctestps", + "ProvisioningState": {}, + "Tags": {}, + "Type": "Microsoft.NetworkFunction/AzureTrafficCollectors", + "VirtualHubId": null +} ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} +This cmdlet creates a new traffic collector. ## PARAMETERS @@ -83,13 +61,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -CollectorPolicyList +### -CollectorPolicy Collector Policies for Azure Traffic Collector. -To construct, see NOTES section for COLLECTORPOLICIES properties and create a hash table. +To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy[] -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy[] +Parameter Sets: (All) Aliases: Required: False @@ -99,19 +77,18 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity -Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded -Aliases: +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential -Required: True +Required: False Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` @@ -120,7 +97,7 @@ Resource location. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: True @@ -135,8 +112,8 @@ Azure Traffic Collector name ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded -Aliases: +Parameter Sets: (All) +Aliases: AzureTrafficCollectorName Required: True Position: Named @@ -160,28 +137,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Parameters -Azure Traffic Collector resource. -To construct, see NOTES section for PARAMETERS properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector -Parameter Sets: Create, CreateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded +Parameter Sets: (All) Aliases: Required: True @@ -196,7 +157,7 @@ Azure Subscription ID. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded +Parameter Sets: (All) Aliases: Required: False @@ -206,12 +167,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Tags +### -Tag Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -257,13 +218,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector ## NOTES @@ -274,35 +231,23 @@ 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. -COLLECTORPOLICIES : Collector Policies for Azure Traffic Collector. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. +COLLECTORPOLICY : Collector Policies for Azure Traffic Collector. + - `[Location ]`: Resource location. + - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). + - `[SystemDataCreatedBy ]`: The identity that created the resource. + - `[SystemDataCreatedByType ]`: The type of identity that created the resource. + - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. + - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[EmissionPolicy ]`: Emission policies. + - `[EmissionDestination ]`: Emission policy destinations. - `[DestinationType ]`: Emission destination type. - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. + - `[IngestionPolicyIngestionSource ]`: Ingestion Sources. - `[ResourceId ]`: Resource ID. - `[SourceType ]`: Ingestion source type. - `[IngestionPolicyIngestionType ]`: The ingestion type. -INPUTOBJECT : Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - -PARAMETERS : Azure Traffic Collector resource. - - `[Location ]`: Resource location. - - `[Tags ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[CollectorPolicyList ]`: Collector Policies for Azure Traffic Collector. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - ## RELATED LINKS diff --git a/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollectorPolicy.md deleted file mode 100644 index 81dfae736d94..000000000000 --- a/src/NetworkFunction/docs/New-AzNetworkFunctionTrafficCollectorPolicy.md +++ /dev/null @@ -1,322 +0,0 @@ ---- -external help file: -Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/new-aznetworkfunctiontrafficcollectorpolicy -schema: 2.0.0 ---- - -# New-AzNetworkFunctionTrafficCollectorPolicy - -## SYNOPSIS -Creates or updates a Collector Policy resource - -## SYNTAX - -### CreateExpanded (Default) -``` -New-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -CollectorPolicyName - -ResourceGroupName [-SubscriptionId ] - [-EmissionPolicyList ] - [-IngestionPolicyIngestionSourceList ] - [-IngestionPolicyIngestionType ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### Create -``` -New-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -CollectorPolicyName - -ResourceGroupName -Parameters [-SubscriptionId ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` - -### CreateViaIdentity -``` -New-AzNetworkFunctionTrafficCollectorPolicy -InputObject - -Parameters [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### CreateViaIdentityExpanded -``` -New-AzNetworkFunctionTrafficCollectorPolicy -InputObject - [-EmissionPolicyList ] - [-IngestionPolicyIngestionSourceList ] - [-IngestionPolicyIngestionType ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Creates or updates a Collector Policy resource - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AzureTrafficCollectorName -Azure Traffic Collector name - -```yaml -Type: System.String -Parameter Sets: Create, CreateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CollectorPolicyName -Collector Policy Name - -```yaml -Type: System.String -Parameter Sets: Create, CreateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EmissionPolicyList -Emission policies. -To construct, see NOTES section for EMISSIONPOLICIES properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IEmissionPoliciesPropertiesFormat[] -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IngestionPolicyIngestionSourceList -Ingestion Sources. -To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCES properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IIngestionSourcesPropertiesFormat[] -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IngestionPolicyIngestionType -The ingestion type. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity -Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameters -Collection policy resource. -To construct, see NOTES section for PARAMETERS properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy -Parameter Sets: Create, CreateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. - -```yaml -Type: System.String -Parameter Sets: Create, CreateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: Create, CreateExpanded -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy - -## NOTES - -ALIASES - -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. - - -EMISSIONPOLICIES : Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - -INGESTIONPOLICYINGESTIONSOURCES : Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - -INPUTOBJECT : Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - -PARAMETERS : Collection policy resource. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - -## RELATED LINKS - diff --git a/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/docs/Remove-AzNetworkFunctionCollectorPolicy.md similarity index 74% rename from src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollectorPolicy.md rename to src/NetworkFunction/docs/Remove-AzNetworkFunctionCollectorPolicy.md index 90ba7245b93c..d678bf59862c 100644 --- a/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollectorPolicy.md +++ b/src/NetworkFunction/docs/Remove-AzNetworkFunctionCollectorPolicy.md @@ -1,11 +1,11 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollectorpolicy +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy schema: 2.0.0 --- -# Remove-AzNetworkFunctionTrafficCollectorPolicy +# Remove-AzNetworkFunctionCollectorPolicy ## SYNOPSIS Deletes a specified Collector Policy resource. @@ -14,15 +14,15 @@ Deletes a specified Collector Policy resource. ### Delete (Default) ``` -Remove-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName - -CollectorPolicyName -ResourceGroupName [-SubscriptionId ] [-AsJob] [-NoWait] +Remove-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` ### DeleteViaIdentity ``` -Remove-AzNetworkFunctionTrafficCollectorPolicy -InputObject [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzNetworkFunctionCollectorPolicy -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -30,27 +30,17 @@ Deletes a specified Collector Policy resource. ## EXAMPLES -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} +### Example 1: Delete a new traffic collector policy ```powershell -{{ Add code here }} +Remove-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroupname test ``` ```output -{{ Add output here }} +{ +} ``` -{{ Add description here }} +This cmdlet deletes a traffic collector policy. ## PARAMETERS @@ -84,15 +74,15 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -CollectorPolicyName -Collector Policy Name +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: System.String -Parameter Sets: Delete -Aliases: +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -104,7 +94,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity Parameter Sets: DeleteViaIdentity Aliases: @@ -115,6 +105,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -211,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity ## OUTPUTS @@ -226,9 +231,10 @@ 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 : Identity Parameter +INPUTOBJECT : Identity Parameter - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - `[CollectorPolicyName ]`: Collector Policy Name + - `[Id ]`: Resource identity path - `[ResourceGroupName ]`: The name of the resource group. - `[SubscriptionId ]`: Azure Subscription ID. diff --git a/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollector.md index 2f6d5d0aaa5f..e18e61b1b8fe 100644 --- a/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/docs/Remove-AzNetworkFunctionTrafficCollector.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctiontrafficcollector schema: 2.0.0 --- @@ -15,13 +15,13 @@ Deletes a specified Azure Traffic Collector resource. ### Delete (Default) ``` Remove-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName [-SubscriptionId ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` ### DeleteViaIdentity ``` -Remove-AzNetworkFunctionTrafficCollector -InputObject [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzNetworkFunctionTrafficCollector -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -29,27 +29,17 @@ Deletes a specified Azure Traffic Collector resource. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Delete a new traffic collector ```powershell -{{ Add code here }} +Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname SEA-Cust10 ``` ```output -{{ Add output here }} +{ +} ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} +This cmdlet deletes a traffic collector. ## PARAMETERS @@ -68,12 +58,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity Parameter Sets: DeleteViaIdentity Aliases: @@ -90,7 +95,7 @@ Azure Traffic Collector name ```yaml Type: System.String Parameter Sets: Delete -Aliases: +Aliases: AzureTrafficCollectorName Required: True Position: Named @@ -195,7 +200,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity ## OUTPUTS @@ -210,9 +215,10 @@ 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 : Identity Parameter +INPUTOBJECT : Identity Parameter - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - `[CollectorPolicyName ]`: Collector Policy Name + - `[Id ]`: Resource identity path - `[ResourceGroupName ]`: The name of the resource group. - `[SubscriptionId ]`: Azure Subscription ID. diff --git a/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollector.md deleted file mode 100644 index b0b853433d9d..000000000000 --- a/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollector.md +++ /dev/null @@ -1,308 +0,0 @@ ---- -external help file: -Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/set-aznetworkfunctiontrafficcollector -schema: 2.0.0 ---- - -# Set-AzNetworkFunctionTrafficCollector - -## SYNOPSIS -Creates or updates a Azure Traffic Collector resource - -## SYNTAX - -### UpdateExpanded (Default) -``` -Set-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location - [-SubscriptionId ] [-CollectorPolicyList ] [-Tags ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` - -### Update -``` -Set-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName - -Parameters [-SubscriptionId ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -### UpdateViaIdentity -``` -Set-AzNetworkFunctionTrafficCollector -InputObject - -Parameters [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Set-AzNetworkFunctionTrafficCollector -InputObject -Location - [-CollectorPolicyList ] [-Tags ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -## DESCRIPTION -Creates or updates a Azure Traffic Collector resource - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CollectorPolicyList -Collector Policies for Azure Traffic Collector. -To construct, see NOTES section for COLLECTORPOLICIES properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Location -Resource location. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -Azure Traffic Collector name - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameters -Azure Traffic Collector resource. -To construct, see NOTES section for PARAMETERS properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector -Parameter Sets: Update, UpdateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags -Resource tags. - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector - -## NOTES - -ALIASES - -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. - - -COLLECTORPOLICIES : Collector Policies for Azure Traffic Collector. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - -INPUTOBJECT : Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - -PARAMETERS : Azure Traffic Collector resource. - - `[Location ]`: Resource location. - - `[Tags ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[CollectorPolicyList ]`: Collector Policies for Azure Traffic Collector. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - -## RELATED LINKS - diff --git a/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollectorPolicy.md deleted file mode 100644 index 88b7e7a3700f..000000000000 --- a/src/NetworkFunction/docs/Set-AzNetworkFunctionTrafficCollectorPolicy.md +++ /dev/null @@ -1,322 +0,0 @@ ---- -external help file: -Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/set-aznetworkfunctiontrafficcollectorpolicy -schema: 2.0.0 ---- - -# Set-AzNetworkFunctionTrafficCollectorPolicy - -## SYNOPSIS -Creates or updates a Collector Policy resource - -## SYNTAX - -### UpdateExpanded (Default) -``` -Set-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -CollectorPolicyName - -ResourceGroupName [-SubscriptionId ] - [-EmissionPolicyList ] - [-IngestionPolicyIngestionSourceList ] - [-IngestionPolicyIngestionType ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### Update -``` -Set-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName -CollectorPolicyName - -ResourceGroupName -Parameters [-SubscriptionId ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentity -``` -Set-AzNetworkFunctionTrafficCollectorPolicy -InputObject - -Parameters [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Set-AzNetworkFunctionTrafficCollectorPolicy -InputObject - [-EmissionPolicyList ] - [-IngestionPolicyIngestionSourceList ] - [-IngestionPolicyIngestionType ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Creates or updates a Collector Policy resource - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -AsJob -Run the command as a job - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AzureTrafficCollectorName -Azure Traffic Collector name - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CollectorPolicyName -Collector Policy Name - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EmissionPolicyList -Emission policies. -To construct, see NOTES section for EMISSIONPOLICIES properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IEmissionPoliciesPropertiesFormat[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IngestionPolicyIngestionSourceList -Ingestion Sources. -To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCES properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IIngestionSourcesPropertiesFormat[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IngestionPolicyIngestionType -The ingestion type. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -NoWait -Run the command asynchronously - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameters -Collection policy resource. -To construct, see NOTES section for PARAMETERS properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy -Parameter Sets: Update, UpdateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Azure Subscription ID. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ICollectorPolicy - -## NOTES - -ALIASES - -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. - - -EMISSIONPOLICIES : Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - -INGESTIONPOLICYINGESTIONSOURCES : Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - -INPUTOBJECT : Identity Parameter - - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - - `[CollectorPolicyName ]`: Collector Policy Name - - `[ResourceGroupName ]`: The name of the resource group. - - `[SubscriptionId ]`: Azure Subscription ID. - -PARAMETERS : Collection policy resource. - - `[EmissionPolicyList ]`: Emission policies. - - `[EmissionDestinations ]`: Emission policy destinations. - - `[DestinationType ]`: Emission destination type. - - `[EmissionType ]`: Emission format type. - - `[IngestionPolicyIngestionSourceList ]`: Ingestion Sources. - - `[ResourceId ]`: Resource ID. - - `[SourceType ]`: Ingestion source type. - - `[IngestionPolicyIngestionType ]`: The ingestion type. - -## RELATED LINKS - diff --git a/src/NetworkFunction/docs/Update-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/docs/Update-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..2f5372db11a8 --- /dev/null +++ b/src/NetworkFunction/docs/Update-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,311 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/set-aznetworkfunctioncollectorpolicy +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionCollectorPolicy + +## SYNOPSIS +Creates or updates a Collector Policy resource + +## SYNTAX + +``` +Update-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName -Name + -ResourceGroupName -Location [-SubscriptionId ] + [-EmissionPolicy ] + [-IngestionPolicyIngestionSource ] + [-IngestionPolicyIngestionType ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Collector Policy resource + +## EXAMPLES + +### Example 1: Update a traffic collector policy +```powershell +Update-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus +``` + +```output +{ + "name": "cp1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/AzureTrafficCollector/atc/collectorPolicies/cp1", + "etag": "test", + "type": "Microsoft.NetworkFunction/azureTrafficCollectors/collectorPolicies", + "properties": { + "ingestionPolicy": { + "ingestionType": "IPFIX", + "ingestionSources": [ + { + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/expressRouteCircuits/circuitName", + "sourceType": "Resource" + } + ] + }, + "emissionPolicies": [ + { + "emissionType": "IPFIX", + "emissionDestinations": [ + { + "destinationType": "AzureMonitor" + } + ] + } + ], + "provisioningState": "Succeeded" + } + } +} +``` + +This cmdlet updates a traffic collector policy. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureTrafficCollectorName +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EmissionPolicy +Emission policies. +To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IEmissionPoliciesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionSource +Ingestion Sources. +To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IIngestionSourcesPropertiesFormat[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IngestionPolicyIngestionType +The ingestion type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Collector Policy Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CollectorPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy + +## NOTES + +ALIASES + +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. + + +EMISSIONPOLICY : Emission policies. + - `[EmissionDestination ]`: Emission policy destinations. + - `[DestinationType ]`: Emission destination type. + - `[EmissionType ]`: Emission format type. + +INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources. + - `[ResourceId ]`: Resource ID. + - `[SourceType ]`: Ingestion source type. + +## RELATED LINKS + diff --git a/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollector.md new file mode 100644 index 000000000000..525e4ff14d65 --- /dev/null +++ b/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollector.md @@ -0,0 +1,253 @@ +--- +external help file: +Module Name: Az.NetworkFunction +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/set-aznetworkfunctiontrafficcollector +schema: 2.0.0 +--- + +# Update-AzNetworkFunctionTrafficCollector + +## SYNOPSIS +Creates or updates a Azure Traffic Collector resource + +## SYNTAX + +``` +Update-AzNetworkFunctionTrafficCollector -Name -ResourceGroupName -Location + [-SubscriptionId ] [-CollectorPolicy ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a Azure Traffic Collector resource + +## EXAMPLES + +### Example 1: Updates a traffic collector +```powershell +Update-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus +``` + +```output +{ + "CollectorPolicies": [], + "Etag": "testEtag", + "Id": "id", + "Location": "eastus", + "Name": "atctestps", + "ProvisioningState": {}, + "Tags": {}, + "Type": "Microsoft.NetworkFunction/AzureTrafficCollectors", + "VirtualHubId": null +} +``` + +This cmdlet updates a traffic collector. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CollectorPolicy +Collector Policies for Azure Traffic Collector. +To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Azure Traffic Collector name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: AzureTrafficCollectorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector + +## NOTES + +ALIASES + +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. + + +COLLECTORPOLICY : Collector Policies for Azure Traffic Collector. + - `[Location ]`: Resource location. + - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). + - `[SystemDataCreatedBy ]`: The identity that created the resource. + - `[SystemDataCreatedByType ]`: The type of identity that created the resource. + - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. + - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[EmissionPolicy ]`: Emission policies. + - `[EmissionDestination ]`: Emission policy destinations. + - `[DestinationType ]`: Emission destination type. + - `[EmissionType ]`: Emission format type. + - `[IngestionPolicyIngestionSource ]`: Ingestion Sources. + - `[ResourceId ]`: Resource ID. + - `[SourceType ]`: Ingestion source type. + - `[IngestionPolicyIngestionType ]`: The ingestion type. + +## RELATED LINKS + diff --git a/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollectorTag.md b/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollectorTag.md index 422144cb5236..4f755dbf8c22 100644 --- a/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollectorTag.md +++ b/src/NetworkFunction/docs/Update-AzNetworkFunctionTrafficCollectorTag.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.NetworkFunction -online version: https://docs.microsoft.com/en-us/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag +online version: https://docs.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctiontrafficcollectortag schema: 2.0.0 --- @@ -15,25 +15,14 @@ Updates the specified Azure Traffic Collector tags. ### UpdateExpanded (Default) ``` Update-AzNetworkFunctionTrafficCollectorTag -AzureTrafficCollectorName -ResourceGroupName - [-SubscriptionId ] [-Tags ] [-Confirm] [-WhatIf] [] -``` - -### Update -``` -Update-AzNetworkFunctionTrafficCollectorTag -AzureTrafficCollectorName -ResourceGroupName - -Parameters [-SubscriptionId ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentity -``` -Update-AzNetworkFunctionTrafficCollectorTag -InputObject -Parameters - [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzNetworkFunctionTrafficCollectorTag -InputObject [-Tags ] - [-Confirm] [-WhatIf] [] +Update-AzNetworkFunctionTrafficCollectorTag -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -41,27 +30,30 @@ Updates the specified Azure Traffic Collector tags. ## EXAMPLES -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} +### Example 1: Updates a traffic collector tag ```powershell -{{ Add code here }} +Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroupname rg1 ``` ```output -{{ Add output here }} -``` - -{{ Add description here }} +{ + "name": "atc", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/atc", + "type": "Microsoft.NetworkFunction/azureTrafficCollectors", + "etag": "test", + "location": "West US", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "collectorPolicies": [], + "provisioningState": "Succeeded" + } +} +``` + +This cmdlet updates a traffic collector tag. ## PARAMETERS @@ -70,7 +62,7 @@ Azure Traffic Collector name ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -80,29 +72,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded -Aliases: +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential -Required: True +Required: False Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -Parameters -Tags object for patch operations. -To construct, see NOTES section for PARAMETERS properties and create a hash table. +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITagsObject -Parameter Sets: Update, UpdateViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity +Parameter Sets: UpdateViaIdentityExpanded Aliases: Required: True @@ -117,7 +108,7 @@ The name of the resource group. ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -132,7 +123,7 @@ Azure Subscription ID. ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -142,12 +133,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Tags +### -Tag Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -193,13 +184,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITagsObject - -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.ITrafficCollectorIdentity +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20210501.IAzureTrafficCollector +### Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IAzureTrafficCollector ## NOTES @@ -210,15 +199,12 @@ 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 : Identity Parameter +INPUTOBJECT : Identity Parameter - `[AzureTrafficCollectorName ]`: Azure Traffic Collector name - `[CollectorPolicyName ]`: Collector Policy Name + - `[Id ]`: Resource identity path - `[ResourceGroupName ]`: The name of the resource group. - `[SubscriptionId ]`: Azure Subscription ID. -PARAMETERS : Tags object for patch operations. - - `[Tags ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - ## RELATED LINKS diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md similarity index 90% rename from src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollectorPolicy.md rename to src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md index 438066148723..91d8267561d3 100644 --- a/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollectorPolicy.md +++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md @@ -1,6 +1,6 @@ ### Example 1: Get list of collector policies by atc name and resource group ```powershell -Get-AzNetworkFunctionTrafficCollectorPolicy -AzureTrafficCollectorName test -resourcegroup test +Get-AzNetworkFunctionCollectorPolicy -AzureTrafficCollectorName test -resourcegroupname test ``` ```output diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollector.md index 6195be1d971a..6de74b1de197 100644 --- a/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionTrafficCollector.md @@ -23,7 +23,7 @@ This cmdlet gets list of traffic collectors in selected subscription. ### Example 2: Get list of traffic collectors by resource group ```powershell -Get-AzNetworkFunctionTrafficCollector -ResourceGroup test +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test ``` ```output @@ -46,7 +46,7 @@ This cmdlet gets list of traffic collectors by resource group. ### Example 3: Get list of traffic collectors by name ```powershell -Get-AzNetworkFunctionTrafficCollector -ResourceGroup test -name test +Get-AzNetworkFunctionTrafficCollector -ResourceGroupName test -name test ``` ```output diff --git a/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md similarity index 83% rename from src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollectorPolicy.md rename to src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md index 309f9100e7fe..fc004edd9d6f 100644 --- a/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollectorPolicy.md +++ b/src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md @@ -1,6 +1,6 @@ ### Example 1: Create a new traffic collector policy ```powershell -New-AzNetworkFunctionTrafficCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname -atc -resourcegroup rg1 +New-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus ``` ```output @@ -35,4 +35,4 @@ New-AzNetworkFunctionTrafficCollectorPolicy -collectorpolicyname cp1 -azuretraff } ``` -This cmdlet creates a new traffic collector policy. +This cmdlet creates a new traffic collector policy. \ No newline at end of file diff --git a/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollector.md index 4bddbaca942f..be74169f49ae 100644 --- a/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/examples/New-AzNetworkFunctionTrafficCollector.md @@ -1,6 +1,6 @@ ### Example 1: Create a new traffic collector ```powershell -New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroup test -location eastus +New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus ``` ```output @@ -17,4 +17,4 @@ New-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroup test -locat } ``` -This cmdlet creates a new traffic collector. +This cmdlet creates a new traffic collector. \ No newline at end of file diff --git a/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md new file mode 100644 index 000000000000..7d263e2eb772 --- /dev/null +++ b/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md @@ -0,0 +1,11 @@ +### Example 1: Delete a new traffic collector policy +```powershell +Remove-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroupname test +``` + +```output +{ +} +``` + +This cmdlet deletes a traffic collector policy. \ No newline at end of file diff --git a/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollector.md index 73058c5b33eb..43b5fe8bdb54 100644 --- a/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollector.md @@ -1,6 +1,6 @@ ### Example 1: Delete a new traffic collector ```powershell -Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroup SEA-Cust10 +Remove-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname SEA-Cust10 ``` ```output diff --git a/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollectorPolicy.md deleted file mode 100644 index fbb1abcbe807..000000000000 --- a/src/NetworkFunction/examples/Remove-AzNetworkFunctionTrafficCollectorPolicy.md +++ /dev/null @@ -1,13 +0,0 @@ -### Example 1: Delete a new traffic collector policy -```powershell -Remove-AzNetworkFunctionTrafficCollectorPolicy -azuretrafficcollectorname atctestps -collectorpolicyname cp1 -resourcegroup test -``` - -```output -{ -} -``` - -This cmdlet deletes a traffic collector policy. - - diff --git a/src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollectorPolicy.md b/src/NetworkFunction/examples/Update-AzNetworkFunctionCollectorPolicy.md similarity index 83% rename from src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollectorPolicy.md rename to src/NetworkFunction/examples/Update-AzNetworkFunctionCollectorPolicy.md index 2bb52c68a0a9..0363ecb28828 100644 --- a/src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollectorPolicy.md +++ b/src/NetworkFunction/examples/Update-AzNetworkFunctionCollectorPolicy.md @@ -1,6 +1,6 @@ ### Example 1: Update a traffic collector policy ```powershell -Set-AzNetworkFunctionTrafficCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname -atc -resourcegroup rg1 +Update-AzNetworkFunctionCollectorPolicy -collectorpolicyname cp1 -azuretrafficcollectorname atc -resourcegroupname rg1 -location eastus ``` ```output @@ -35,4 +35,4 @@ Set-AzNetworkFunctionTrafficCollectorPolicy -collectorpolicyname cp1 -azuretraff } ``` -This cmdlet updates a traffic collector policy. +This cmdlet updates a traffic collector policy. \ No newline at end of file diff --git a/src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollector.md b/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollector.md similarity index 79% rename from src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollector.md rename to src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollector.md index c5f683e5917b..028ca13840b4 100644 --- a/src/NetworkFunction/examples/Set-AzNetworkFunctionTrafficCollector.md +++ b/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollector.md @@ -1,6 +1,6 @@ ### Example 1: Updates a traffic collector ```powershell -Set-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroup test -location eastus +Update-AzNetworkFunctionTrafficCollector -name atctestps -resourcegroupname test -location eastus ``` ```output diff --git a/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollectorTag.md b/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollectorTag.md index a575276e0e28..6c0b9267ce14 100644 --- a/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollectorTag.md +++ b/src/NetworkFunction/examples/Update-AzNetworkFunctionTrafficCollectorTag.md @@ -1,6 +1,6 @@ ### Example 1: Updates a traffic collector tag ```powershell -Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroup rg1 +Update-AzNetworkFunctionTrafficCollectorTag -azuretrafficcollectorname atc -resourcegroupname rg1 ``` ```output diff --git a/src/NetworkFunction/resources/README.md b/src/NetworkFunction/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/NetworkFunction/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/NetworkFunction/test/Get-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 b/src/NetworkFunction/test/Get-AzNetworkFunctionCollectorPolicy.Tests.ps1 similarity index 87% rename from src/NetworkFunction/test/Get-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 rename to src/NetworkFunction/test/Get-AzNetworkFunctionCollectorPolicy.Tests.ps1 index 99fb69a0fac6..c7acfa1ea0b7 100644 --- a/src/NetworkFunction/test/Get-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 +++ b/src/NetworkFunction/test/Get-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzNetworkFunctionTrafficCollectorPolicy')) +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzNetworkFunctionCollectorPolicy')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzNetworkFunctionTrafficCollectorPolicy.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzNetworkFunctionCollectorPolicy.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzNetworkFunctionTrafficC . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzNetworkFunctionTrafficCollectorPolicy' { +Describe 'Get-AzNetworkFunctionCollectorPolicy' { It 'List' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } diff --git a/src/NetworkFunction/test/New-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 b/src/NetworkFunction/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 similarity index 88% rename from src/NetworkFunction/test/New-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 rename to src/NetworkFunction/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 index eb2eda5600cb..3a2d8caab562 100644 --- a/src/NetworkFunction/test/New-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 +++ b/src/NetworkFunction/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzNetworkFunctionTrafficCollectorPolicy')) +if(($null -eq $TestName) -or ($TestName -contains 'New-AzNetworkFunctionCollectorPolicy')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzNetworkFunctionTrafficCollectorPolicy.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzNetworkFunctionCollectorPolicy.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzNetworkFunctionTrafficC . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzNetworkFunctionTrafficCollectorPolicy' { +Describe 'New-AzNetworkFunctionCollectorPolicy' { It 'CreateExpanded' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } diff --git a/src/NetworkFunction/test/Remove-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 b/src/NetworkFunction/test/Remove-AzNetworkFunctionCollectorPolicy.Tests.ps1 similarity index 85% rename from src/NetworkFunction/test/Remove-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 rename to src/NetworkFunction/test/Remove-AzNetworkFunctionCollectorPolicy.Tests.ps1 index 47c4231ad6a3..357dc8360be7 100644 --- a/src/NetworkFunction/test/Remove-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 +++ b/src/NetworkFunction/test/Remove-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzNetworkFunctionTrafficCollectorPolicy')) +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzNetworkFunctionCollectorPolicy')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzNetworkFunctionTrafficCollectorPolicy.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzNetworkFunctionCollectorPolicy.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzNetworkFunctionTraff . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzNetworkFunctionTrafficCollectorPolicy' { +Describe 'Remove-AzNetworkFunctionCollectorPolicy' { It 'Delete' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } diff --git a/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollector.Tests.ps1 b/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollector.Tests.ps1 deleted file mode 100644 index a8272f9d88cf..000000000000 --- a/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollector.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzNetworkFunctionTrafficCollector')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzNetworkFunctionTrafficCollector.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzNetworkFunctionTrafficCollector' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 b/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 deleted file mode 100644 index 7120f88b72ec..000000000000 --- a/src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzNetworkFunctionTrafficCollectorPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzNetworkFunctionTrafficCollectorPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzNetworkFunctionTrafficCollectorPolicy' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/NetworkFunction/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 b/src/NetworkFunction/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 new file mode 100644 index 000000000000..ec1a10585699 --- /dev/null +++ b/src/NetworkFunction/test/Update-AzNetworkFunctionCollectorPolicy.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzNetworkFunctionCollectorPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzNetworkFunctionCollectorPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzNetworkFunctionCollectorPolicy' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/NetworkFunction/test/Update-AzNetworkFunctionTrafficCollector.Tests.ps1 b/src/NetworkFunction/test/Update-AzNetworkFunctionTrafficCollector.Tests.ps1 new file mode 100644 index 000000000000..ae192f704216 --- /dev/null +++ b/src/NetworkFunction/test/Update-AzNetworkFunctionTrafficCollector.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzNetworkFunctionTrafficCollector')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzNetworkFunctionTrafficCollector.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzNetworkFunctionTrafficCollector' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +}