Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Alb/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
/*.ps1
/*.ps1xml
Expand Down
2 changes: 1 addition & 1 deletion src/Alb/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 Down
6 changes: 3 additions & 3 deletions src/Alb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This directory contains the PowerShell module for the Alb service.
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
Expand All @@ -39,7 +39,7 @@ 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 @@ -56,7 +56,7 @@ 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 ?? "";');
transform: $ = $.replace('((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20231101.IAssociationPropertiesInternal)Property).AssociationType = value;', '((Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20231101.IAssociationPropertiesInternal)Property).AssociationType = value ?? "";');
# Fix swagger issues
- from: swagger-document
where: $.definitions.TrafficControllerUpdateProperties
Expand Down

This file was deleted.

This file was deleted.

85 changes: 0 additions & 85 deletions src/Alb/UX/Microsoft.ServiceNetworking/trafficControllers.json

This file was deleted.

6 changes: 3 additions & 3 deletions src/Alb/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For `Az.Alb` to use custom cmdlets, it does this two different ways. We **highly

For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Alb.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.

For script cmdlets, these are loaded via the `Az.Alb.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
For script cmdlets, these are loaded via the `Az.Alb.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.

## Purpose
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
Expand All @@ -32,10 +32,10 @@ These provide functionality to our HTTP pipeline and other useful features. In s
### Attributes
For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.Alb.DescriptionAttribute`
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
- Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
- `Microsoft.Azure.PowerShell.Cmdlets.Alb.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Alb`.
- `Microsoft.Azure.PowerShell.Cmdlets.Alb.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Alb`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Alb`. For more information, see [readme.md](../internal/readme.md) in the `../internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.Alb.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
2 changes: 1 addition & 1 deletion src/Alb/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
7 changes: 3 additions & 4 deletions src/Alb/docs/Get-AzAlb.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ This command lists all Application Gateway for Containers resources belonging to
## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: System.Management.Automation.PSObject
Expand Down Expand Up @@ -168,7 +167,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
### Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20231101.ITrafficController

## NOTES

Expand All @@ -179,7 +178,7 @@ 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
INPUTOBJECT <IAlbIdentity>: Identity Parameter
- `[AssociationName <String>]`: Name of Association
- `[FrontendName <String>]`: Frontends
- `[Id <String>]`: Resource identity path
Expand Down
Loading