|
| 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 | +create a SecurityPolicy |
| 20 | +.Description |
| 21 | +create a SecurityPolicy |
| 22 | +.Example |
| 23 | +{{ Add code here }} |
| 24 | +.Example |
| 25 | +{{ Add code here }} |
| 26 | +
|
| 27 | +.Outputs |
| 28 | +Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ISecurityPolicy |
| 29 | +.Link |
| 30 | +https://learn.microsoft.com/powershell/module/az.alb/new-azalbsecuritypolicy |
| 31 | +#> |
| 32 | +function New-AzAlbSecurityPolicyWaf { |
| 33 | +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ISecurityPolicy])] |
| 34 | +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] |
| 35 | +param( |
| 36 | + [Parameter(Mandatory)] |
| 37 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')] |
| 38 | + [System.String] |
| 39 | + # traffic controller name for path |
| 40 | + ${AlbName}, |
| 41 | + |
| 42 | + [Parameter(Mandatory)] |
| 43 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')] |
| 44 | + [System.String] |
| 45 | + # SecurityPolicy |
| 46 | + ${Name}, |
| 47 | + |
| 48 | + [Parameter(Mandatory)] |
| 49 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')] |
| 50 | + [System.String] |
| 51 | + # The name of the resource group. |
| 52 | + # The name is case insensitive. |
| 53 | + ${ResourceGroupName}, |
| 54 | + |
| 55 | + [Parameter()] |
| 56 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')] |
| 57 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] |
| 58 | + [System.String] |
| 59 | + # The ID of the target subscription. |
| 60 | + ${SubscriptionId}, |
| 61 | + |
| 62 | + [Parameter(Mandatory)] |
| 63 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')] |
| 64 | + [System.String] |
| 65 | + # The geo-location where the resource lives |
| 66 | + ${Location}, |
| 67 | + |
| 68 | + [Parameter()] |
| 69 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')] |
| 70 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))] |
| 71 | + [System.Collections.Hashtable] |
| 72 | + # Resource tags. |
| 73 | + ${Tag}, |
| 74 | + |
| 75 | + [Parameter(Mandatory)] |
| 76 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')] |
| 77 | + [System.String] |
| 78 | + # Resource ID of the WAF |
| 79 | + ${WafPolicyId}, |
| 80 | + |
| 81 | + [Parameter()] |
| 82 | + [Alias('AzureRMContext', 'AzureCredential')] |
| 83 | + [ValidateNotNull()] |
| 84 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Azure')] |
| 85 | + [System.Management.Automation.PSObject] |
| 86 | + # The DefaultProfile parameter is not functional. |
| 87 | + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. |
| 88 | + ${DefaultProfile}, |
| 89 | + |
| 90 | + [Parameter()] |
| 91 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 92 | + [System.Management.Automation.SwitchParameter] |
| 93 | + # Run the command as a job |
| 94 | + ${AsJob}, |
| 95 | + |
| 96 | + [Parameter(DontShow)] |
| 97 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 98 | + [System.Management.Automation.SwitchParameter] |
| 99 | + # Wait for .NET debugger to attach |
| 100 | + ${Break}, |
| 101 | + |
| 102 | + [Parameter(DontShow)] |
| 103 | + [ValidateNotNull()] |
| 104 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 105 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SendAsyncStep[]] |
| 106 | + # SendAsync Pipeline Steps to be appended to the front of the pipeline |
| 107 | + ${HttpPipelineAppend}, |
| 108 | + |
| 109 | + [Parameter(DontShow)] |
| 110 | + [ValidateNotNull()] |
| 111 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 112 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SendAsyncStep[]] |
| 113 | + # SendAsync Pipeline Steps to be prepended to the front of the pipeline |
| 114 | + ${HttpPipelinePrepend}, |
| 115 | + |
| 116 | + [Parameter()] |
| 117 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 118 | + [System.Management.Automation.SwitchParameter] |
| 119 | + # Run the command asynchronously |
| 120 | + ${NoWait}, |
| 121 | + |
| 122 | + [Parameter(DontShow)] |
| 123 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 124 | + [System.Uri] |
| 125 | + # The URI for the proxy server to use |
| 126 | + ${Proxy}, |
| 127 | + |
| 128 | + [Parameter(DontShow)] |
| 129 | + [ValidateNotNull()] |
| 130 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 131 | + [System.Management.Automation.PSCredential] |
| 132 | + # Credentials for a proxy server to use for the remote call |
| 133 | + ${ProxyCredential}, |
| 134 | + |
| 135 | + [Parameter(DontShow)] |
| 136 | + [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Runtime')] |
| 137 | + [System.Management.Automation.SwitchParameter] |
| 138 | + # Use the default credentials for the proxy |
| 139 | + ${ProxyUseDefaultCredentials} |
| 140 | +) |
| 141 | + |
| 142 | +process { |
| 143 | + Az.Alb.internal\New-AzAlbSecurityPolicy @PSBoundParameters |
| 144 | +} |
| 145 | +} |
0 commit comments