Skip to content

Commit cad4387

Browse files
malpaniHMCdolauli
andauthored
Az Alb 2023-11-01 (Reorg) (#23479)
* init * addressing comments * regenerating autorest * reverting tests * Fixed a path related issue. * Update some config for autorest.powershell v4 * tests recorded --------- Co-authored-by: Xiaogang <[email protected]>
1 parent dc85d42 commit cad4387

29 files changed

+1546
-930
lines changed

src/Alb/Alb.Autorest/Az.Alb.psd1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
GUID = '1ee185fc-e626-4b80-be4c-0e42e44db17c'
2+
GUID = '593f5094-e96e-4646-9c96-5342db09e51a'
33
RootModule = './Az.Alb.psm1'
44
ModuleVersion = '0.1.0'
55
CompatiblePSEditions = 'Core', 'Desktop'
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Alb.private.dll'
1313
FormatsToProcess = './Az.Alb.format.ps1xml'
14-
FunctionsToExport = 'Get-AzAlb', 'Get-AzAlbAssociation', 'Get-AzAlbFrontend', 'New-AzAlb', 'New-AzAlbAssociation', 'New-AzAlbFrontend', 'Remove-AzAlb', 'Remove-AzAlbAssociation', 'Remove-AzAlbFrontend', 'Update-AzAlb', 'Update-AzAlbAssociation', 'Update-AzAlbFrontend', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzAlb', 'Get-AzAlbAssociation', 'Get-AzAlbFrontend', 'New-AzAlb', 'New-AzAlbAssociation', 'New-AzAlbFrontend', 'Remove-AzAlb', 'Remove-AzAlbAssociation', 'Remove-AzAlbFrontend', 'Update-AzAlb', 'Update-AzAlbAssociation', 'Update-AzAlbFrontend'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Alb'

src/Alb/Alb.Autorest/README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ module-version: 0.1.0
3535
title: Alb
3636
subject-prefix: $(service-name)
3737
inlining-threshold: 100
38-
resourcegroup-append: true
39-
nested-object-to-string: true
4038

4139
# pin the swagger version by using the commit id instead of branch name
42-
commit: f7c77a57cf879e3938f5084c3d0cf0611b5834e7
40+
commit: 1b338481329645df2d9460738cbaab6109472488
4341
require:
4442
# readme.azure.noprofile.md is the common configuration file
4543
- $(this-folder)/../../readme.azure.noprofile.md
@@ -48,15 +46,7 @@ require:
4846
try-require:
4947
- $(repo)/specification/servicenetworking/resource-manager/readme.powershell.md
5048

51-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
52-
use-extension:
53-
"@autorest/powershell": "3.x"
54-
5549
directive:
56-
# Bug: https://github.com/Azure/autorest.powershell/issues/983
57-
- from: source-file-csharp
58-
where: $
59-
transform: $ = $.replace('((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationPropertiesInternal)Property).AssociationType = value;', '((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationPropertiesInternal)Property).AssociationType = value ?? "";');
6050
# Fix swagger issues
6151
- from: swagger-document
6252
where: $.definitions.TrafficControllerUpdateProperties
@@ -73,7 +63,10 @@ directive:
7363
subject: $1
7464
# Remove the unexpanded parameter set
7565
- where:
76-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
66+
variant: ^(Create|Update)(?!.*?Expanded|JsonFilePath|JsonString)
67+
remove: true
68+
- where:
69+
variant: ^CreateViaIdentity.*$
7770
remove: true
7871
# Param and table formatting
7972
- where:

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "trafficControllers/frontends",
3-
"apiVersion": "2023-05-01-preview",
3+
"apiVersion": "2023-11-01",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.alb"
66
},

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

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

src/Alb/Alb.Autorest/docs/Az.Alb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Alb
3-
Module Guid: 1ee185fc-e626-4b80-be4c-0e42e44db17c
3+
Module Guid: 593f5094-e96e-4646-9c96-5342db09e51a
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.alb
55
Help Version: 1.0.0.0
66
Locale: en-US

src/Alb/Alb.Autorest/docs/Get-AzAlb.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,24 +168,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
168168
169169
## OUTPUTS
170170
171-
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
171+
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
172172
173173
## NOTES
174174
175-
ALIASES
176-
177-
COMPLEX PARAMETER PROPERTIES
178-
179-
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.
180-
181-
182-
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
183-
- `[AssociationName <String>]`: Name of Association
184-
- `[FrontendName <String>]`: Frontends
185-
- `[Id <String>]`: Resource identity path
186-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
187-
- `[SubscriptionId <String>]`: The ID of the target subscription.
188-
- `[TrafficControllerName <String>]`: traffic controller name for path
189-
190175
## RELATED LINKS
191176

src/Alb/Alb.Autorest/docs/Get-AzAlbAssociation.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Get-AzAlbAssociation -AlbName <String> -Name <String> -ResourceGroupName <String
2929
Get-AzAlbAssociation -InputObject <IAlbIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
3030
```
3131

32+
### GetViaIdentityTrafficController
33+
```
34+
Get-AzAlbAssociation -Name <String> -TrafficControllerInputObject <IAlbIdentity> [-DefaultProfile <PSObject>]
35+
[<CommonParameters>]
36+
```
37+
3238
## DESCRIPTION
3339
Get a Association
3440

@@ -116,7 +122,7 @@ Name of Association
116122
117123
```yaml
118124
Type: System.String
119-
Parameter Sets: Get
125+
Parameter Sets: Get, GetViaIdentityTrafficController
120126
Aliases:
121127

