Skip to content

Commit b941cd4

Browse files
authored
Udpate for AGC API v2025-01-01 (Azure#27361)
1 parent 1340daf commit b941cd4

File tree

63 files changed

+5789
-924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+5789
-924
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Alb")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.4")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.4")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/Alb/Alb.Autorest/README.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ subject-prefix: $(service-name)
3434
inlining-threshold: 100
3535

3636
# pin the swagger version by using the commit id instead of branch name
37-
commit: 1b338481329645df2d9460738cbaab6109472488
37+
commit: 5f011882d0580b9ba3291be4177a31ae3d4552f7
3838
require:
3939
# readme.azure.noprofile.md is the common configuration file
4040
- $(this-folder)/../../readme.azure.noprofile.md
@@ -93,6 +93,10 @@ directive:
9393
subject: Frontends
9494
set:
9595
subject: Frontend
96+
- where:
97+
subject: SecurityPolicies
98+
set:
99+
subject: SecurityPolicy
96100
# Renames for parameters continued
97101
- where:
98102
subject: Frontend
@@ -114,6 +118,25 @@ directive:
114118
parameter-name: TrafficControllerName
115119
set:
116120
parameter-name: AlbName
121+
- where:
122+
subject: SecurityPolicy
123+
parameter-name: SecurityPolicyName
124+
set:
125+
parameter-name: Name
126+
- where:
127+
subject: SecurityPolicy
128+
parameter-name: TrafficControllerName
129+
set:
130+
parameter-name: AlbName
131+
# hide Security Policy New and Update
132+
- where:
133+
subject: SecurityPolicy
134+
verb: New
135+
hide: true
136+
- where:
137+
subject: SecurityPolicy
138+
verb: Update
139+
hide: true
117140
# remove set-* related cmdlets, since they are not supported for Azure PowerShell modules.
118141
- where:
119142
verb: Set
@@ -140,6 +163,17 @@ directive:
140163
- AssociationType
141164
- SubnetId
142165
- ProvisioningState
166+
- where:
167+
model-name: SecurityPolicy
168+
set:
169+
format-table:
170+
properties:
171+
- Name
172+
- ResourceGroupName
173+
- Location
174+
- PolicyType
175+
- WafPolicyId
176+
- ProvisioningState
143177
- where:
144178
verb: New
145179
set:

src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-associations.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "trafficControllers/associations",
3-
"apiVersion": "2023-11-01",
3+
"apiVersion": "2025-01-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.alb"
66
},

src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-frontends.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "trafficControllers/frontends",
3-
"apiVersion": "2023-11-01",
3+
"apiVersion": "2025-01-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.alb"
66
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"resourceType": "trafficControllers/securityPolicies",
3+
"apiVersion": "2025-01-01",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.alb"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzAlbSecurityPolicy",
10+
"description": "Get a SecurityPolicy",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.alb/get-azalbsecuritypolicy"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-AlbName <String>",
20+
"-Name <String>",
21+
"-ResourceGroupName <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "Get a SecurityPolicy",
30+
"parameters": [
31+
{
32+
"name": "-AlbName",
33+
"value": "[Path.trafficControllerName]"
34+
},
35+
{
36+
"name": "-Name",
37+
"value": "[Path.securityPolicyName]"
38+
},
39+
{
40+
"name": "-ResourceGroupName",
41+
"value": "[Path.resourceGroupName]"
42+
},
43+
{
44+
"name": "-SubscriptionId",
45+
"value": "[Path.subscriptionId]"
46+
}
47+
]
48+
}
49+
]
50+
},
51+
{
52+
"name": "Remove-AzAlbSecurityPolicy",
53+
"description": "Delete a SecurityPolicy",
54+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/securityPolicies/{securityPolicyName}",
55+
"help": {
56+
"learnMore": {
57+
"url": "https://learn.microsoft.com/powershell/module/az.alb/remove-azalbsecuritypolicy"
58+
},
59+
"parameterSets": [
60+
{
61+
"parameters": [
62+
"-AlbName <String>",
63+
"-Name <String>",
64+
"-ResourceGroupName <String>",
65+
"[-SubscriptionId <String>]"
66+
]
67+
}
68+
]
69+
},
70+
"examples": [
71+
{
72+
"description": "Delete a SecurityPolicy",
73+
"parameters": [
74+
{
75+
"name": "-AlbName",
76+
"value": "[Path.trafficControllerName]"
77+
},
78+
{
79+
"name": "-Name",
80+
"value": "[Path.securityPolicyName]"
81+
},
82+
{
83+
"name": "-ResourceGroupName",
84+
"value": "[Path.resourceGroupName]"
85+
},
86+
{
87+
"name": "-SubscriptionId",
88+
"value": "[Path.subscriptionId]"
89+
}
90+
]
91+
}
92+
]
93+
}
94+
]
95+
}

src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "trafficControllers",
3-
"apiVersion": "2023-11-01",
3+
"apiVersion": "2025-01-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.alb"
66
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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

Comments
 (0)