|
| 1 | + |
| 2 | +# ---------------------------------------------------------------------------------- |
| 3 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code |
| 14 | +# is regenerated. |
| 15 | +# ---------------------------------------------------------------------------------- |
| 16 | + |
| 17 | +<# |
| 18 | +.Synopsis |
| 19 | +Creates or updates a Collector Policy resource |
| 20 | +.Description |
| 21 | +Creates or updates a Collector Policy resource |
| 22 | +.Example |
| 23 | +{{ Add code here }} |
| 24 | +.Example |
| 25 | +{{ Add code here }} |
| 26 | +
|
| 27 | +.Outputs |
| 28 | +Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy |
| 29 | +.Notes |
| 30 | +COMPLEX PARAMETER PROPERTIES |
| 31 | +
|
| 32 | +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. |
| 33 | +
|
| 34 | +EMISSIONPOLICY <IEmissionPoliciesPropertiesFormat[]>: Emission policies. |
| 35 | + [EmissionDestination <IEmissionPolicyDestination[]>]: Emission policy destinations. |
| 36 | + [DestinationType <DestinationType?>]: Emission destination type. |
| 37 | + [EmissionType <EmissionType?>]: Emission format type. |
| 38 | +
|
| 39 | +INGESTIONPOLICYINGESTIONSOURCE <IIngestionSourcesPropertiesFormat[]>: Ingestion Sources. |
| 40 | + [ResourceId <String>]: Resource ID. |
| 41 | + [SourceType <SourceType?>]: Ingestion source type. |
| 42 | +.Link |
| 43 | +https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy |
| 44 | +#> |
| 45 | +function New-AzNetworkFunctionCollectorPolicy { |
| 46 | +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ICollectorPolicy])] |
| 47 | +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] |
| 48 | +param( |
| 49 | + [Parameter(Mandatory)] |
| 50 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] |
| 51 | + [System.String] |
| 52 | + # Azure Traffic Collector name |
| 53 | + ${AzureTrafficCollectorName}, |
| 54 | + |
| 55 | + [Parameter(Mandatory)] |
| 56 | + [Alias('CollectorPolicyName')] |
| 57 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] |
| 58 | + [System.String] |
| 59 | + # Collector Policy Name |
| 60 | + ${Name}, |
| 61 | + |
| 62 | + [Parameter(Mandatory)] |
| 63 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] |
| 64 | + [System.String] |
| 65 | + # The name of the resource group. |
| 66 | + ${ResourceGroupName}, |
| 67 | + |
| 68 | + [Parameter()] |
| 69 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')] |
| 70 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] |
| 71 | + [System.String] |
| 72 | + # Azure Subscription ID. |
| 73 | + ${SubscriptionId}, |
| 74 | + |
| 75 | + [Parameter()] |
| 76 | + [AllowEmptyCollection()] |
| 77 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] |
| 78 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IEmissionPoliciesPropertiesFormat[]] |
| 79 | + # Emission policies. |
| 80 | + # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table. |
| 81 | + ${EmissionPolicy}, |
| 82 | + |
| 83 | + [Parameter()] |
| 84 | + [AllowEmptyCollection()] |
| 85 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] |
| 86 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.IIngestionSourcesPropertiesFormat[]] |
| 87 | + # Ingestion Sources. |
| 88 | + # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table. |
| 89 | + ${IngestionPolicyIngestionSource}, |
| 90 | + |
| 91 | + [Parameter()] |
| 92 | + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])] |
| 93 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] |
| 94 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType] |
| 95 | + # The ingestion type. |
| 96 | + ${IngestionPolicyIngestionType}, |
| 97 | + |
| 98 | + [Parameter(Mandatory)] |
| 99 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] |
| 100 | + [System.String] |
| 101 | + # Resource location. |
| 102 | + ${Location}, |
| 103 | + |
| 104 | + [Parameter()] |
| 105 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')] |
| 106 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220801.ITrackedResourceTags]))] |
| 107 | + [System.Collections.Hashtable] |
| 108 | + # Resource tags. |
| 109 | + ${Tag}, |
| 110 | + |
| 111 | + [Parameter()] |
| 112 | + [Alias('AzureRMContext', 'AzureCredential')] |
| 113 | + [ValidateNotNull()] |
| 114 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')] |
| 115 | + [System.Management.Automation.PSObject] |
| 116 | + # The credentials, account, tenant, and subscription used for communication with Azure. |
| 117 | + ${DefaultProfile}, |
| 118 | + |
| 119 | + [Parameter()] |
| 120 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 121 | + [System.Management.Automation.SwitchParameter] |
| 122 | + # Run the command as a job |
| 123 | + ${AsJob}, |
| 124 | + |
| 125 | + [Parameter(DontShow)] |
| 126 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 127 | + [System.Management.Automation.SwitchParameter] |
| 128 | + # Wait for .NET debugger to attach |
| 129 | + ${Break}, |
| 130 | + |
| 131 | + [Parameter(DontShow)] |
| 132 | + [ValidateNotNull()] |
| 133 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 134 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]] |
| 135 | + # SendAsync Pipeline Steps to be appended to the front of the pipeline |
| 136 | + ${HttpPipelineAppend}, |
| 137 | + |
| 138 | + [Parameter(DontShow)] |
| 139 | + [ValidateNotNull()] |
| 140 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 141 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]] |
| 142 | + # SendAsync Pipeline Steps to be prepended to the front of the pipeline |
| 143 | + ${HttpPipelinePrepend}, |
| 144 | + |
| 145 | + [Parameter()] |
| 146 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 147 | + [System.Management.Automation.SwitchParameter] |
| 148 | + # Run the command asynchronously |
| 149 | + ${NoWait}, |
| 150 | + |
| 151 | + [Parameter(DontShow)] |
| 152 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 153 | + [System.Uri] |
| 154 | + # The URI for the proxy server to use |
| 155 | + ${Proxy}, |
| 156 | + |
| 157 | + [Parameter(DontShow)] |
| 158 | + [ValidateNotNull()] |
| 159 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 160 | + [System.Management.Automation.PSCredential] |
| 161 | + # Credentials for a proxy server to use for the remote call |
| 162 | + ${ProxyCredential}, |
| 163 | + |
| 164 | + [Parameter(DontShow)] |
| 165 | + [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')] |
| 166 | + [System.Management.Automation.SwitchParameter] |
| 167 | + # Use the default credentials for the proxy |
| 168 | + ${ProxyUseDefaultCredentials} |
| 169 | +) |
| 170 | + |
| 171 | +process { |
| 172 | + try { |
| 173 | + Az.NetworkFunction.internal\New-AzNetworkFunctionCollectorPolicy @PSBoundParameters |
| 174 | + } catch { |
| 175 | + throw |
| 176 | + } |
| 177 | +} |
| 178 | +} |
0 commit comments