Skip to content

Commit

Permalink
Az Alb 2023-11-01 (Reorg) (#23479)
Browse files Browse the repository at this point in the history
* 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 <xidi@microsoft.com>
  • Loading branch information
malpaniHMC and dolauli authored Dec 8, 2023
1 parent dc85d42 commit cad4387
Show file tree
Hide file tree
Showing 29 changed files with 1,546 additions and 930 deletions.
5 changes: 2 additions & 3 deletions src/Alb/Alb.Autorest/Az.Alb.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
GUID = '1ee185fc-e626-4b80-be4c-0e42e44db17c'
GUID = '593f5094-e96e-4646-9c96-5342db09e51a'
RootModule = './Az.Alb.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Expand All @@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Alb.private.dll'
FormatsToProcess = './Az.Alb.format.ps1xml'
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', '*'
AliasesToExport = '*'
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'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Alb'
Expand Down
17 changes: 5 additions & 12 deletions src/Alb/Alb.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ module-version: 0.1.0
title: Alb
subject-prefix: $(service-name)
inlining-threshold: 100
resourcegroup-append: true
nested-object-to-string: true

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

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
# Bug: https://github.com/Azure/autorest.powershell/issues/983
- from: source-file-csharp
where: $
transform: $ = $.replace('((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationPropertiesInternal)Property).AssociationType = value;', '((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationPropertiesInternal)Property).AssociationType = value ?? "";');
# Fix swagger issues
- from: swagger-document
where: $.definitions.TrafficControllerUpdateProperties
Expand All @@ -73,7 +63,10 @@ directive:
subject: $1
# Remove the unexpanded parameter set
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?Expanded|JsonFilePath|JsonString)
remove: true
- where:
variant: ^CreateViaIdentity.*$
remove: true
# Param and table formatting
- where:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "trafficControllers/associations",
"apiVersion": "2023-05-01-preview",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.alb"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "trafficControllers/frontends",
"apiVersion": "2023-05-01-preview",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.alb"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "trafficControllers",
"apiVersion": "2023-05-01-preview",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.alb"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Alb/Alb.Autorest/docs/Az.Alb.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Alb
Module Guid: 1ee185fc-e626-4b80-be4c-0e42e44db17c
Module Guid: 593f5094-e96e-4646-9c96-5342db09e51a
Download Help Link: https://learn.microsoft.com/powershell/module/az.alb
Help Version: 1.0.0.0
Locale: en-US
Expand Down
17 changes: 1 addition & 16 deletions src/Alb/Alb.Autorest/docs/Get-AzAlb.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,24 +168,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
## 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.
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
- `[AssociationName <String>]`: Name of Association
- `[FrontendName <String>]`: Frontends
- `[Id <String>]`: Resource identity path
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SubscriptionId <String>]`: The ID of the target subscription.
- `[TrafficControllerName <String>]`: traffic controller name for path

## RELATED LINKS
41 changes: 24 additions & 17 deletions src/Alb/Alb.Autorest/docs/Get-AzAlbAssociation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Get-AzAlbAssociation -AlbName <String> -Name <String> -ResourceGroupName <String
Get-AzAlbAssociation -InputObject <IAlbIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
```

### GetViaIdentityTrafficController
```
Get-AzAlbAssociation -Name <String> -TrafficControllerInputObject <IAlbIdentity> [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

## DESCRIPTION
Get a Association

Expand Down Expand Up @@ -116,7 +122,7 @@ Name of Association
```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityTrafficController
Aliases:

Required: True
Expand Down Expand Up @@ -157,6 +163,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -TrafficControllerInputObject
Identity Parameter
To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
Parameter Sets: GetViaIdentityTrafficController
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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).
Expand All @@ -166,24 +188,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
## 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.
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
- `[AssociationName <String>]`: Name of Association
- `[FrontendName <String>]`: Frontends
- `[Id <String>]`: Resource identity path
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SubscriptionId <String>]`: The ID of the target subscription.
- `[TrafficControllerName <String>]`: traffic controller name for path

## RELATED LINKS
41 changes: 24 additions & 17 deletions src/Alb/Alb.Autorest/docs/Get-AzAlbFrontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Get-AzAlbFrontend -AlbName <String> -Name <String> -ResourceGroupName <String> [
Get-AzAlbFrontend -InputObject <IAlbIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
```

### GetViaIdentityTrafficController
```
Get-AzAlbFrontend -Name <String> -TrafficControllerInputObject <IAlbIdentity> [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

## DESCRIPTION
Get a Frontend

Expand Down Expand Up @@ -115,7 +121,7 @@ Frontends
```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityTrafficController
Aliases:

Required: True
Expand Down Expand Up @@ -156,6 +162,22 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -TrafficControllerInputObject
Identity Parameter
To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
Parameter Sets: GetViaIdentityTrafficController
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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).
Expand All @@ -165,24 +187,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
## 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.
`INPUTOBJECT <IAlbIdentity>`: Identity Parameter
- `[AssociationName <String>]`: Name of Association
- `[FrontendName <String>]`: Frontends
- `[Id <String>]`: Resource identity path
- `[ResourceGroupName <String>]`: The name of the resource group. The name is case insensitive.
- `[SubscriptionId <String>]`: The ID of the target subscription.
- `[TrafficControllerName <String>]`: traffic controller name for path

## RELATED LINKS
51 changes: 46 additions & 5 deletions src/Alb/Alb.Autorest/docs/New-AzAlb.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ Create a TrafficController

## SYNTAX

### CreateExpanded (Default)
```
New-AzAlb -Name <String> -ResourceGroupName <String> -Location <String> [-SubscriptionId <String>]
[-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### CreateViaJsonFilePath
```
New-AzAlb -Name <String> -ResourceGroupName <String> -JsonFilePath <String> [-SubscriptionId <String>]
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### CreateViaJsonString
```
New-AzAlb -Name <String> -ResourceGroupName <String> -JsonString <String> [-SubscriptionId <String>]
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

## DESCRIPTION
Create a TrafficController

Expand Down Expand Up @@ -68,12 +81,42 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -JsonFilePath
Path of Json file supplied to the Create operation
```yaml
Type: System.String
Parameter Sets: CreateViaJsonFilePath
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -JsonString
Json string supplied to the Create operation
```yaml
Type: System.String
Parameter Sets: CreateViaJsonString
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Location
The geo-location where the resource lives
```yaml
Type: System.String
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: True
Expand Down Expand Up @@ -149,7 +192,7 @@ Resource tags.
```yaml
Type: System.Collections.Hashtable
Parameter Sets: (All)
Parameter Sets: CreateExpanded
Aliases:

Required: False
Expand Down Expand Up @@ -197,11 +240,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
## NOTES
ALIASES
## RELATED LINKS
Loading

0 comments on commit cad4387

Please sign in to comment.