122128
Required: True
@@ -157,6 +163,22 @@ Accept pipeline input: False
157163
Accept wildcard characters: False
158164
```
159165
166+
### -TrafficControllerInputObject
167+
Identity Parameter
168+
To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
169+
170+
```yaml
171+
Type: Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
172+
Parameter Sets: GetViaIdentityTrafficController
173+
Aliases:
174+
175+
Required: True
176+
Position: Named
177+
Default value: None
178+
Accept pipeline input: True (ByValue)
179+
Accept wildcard characters: False
180+
```
181+
160182
### CommonParameters
161183
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).
162184
@@ -166,24 +188,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
166188
167189
## OUTPUTS
168190
169-
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
191+
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
170192
171193
## NOTES
172194
173-
ALIASES
174-
175-
COMPLEX PARAMETER PROPERTIES
176-
177-
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.
178-
179-
180-
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
181-
- `[AssociationName <String>]`: Name of Association
182-
- `[FrontendName <String>]`: Frontends
183-
- `[Id <String>]`: Resource identity path
184-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
185-
- `[SubscriptionId <String>]`: The ID of the target subscription.
186-
- `[TrafficControllerName <String>]`: traffic controller name for path
187-
188195
## RELATED LINKS
189196

src/Alb/Alb.Autorest/docs/Get-AzAlbFrontend.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Get-AzAlbFrontend -AlbName <String> -Name <String> -ResourceGroupName <String> [
2929
Get-AzAlbFrontend -InputObject <IAlbIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
3030
```
3131

32+
### GetViaIdentityTrafficController
33+
```
34+
Get-AzAlbFrontend -Name <String> -TrafficControllerInputObject <IAlbIdentity> [-DefaultProfile <PSObject>]
35+
[<CommonParameters>]
36+
```
37+
3238
## DESCRIPTION
3339
Get a Frontend
3440

@@ -115,7 +121,7 @@ Frontends
115121
116122
```yaml
117123
Type: System.String
118-
Parameter Sets: Get
124+
Parameter Sets: Get, GetViaIdentityTrafficController
119125
Aliases:
120126

121127
Required: True
@@ -156,6 +162,22 @@ Accept pipeline input: False
156162
Accept wildcard characters: False
157163
```
158164
165+
### -TrafficControllerInputObject
166+
Identity Parameter
167+
To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
168+
169+
```yaml
170+
Type: Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
171+
Parameter Sets: GetViaIdentityTrafficController
172+
Aliases:
173+
174+
Required: True
175+
Position: Named
176+
Default value: None
177+
Accept pipeline input: True (ByValue)
178+
Accept wildcard characters: False
179+
```
180+
159181
### CommonParameters
160182
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).
161183
@@ -165,24 +187,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
165187
166188
## OUTPUTS
167189
168-
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
190+
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
169191
170192
## NOTES
171193
172-
ALIASES
173-
174-
COMPLEX PARAMETER PROPERTIES
175-
176-
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.
177-
178-
179-
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
180-
- `[AssociationName <String>]`: Name of Association
181-
- `[FrontendName <String>]`: Frontends
182-
- `[Id <String>]`: Resource identity path
183-
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
184-
- `[SubscriptionId <String>]`: The ID of the target subscription.
185-
- `[TrafficControllerName <String>]`: traffic controller name for path
186-
187194
## RELATED LINKS
188195

src/Alb/Alb.Autorest/docs/New-AzAlb.md

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,24 @@ Create a TrafficController
1212

1313
## SYNTAX
1414

15+
### CreateExpanded (Default)
1516
```
1617
New-AzAlb -Name <String> -ResourceGroupName <String> -Location <String> [-SubscriptionId <String>]
1718
[-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
1819
```
1920

21+
### CreateViaJsonFilePath
22+
```
23+
New-AzAlb -Name <String> -ResourceGroupName <String> -JsonFilePath <String> [-SubscriptionId <String>]
24+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
25+
```
26+
27+
### CreateViaJsonString
28+
```
29+
New-AzAlb -Name <String> -ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>]
30+
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
31+
```
32+
2033
## DESCRIPTION
2134
Create a TrafficController
2235

@@ -68,12 +81,42 @@ Accept pipeline input: False
6881
Accept wildcard characters: False
6982
```
7083
84+
### -JsonFilePath
85+
Path of Json file supplied to the Create operation
86+
87+
```yaml
88+
Type: System.String
89+
Parameter Sets: CreateViaJsonFilePath
90+
Aliases:
91+
92+
Required: True
93+
Position: Named
94+
Default value: None
95+
Accept pipeline input: False
96+
Accept wildcard characters: False
97+
```
98+
99+
### -JsonString
100+
Json string supplied to the Create operation
101+
102+
```yaml
103+
Type: System.String
104+
Parameter Sets: CreateViaJsonString
105+
Aliases:
106+
107+
Required: True
108+
Position: Named
109+
Default value: None
110+
Accept pipeline input: False
111+
Accept wildcard characters: False
112+
```
113+
71114
### -Location
72115
The geo-location where the resource lives
73116
74117
```yaml
75118
Type: System.String
76-
Parameter Sets: (All)
119+
Parameter Sets: CreateExpanded
77120
Aliases:
78121

79122
Required: True
@@ -149,7 +192,7 @@ Resource tags.
149192
150193
```yaml
151194
Type: System.Collections.Hashtable
152-
Parameter Sets: (All)
195+
Parameter Sets: CreateExpanded
153196
Aliases:
154197

155198
Required: False
@@ -197,11 +240,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
197240
198241
## OUTPUTS
199242
200-
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
243+
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
201244
202245
## NOTES
203246
204-
ALIASES
205-
206247
## RELATED LINKS
207248

0 commit comments

Comments
 (0)