diff --git a/.azure-pipelines/code-gen.yml b/.azure-pipelines/code-gen.yml
index 54c85f355cbc..b3ba7b9fa52a 100644
--- a/.azure-pipelines/code-gen.yml
+++ b/.azure-pipelines/code-gen.yml
@@ -96,6 +96,9 @@ jobs:
$Title = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
$HeadBranch = "codegen/${{ parameters.ServiceName }}"
$BaseBranch = "${{ parameters.TargetBranch }}"
- $Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}"
+ $Description = "Migrate ${{ parameters.ServiceName }} from $SourceBranch to ${{ parameters.TargetBranch }}
+ The last commit of src/${{ parameters.ServiceName }} in $SourceBranch is:
+ $(git log -1 origin/$SourceBranch -- ./src/${{ parameters.ServiceName }})
+ "
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description
displayName: Create PR to main branch
diff --git a/VersionInfo.json b/VersionInfo.json
index f294ad4bf122..e69de29bb2d1 100644
Binary files a/VersionInfo.json and b/VersionInfo.json differ
diff --git a/src/Aks/Aks.Autorest/docs/Az.Aks.md b/src/Aks/Aks.Autorest/help/Az.Aks.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Az.Aks.md
rename to src/Aks/Aks.Autorest/help/Az.Aks.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/help/Get-AzAksMaintenanceConfiguration.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksMaintenanceConfiguration.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md b/src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterCommandResult.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterCommandResult.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md b/src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterOSOption.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterOSOption.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md b/src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md b/src/Aks/Aks.Autorest/help/Get-AzAksNodePoolUpgradeProfile.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksNodePoolUpgradeProfile.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md b/src/Aks/Aks.Autorest/help/Get-AzAksSnapshot.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksSnapshot.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md b/src/Aks/Aks.Autorest/help/Get-AzAksUpgradeProfile.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksUpgradeProfile.md
diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md b/src/Aks/Aks.Autorest/help/Get-AzAksVersion.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md
rename to src/Aks/Aks.Autorest/help/Get-AzAksVersion.md
diff --git a/src/Aks/Aks.Autorest/docs/Install-AzAksCliTool.md b/src/Aks/Aks.Autorest/help/Install-AzAksCliTool.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Install-AzAksCliTool.md
rename to src/Aks/Aks.Autorest/help/Install-AzAksCliTool.md
diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md b/src/Aks/Aks.Autorest/help/Invoke-AzAksAbortAgentPoolLatestOperation.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md
rename to src/Aks/Aks.Autorest/help/Invoke-AzAksAbortAgentPoolLatestOperation.md
diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md b/src/Aks/Aks.Autorest/help/Invoke-AzAksAbortManagedClusterLatestOperation.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md
rename to src/Aks/Aks.Autorest/help/Invoke-AzAksAbortManagedClusterLatestOperation.md
diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md b/src/Aks/Aks.Autorest/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md
rename to src/Aks/Aks.Autorest/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md
diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/help/New-AzAksMaintenanceConfiguration.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md
rename to src/Aks/Aks.Autorest/help/New-AzAksMaintenanceConfiguration.md
diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md b/src/Aks/Aks.Autorest/help/New-AzAksSnapshot.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md
rename to src/Aks/Aks.Autorest/help/New-AzAksSnapshot.md
diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md b/src/Aks/Aks.Autorest/help/New-AzAksTimeInWeekObject.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md
rename to src/Aks/Aks.Autorest/help/New-AzAksTimeInWeekObject.md
diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md b/src/Aks/Aks.Autorest/help/New-AzAksTimeSpanObject.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md
rename to src/Aks/Aks.Autorest/help/New-AzAksTimeSpanObject.md
diff --git a/src/Aks/Aks.Autorest/docs/README.md b/src/Aks/Aks.Autorest/help/README.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/README.md
rename to src/Aks/Aks.Autorest/help/README.md
diff --git a/src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/help/Remove-AzAksMaintenanceConfiguration.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md
rename to src/Aks/Aks.Autorest/help/Remove-AzAksMaintenanceConfiguration.md
diff --git a/src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md b/src/Aks/Aks.Autorest/help/Remove-AzAksSnapshot.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md
rename to src/Aks/Aks.Autorest/help/Remove-AzAksSnapshot.md
diff --git a/src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md b/src/Aks/Aks.Autorest/help/Start-AzAksCluster.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md
rename to src/Aks/Aks.Autorest/help/Start-AzAksCluster.md
diff --git a/src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md b/src/Aks/Aks.Autorest/help/Start-AzAksManagedClusterCommand.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md
rename to src/Aks/Aks.Autorest/help/Start-AzAksManagedClusterCommand.md
diff --git a/src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md b/src/Aks/Aks.Autorest/help/Stop-AzAksCluster.md
similarity index 100%
rename from src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md
rename to src/Aks/Aks.Autorest/help/Stop-AzAksCluster.md
diff --git a/src/Alb/Alb.Autorest/Az.Alb.format.ps1xml b/src/Alb/Alb.Autorest/Az.Alb.format.ps1xml
index 9e04a5c356e0..9b57886aae6b 100644
--- a/src/Alb/Alb.Autorest/Az.Alb.format.ps1xml
+++ b/src/Alb/Alb.Autorest/Az.Alb.format.ps1xml
@@ -4,7 +4,7 @@
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AlbIdentity
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AlbIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AlbIdentity#Multiple
@@ -48,33 +48,51 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Association
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Association#Multiple
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
- Code
+ Name
- Message
+ ResourceGroupName
- Target
+ Location
+
+
+ AssociationType
+
+
+ SubnetId
+
+
+ ProvisioningState
@@ -82,39 +100,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationListResult
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.Operation
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationListResult#Multiple
-
-
-
-
-
-
-
-
-
-
+
- ActionType
-
-
- IsDataAction
-
-
- Name
-
-
- Origin
+ NextLink
@@ -122,39 +122,27 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationProperties
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationProperties#Multiple
-
-
-
-
-
-
-
+
-
+
- Description
-
-
- Operation
-
-
- Provider
+ AssociationType
- Resource
+ ProvisioningState
@@ -162,21 +150,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationUpdateProperties
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.OperationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationUpdateProperties#Multiple
-
+
- NextLink
+ AssociationType
@@ -184,21 +172,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationUpdateTags
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.Resource
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.AssociationUpdateTags#Multiple
-
+
- Name
+ Item
@@ -206,51 +194,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ErrorDetail
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ErrorDetail#Multiple
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
- CreatedAt
-
-
- CreatedBy
-
-
- CreatedByType
-
-
- LastModifiedAt
+ Code
- LastModifiedBy
+ Message
- LastModifiedByType
+ Target
@@ -258,9 +228,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Frontend
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.TrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Frontend#Multiple
@@ -268,25 +238,16 @@
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
@@ -296,25 +257,16 @@
Name
- SystemDataCreatedAt
-
-
- SystemDataCreatedBy
-
-
- SystemDataCreatedByType
-
-
- SystemDataLastModifiedAt
+ ResourceGroupName
- SystemDataLastModifiedBy
+ Location
- SystemDataLastModifiedByType
+ Fqdn
- Location
+ ProvisioningState
@@ -322,21 +274,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendListResult
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.TrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendListResult#Multiple
-
+
- Item
+ NextLink
@@ -344,26 +296,14 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Association
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendProperties
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Association
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendProperties#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -373,19 +313,7 @@
- Name
-
-
- ResourceGroupName
-
-
- Location
-
-
- AssociationType
-
-
- SubnetId
+ Fqdn
ProvisioningState
@@ -396,21 +324,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendUpdateTags
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.FrontendUpdateTags#Multiple
-
+
- NextLink
+ Item
@@ -418,27 +346,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Operation
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Operation#Multiple
-
+
-
+
+
+
+
+
+
+
- AssociationType
+ ActionType
- ProvisioningState
+ IsDataAction
+
+
+ Name
+
+
+ Origin
@@ -446,21 +386,39 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationUpdateProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationUpdateProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.OperationDisplay#Multiple
-
+
+
+
+
+
+
+
+
+
+
- AssociationType
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
@@ -468,21 +426,21 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.OperationListResult
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.OperationListResult#Multiple
-
+
- Item
+ NextLink
@@ -490,27 +448,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Frontend
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Resource
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Frontend
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Resource#Multiple
-
-
-
-
-
-
-
-
-
-
-
-
@@ -518,39 +464,57 @@
Name
-
- ResourceGroupName
-
-
- Location
-
-
- Fqdn
-
-
- ProvisioningState
-
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.SystemData#Multiple
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- NextLink
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
@@ -558,27 +522,63 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrackedResource
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrackedResource#Multiple
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Fqdn
+ Name
- ProvisioningState
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ Location
@@ -586,9 +586,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrackedResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.FrontendUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrackedResourceTags#Multiple
@@ -608,9 +608,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficController
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficController
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficController
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficController#Multiple
@@ -648,9 +648,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerListResult
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerListResult#Multiple
@@ -670,15 +670,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerProperties
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerProperties#Multiple
-
-
-
@@ -686,9 +683,6 @@
-
- ConfigurationEndpoint
-
ProvisioningState
@@ -698,9 +692,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerUpdateTags
- Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.TrafficControllerUpdateTags
+ Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.TrafficControllerUpdateTags#Multiple
diff --git a/src/Alb/Alb.Autorest/Az.Alb.psd1 b/src/Alb/Alb.Autorest/Az.Alb.psd1
index 1419690c53e9..72b3cbd598e7 100644
--- a/src/Alb/Alb.Autorest/Az.Alb.psd1
+++ b/src/Alb/Alb.Autorest/Az.Alb.psd1
@@ -1,135 +1,23 @@
-#
-# Module manifest for module 'Az.Alb'
-#
-# Generated by: Microsoft Corporation
-#
-# Generated on: 7/24/2023
-#
-
@{
-
-# Script module or binary module file associated with this manifest.
-RootModule = './Az.Alb.psm1'
-
-# Version number of this module.
-ModuleVersion = '0.1.0'
-
-# Supported PSEditions
-CompatiblePSEditions = 'Core', 'Desktop'
-
-# ID used to uniquely identify this module
-GUID = '1ee185fc-e626-4b80-be4c-0e42e44db17c'
-
-# Author of this module
-Author = 'Microsoft Corporation'
-
-# Company or vendor of this module
-CompanyName = 'Microsoft Corporation'
-
-# Copyright statement for this module
-Copyright = 'Microsoft Corporation. All rights reserved.'
-
-# Description of the functionality provided by this module
-Description = 'Microsoft Azure PowerShell: Alb cmdlets'
-
-# Minimum version of the PowerShell engine required by this module
-PowerShellVersion = '5.1'
-
-# Name of the PowerShell host required by this module
-# PowerShellHostName = ''
-
-# Minimum version of the PowerShell host required by this module
-# PowerShellHostVersion = ''
-
-# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-DotNetFrameworkVersion = '4.7.2'
-
-# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-# ClrVersion = ''
-
-# Processor architecture (None, X86, Amd64) required by this module
-# ProcessorArchitecture = ''
-
-# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.12.4'; })
-
-# Assemblies that must be loaded prior to importing this module
-RequiredAssemblies = './bin/Az.Alb.private.dll'
-
-# Script files (.ps1) that are run in the caller's environment prior to importing this module.
-# ScriptsToProcess = @()
-
-# Type files (.ps1xml) to be loaded when importing this module
-# TypesToProcess = @()
-
-# Format files (.ps1xml) to be loaded when importing this module
-FormatsToProcess = './Az.Alb.format.ps1xml'
-
-# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
-# NestedModules = @()
-
-# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
-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'
-
-# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
-CmdletsToExport = @()
-
-# Variables to export from this module
-# VariablesToExport = @()
-
-# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
-AliasesToExport = '*'
-
-# DSC resources to export from this module
-# DscResourcesToExport = @()
-
-# List of all modules packaged with this module
-# ModuleList = @()
-
-# List of all files packaged with this module
-# FileList = @()
-
-# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
-PrivateData = @{
-
+ GUID = '593f5094-e96e-4646-9c96-5342db09e51a'
+ RootModule = './Az.Alb.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: Alb cmdlets'
+ PowerShellVersion = '5.1'
+ 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'
+ PrivateData = @{
PSData = @{
-
- # Tags applied to this module. These help with module discovery in online galleries.
- Tags = 'Azure','ResourceManager','ARM','PSModule','Alb'
-
- # A URL to the license for this module.
- LicenseUri = 'https://aka.ms/azps-license'
-
- # A URL to the main website for this project.
- ProjectUri = 'https://github.com/Azure/azure-powershell'
-
- # A URL to an icon representing this module.
- # IconUri = ''
-
- # ReleaseNotes of this module
- # ReleaseNotes = ''
-
- # Prerelease string of this module
- # Prerelease = ''
-
- # Flag to indicate whether the module requires explicit user acceptance for install/update/save
- # RequireLicenseAcceptance = $false
-
- # External dependent modules of this module
- # ExternalModuleDependencies = @()
-
- } # End of PSData hashtable
-
- } # End of PrivateData hashtable
-
-# HelpInfo URI of this module
-# HelpInfoURI = ''
-
-# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
-# DefaultCommandPrefix = ''
-
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Alb'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
}
-
diff --git a/src/Alb/Alb.Autorest/README.md b/src/Alb/Alb.Autorest/README.md
index 50e84419eaad..9f24e747900c 100644
--- a/src/Alb/Alb.Autorest/README.md
+++ b/src/Alb/Alb.Autorest/README.md
@@ -35,24 +35,18 @@ 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
+ - $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/servicenetworking/resource-manager/readme.md
try-require:
- $(repo)/specification/servicenetworking/resource-manager/readme.powershell.md
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
@@ -69,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:
@@ -149,16 +146,20 @@ directive:
- where:
verb: New
set:
- preview-message: Application Gateway for Containers is currently in Preview.
+ preview-announcement:
+ preview-message: Application Gateway for Containers is currently in Preview.
- where:
verb: Get
set:
- preview-message: Application Gateway for Containers is currently in Preview.
+ preview-announcement:
+ preview-message: Application Gateway for Containers is currently in Preview.
- where:
verb: Update
set:
- preview-message: Application Gateway for Containers is currently in Preview.
+ preview-announcement:
+ preview-message: Application Gateway for Containers is currently in Preview.
- where:
verb: Remove
set:
- preview-message: Application Gateway for Containers is currently in Preview.
+ preview-announcement:
+ preview-message: Application Gateway for Containers is currently in Preview.
diff --git a/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-associations.json b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-associations.json
new file mode 100644
index 000000000000..22cd98f39792
--- /dev/null
+++ b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-associations.json
@@ -0,0 +1,95 @@
+{
+ "resourceType": "trafficControllers/associations",
+ "apiVersion": "2023-11-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb"
+ },
+ "commands": [
+ {
+ "name": "Get-AzAlbAssociation",
+ "description": "Get a Association",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/get-azalbassociation"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AlbName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a Association",
+ "parameters": [
+ {
+ "name": "-AlbName",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.associationName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzAlbAssociation",
+ "description": "Delete a Association",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/remove-azalbassociation"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AlbName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a Association",
+ "parameters": [
+ {
+ "name": "-AlbName",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.associationName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-frontends.json b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-frontends.json
new file mode 100644
index 000000000000..04d283d7b98f
--- /dev/null
+++ b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers-frontends.json
@@ -0,0 +1,95 @@
+{
+ "resourceType": "trafficControllers/frontends",
+ "apiVersion": "2023-11-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb"
+ },
+ "commands": [
+ {
+ "name": "Get-AzAlbFrontend",
+ "description": "Get a Frontend",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/get-azalbfrontend"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AlbName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a Frontend",
+ "parameters": [
+ {
+ "name": "-AlbName",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.frontendName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzAlbFrontend",
+ "description": "Delete a Frontend",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/remove-azalbfrontend"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AlbName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a Frontend",
+ "parameters": [
+ {
+ "name": "-AlbName",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.frontendName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers.json b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers.json
new file mode 100644
index 000000000000..a91fe1bd7617
--- /dev/null
+++ b/src/Alb/Alb.Autorest/UX/Microsoft.ServiceNetworking/trafficControllers.json
@@ -0,0 +1,85 @@
+{
+ "resourceType": "trafficControllers",
+ "apiVersion": "2023-11-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb"
+ },
+ "commands": [
+ {
+ "name": "Get-AzAlb",
+ "description": "Get a TrafficController",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/get-azalb"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get a TrafficController",
+ "parameters": [
+ {
+ "name": "-Name",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzAlb",
+ "description": "Delete a TrafficController",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.alb/remove-azalb"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete a TrafficController",
+ "parameters": [
+ {
+ "name": "-Name",
+ "value": "[Path.trafficControllerName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Alb/Alb.Autorest/build-module.ps1 b/src/Alb/Alb.Autorest/build-module.ps1
index 7a6a4039d547..cb0ad0459cde 100644
--- a/src/Alb/Alb.Autorest/build-module.ps1
+++ b/src/Alb/Alb.Autorest/build-module.ps1
@@ -12,17 +12,17 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
$ErrorActionPreference = 'Stop'
if($PSEdition -ne 'Core') {
Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
}
-if(-not $Isolated -and -not $Debugger) {
+if(-not $NotIsolated -and -not $Debugger) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
if($LastExitCode -ne 0) {
# Build failed. Don't attempt to run the module.
@@ -45,6 +45,14 @@ if(-not $Isolated -and -not $Debugger) {
}
}
+ if($UX) {
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+ if($LastExitCode -ne 0) {
+ # UX generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
if($Pack) {
. (Join-Path $PSScriptRoot 'pack-module.ps1')
if($LastExitCode -ne 0) {
@@ -143,7 +151,8 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
- Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +171,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
Write-Host -ForegroundColor Green 'Creating example stubs...'
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
+{
+ Write-Host -ForegroundColor Green 'Creating ux metadata...'
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+}
+
Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/Alb/Alb.Autorest/check-dependencies.ps1 b/src/Alb/Alb.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/src/Alb/Alb.Autorest/check-dependencies.ps1
+++ b/src/Alb/Alb.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/src/Alb/Alb.Autorest/create-model-cmdlets.ps1 b/src/Alb/Alb.Autorest/create-model-cmdlets.ps1
index dd01ab685994..bd6dd7aa40ef 100644
--- a/src/Alb/Alb.Autorest/create-model-cmdlets.ps1
+++ b/src/Alb/Alb.Autorest/create-model-cmdlets.ps1
@@ -15,7 +15,7 @@
function CreateModelCmdlet {
- param([string[]]$Models)
+ param([Hashtable[]]$Models)
if ($Models.Count -eq 0)
{
@@ -30,7 +30,6 @@ function CreateModelCmdlet {
} else {
$ModuleName = 'Az.Alb'
}
-
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
$Content = ''
$null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
@@ -39,15 +38,34 @@ function CreateModelCmdlet {
$Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
$Nodes = $Tree.ChildNodes().ChildNodes()
+ $classConstantMember = @{}
foreach ($Model in $Models)
{
- $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
+ $ModelName = $Model.modelName
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") }
+ $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") }
+ $classConstantMember = @()
+ foreach ($class in $ClassNode) {
+ foreach ($member in $class.Members) {
+ $isConstant = $false
+ foreach ($attr in $member.AttributeLists) {
+ $memberName = $attr.Attributes.Name.ToString()
+ if ($memberName.EndsWith('.Constant')) {
+ $isConstant = $true
+ break
+ }
+ }
+ if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) {
+ $classConstantMember += $member.Identifier.Value
+ }
+ }
+ }
if ($InterfaceNode.count -eq 0) {
continue
}
# through a queue, we iterate all the parent models.
$Queue = @($InterfaceNode)
- $visited = @("I$Model")
+ $visited = @("I$ModelName")
$AllInterfaceNodes = @()
while ($Queue.count -ne 0)
{
@@ -65,7 +83,7 @@ function CreateModelCmdlet {
}
$Namespace = $InterfaceNode.Parent.Name
- $ObjectType = $Model
+ $ObjectType = $ModelName
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
# remove duplicated module name
if ($ObjectType.StartsWith('Alb')) {
@@ -81,10 +99,15 @@ function CreateModelCmdlet {
{
foreach ($Member in $Node.Members)
{
+ if ($classConstantMember.Contains($Member.Identifier.Value)) {
+ # skip constant member
+ continue
+ }
$Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
$Required = $false
$Description = ""
$Readonly = $False
+ $mutability = @{Read = $true; Create = $true; Update = $true}
foreach ($Argument in $Arguments)
{
if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
@@ -99,6 +122,18 @@ function CreateModelCmdlet {
{
$Readonly = $Argument.Expression.Token.Value
}
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Read")
+ {
+ $mutability.Read = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Create")
+ {
+ $mutability.Create = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Update")
+ {
+ $mutability.Update = $Argument.Expression.Token.Value
+ }
}
if ($Readonly)
{
@@ -106,8 +141,18 @@ function CreateModelCmdlet {
}
$Identifier = $Member.Identifier.Value
$Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ if ($Type.StartsWith("System.Collections.Generic.List"))
+ {
+ # if the type is a list, we need to convert it to array
+ $matched = $Type -match '\<(?.+)\>$'
+ if ($matched)
+ {
+ $Type = $matches.Name + '[]';
+ }
+ }
$ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
- if ($Required)
+ if ($Required -and $mutability.Create -and $mutability.Update)
{
$ParameterDefinePropertyList.Add("Mandatory")
}
@@ -117,11 +162,9 @@ function CreateModelCmdlet {
}
$ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
# check whether completer is needed
- $completer = '';
- if($Type.Split('.').Split('.')[-2] -eq 'Support') {
- # If Type is an array, need to strip []
- $strippedType = $Type.Replace('[]', '')
- $completer += "`n [ArgumentCompleter([${strippedType}])]"
+ $completer = '';
+ if(IsEnumType($Member)){
+ $completer += GetCompleter($Member)
}
$ParameterDefineScript = "
[Parameter($ParameterDefineProperty)]${completer}
@@ -137,6 +180,12 @@ function CreateModelCmdlet {
$ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
$ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""
+ $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object"
+ if ('' -ne $Model.cmdletName) {
+ $cmdletName = $Model.cmdletName
+ }
+ $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir
+ $cmdletNameInLowerCase = $cmdletName.ToLower()
$Script = "
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -162,9 +211,9 @@ Create an in-memory object for ${ObjectType}.
.Outputs
${ObjectTypeWithNamespace}
.Link
-https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
+https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase}
#>
-function New-Az${ModulePrefix}${ObjectType}Object {
+function ${cmdletName} {
[OutputType('${ObjectTypeWithNamespace}')]
[CmdletBinding(PositionalBinding=`$false)]
Param(
@@ -181,3 +230,33 @@ ${ParameterAssignScript}
Set-Content -Path $OutputPath -Value $Script
}
}
+
+function IsEnumType {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ $isEnum = $false
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $isEnum = $true
+ break
+ }
+ }
+ return $isEnum;
+}
+
+function GetCompleter {
+ param (
+ [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property
+ )
+ foreach ($attr in $property.AttributeLists) {
+ $attributeName = $attr.Attributes.Name.ToString()
+ if ($attributeName.Contains('ArgumentCompleter')) {
+ $attributeName = $attributeName.Split("::")[-1]
+ $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments)
+ $completer += "`n [${attributeName}(${possibleValues})]"
+ return $completer
+ }
+ }
+}
diff --git a/src/Alb/Alb.Autorest/export-surface.ps1 b/src/Alb/Alb.Autorest/export-surface.ps1
index 7186a9a28c5b..9a957fbe3f9a 100644
--- a/src/Alb/Alb.Autorest/export-surface.ps1
+++ b/src/Alb/Alb.Autorest/export-surface.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
$ErrorActionPreference = 'Stop'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/src/Alb/Alb.Autorest/exports/Get-AzAlb.ps1 b/src/Alb/Alb.Autorest/exports/Get-AzAlb.ps1
index 8a7a6d096f5f..03fab9e9d200 100644
--- a/src/Alb/Alb.Autorest/exports/Get-AzAlb.ps1
+++ b/src/Alb/Alb.Autorest/exports/Get-AzAlb.ps1
@@ -29,7 +29,7 @@ Get-AzAlb
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,7 +46,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.alb/get-azalb
#>
function Get-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -159,11 +159,15 @@ begin {
List = 'Az.Alb.private\Get-AzAlb_List';
List1 = 'Az.Alb.private\Get-AzAlb_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Get-AzAlbAssociation.ps1 b/src/Alb/Alb.Autorest/exports/Get-AzAlbAssociation.ps1
index bc58e161c79c..e5d43474f4cb 100644
--- a/src/Alb/Alb.Autorest/exports/Get-AzAlbAssociation.ps1
+++ b/src/Alb/Alb.Autorest/exports/Get-AzAlbAssociation.ps1
@@ -27,7 +27,7 @@ Get-AzAlbAssociation -AlbName test-alb -ResourceGroupName test-rg
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,11 +40,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/get-azalbassociation
#>
function Get-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -55,6 +63,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -83,6 +92,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -160,13 +176,18 @@ begin {
$mapping = @{
Get = 'Az.Alb.private\Get-AzAlbAssociation_Get';
GetViaIdentity = 'Az.Alb.private\Get-AzAlbAssociation_GetViaIdentity';
+ GetViaIdentityTrafficController = 'Az.Alb.private\Get-AzAlbAssociation_GetViaIdentityTrafficController';
List = 'Az.Alb.private\Get-AzAlbAssociation_List';
}
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Get-AzAlbFrontend.ps1 b/src/Alb/Alb.Autorest/exports/Get-AzAlbFrontend.ps1
index b207e98f5c17..a93c975210bb 100644
--- a/src/Alb/Alb.Autorest/exports/Get-AzAlbFrontend.ps1
+++ b/src/Alb/Alb.Autorest/exports/Get-AzAlbFrontend.ps1
@@ -27,7 +27,7 @@ Get-AzAlbFrontend -AlbName test-alb -ResourceGroupName test-rg
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,11 +40,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/get-azalbfrontend
#>
function Get-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -55,6 +63,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -83,6 +92,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -160,13 +176,18 @@ begin {
$mapping = @{
Get = 'Az.Alb.private\Get-AzAlbFrontend_Get';
GetViaIdentity = 'Az.Alb.private\Get-AzAlbFrontend_GetViaIdentity';
+ GetViaIdentityTrafficController = 'Az.Alb.private\Get-AzAlbFrontend_GetViaIdentityTrafficController';
List = 'Az.Alb.private\Get-AzAlbFrontend_List';
}
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/New-AzAlb.ps1 b/src/Alb/Alb.Autorest/exports/New-AzAlb.ps1
index 701d8931f4df..ed28d7cd719c 100644
--- a/src/Alb/Alb.Autorest/exports/New-AzAlb.ps1
+++ b/src/Alb/Alb.Autorest/exports/New-AzAlb.ps1
@@ -23,12 +23,12 @@ Create a TrafficController
New-AzAlb -Name test-alb -ResourceGroupName test-rg -Location NorthCentralUS
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalb
#>
function New-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -59,7 +59,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -153,11 +153,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlb_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/New-AzAlbAssociation.ps1 b/src/Alb/Alb.Autorest/exports/New-AzAlbAssociation.ps1
index 923d3ff308dd..81003437dce8 100644
--- a/src/Alb/Alb.Autorest/exports/New-AzAlbAssociation.ps1
+++ b/src/Alb/Alb.Autorest/exports/New-AzAlbAssociation.ps1
@@ -23,12 +23,12 @@ Create a Association
New-AzAlbAssociation -Name test-association -AlbName test-alb -ResourceGroupName test-rg -Location NorthCentralUS -SubnetId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet01/subnets/alb-subnet
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalbassociation
#>
function New-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -71,7 +71,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -165,11 +165,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlbAssociation_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/New-AzAlbFrontend.ps1 b/src/Alb/Alb.Autorest/exports/New-AzAlbFrontend.ps1
index c04031a3b68b..4152ca97452d 100644
--- a/src/Alb/Alb.Autorest/exports/New-AzAlbFrontend.ps1
+++ b/src/Alb/Alb.Autorest/exports/New-AzAlbFrontend.ps1
@@ -23,12 +23,12 @@ Create a Frontend
New-AzAlbFrontend -Name alb-frontend -AlbName test-alb -ResourceGroupName test-rg -Location NorthCentralUS
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalbfrontend
#>
function New-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -65,7 +65,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -159,11 +159,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlbFrontend_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Alb/Alb.Autorest/exports/ProxyCmdletDefinitions.ps1
index 3f56324f8dc0..29b662ff9b53 100644
--- a/src/Alb/Alb.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/src/Alb/Alb.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -27,7 +27,7 @@ Get-AzAlbAssociation -AlbName test-alb -ResourceGroupName test-rg
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,11 +40,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/get-azalbassociation
#>
function Get-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -55,6 +63,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -83,6 +92,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -160,13 +176,18 @@ begin {
$mapping = @{
Get = 'Az.Alb.private\Get-AzAlbAssociation_Get';
GetViaIdentity = 'Az.Alb.private\Get-AzAlbAssociation_GetViaIdentity';
+ GetViaIdentityTrafficController = 'Az.Alb.private\Get-AzAlbAssociation_GetViaIdentityTrafficController';
List = 'Az.Alb.private\Get-AzAlbAssociation_List';
}
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -224,7 +245,7 @@ Get-AzAlbFrontend -AlbName test-alb -ResourceGroupName test-rg
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -237,11 +258,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/get-azalbfrontend
#>
function Get-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -252,6 +281,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -280,6 +310,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='GetViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -357,13 +394,18 @@ begin {
$mapping = @{
Get = 'Az.Alb.private\Get-AzAlbFrontend_Get';
GetViaIdentity = 'Az.Alb.private\Get-AzAlbFrontend_GetViaIdentity';
+ GetViaIdentityTrafficController = 'Az.Alb.private\Get-AzAlbFrontend_GetViaIdentityTrafficController';
List = 'Az.Alb.private\Get-AzAlbFrontend_List';
}
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -423,7 +465,7 @@ Get-AzAlb
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -440,7 +482,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.alb/get-azalb
#>
function Get-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -553,11 +595,15 @@ begin {
List = 'Az.Alb.private\Get-AzAlb_List';
List1 = 'Az.Alb.private\Get-AzAlb_List1';
}
- if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -611,12 +657,12 @@ Create a Association
New-AzAlbAssociation -Name test-association -AlbName test-alb -ResourceGroupName test-rg -Location NorthCentralUS -SubnetId /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet01/subnets/alb-subnet
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalbassociation
#>
function New-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -659,7 +705,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -753,11 +799,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlbAssociation_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -811,12 +861,12 @@ Create a Frontend
New-AzAlbFrontend -Name alb-frontend -AlbName test-alb -ResourceGroupName test-rg -Location NorthCentralUS
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalbfrontend
#>
function New-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -853,7 +903,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -947,11 +997,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlbFrontend_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1005,12 +1059,12 @@ Create a TrafficController
New-AzAlb -Name test-alb -ResourceGroupName test-rg -Location NorthCentralUS
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Link
https://learn.microsoft.com/powershell/module/az.alb/new-azalb
#>
function New-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -1041,7 +1095,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ITrackedResourceTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -1135,11 +1189,15 @@ begin {
$mapping = @{
CreateExpanded = 'Az.Alb.private\New-AzAlb_CreateExpanded';
}
- if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1208,6 +1266,14 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/remove-azalbassociation
#>
@@ -1222,6 +1288,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -1248,6 +1315,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1343,12 +1417,17 @@ begin {
$mapping = @{
Delete = 'Az.Alb.private\Remove-AzAlbAssociation_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlbAssociation_DeleteViaIdentity';
+ DeleteViaIdentityTrafficController = 'Az.Alb.private\Remove-AzAlbAssociation_DeleteViaIdentityTrafficController';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1417,6 +1496,14 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/remove-azalbfrontend
#>
@@ -1431,6 +1518,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -1457,6 +1545,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1552,12 +1647,17 @@ begin {
$mapping = @{
Delete = 'Az.Alb.private\Remove-AzAlbFrontend_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlbFrontend_DeleteViaIdentity';
+ DeleteViaIdentityTrafficController = 'Az.Alb.private\Remove-AzAlbFrontend_DeleteViaIdentityTrafficController';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1756,11 +1856,15 @@ begin {
Delete = 'Az.Alb.private\Remove-AzAlb_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlb_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1816,7 +1920,7 @@ Update-AzAlbAssociation -Name test-association -AlbName test-alb -ResourceGroupN
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1829,11 +1933,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/update-azalbassociation
#>
function Update-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -1843,6 +1955,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -1869,10 +1982,17 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Alb.Support.AssociationType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.PSArgumentCompleterAttribute("subnets")]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Support.AssociationType]
+ [System.String]
# Association Type
${AssociationType},
@@ -1884,7 +2004,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociationUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -1966,12 +2086,17 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateViaIdentityExpanded';
+ UpdateViaIdentityTrafficControllerExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateViaIdentityTrafficControllerExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2027,7 +2152,7 @@ Update-AzAlbFrontend -Name test-frontend -AlbName test-alb -ResourceGroupName te
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -2040,11 +2165,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/update-azalbfrontend
#>
function Update-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -2054,6 +2187,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -2080,9 +2214,16 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontendUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontendUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -2164,12 +2305,17 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateViaIdentityExpanded';
+ UpdateViaIdentityTrafficControllerExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateViaIdentityTrafficControllerExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2225,7 +2371,7 @@ Update-AzAlb -Name test-alb -ResourceGroupName test-rg -Tag @{TestTag="Test tag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -2242,7 +2388,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.alb/update-azalb
#>
function Update-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -2274,7 +2420,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficControllerUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficControllerUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -2357,11 +2503,15 @@ begin {
UpdateExpanded = 'Az.Alb.private\Update-AzAlb_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlb_UpdateViaIdentityExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Remove-AzAlb.ps1 b/src/Alb/Alb.Autorest/exports/Remove-AzAlb.ps1
index f8337d10745a..af07786fff9e 100644
--- a/src/Alb/Alb.Autorest/exports/Remove-AzAlb.ps1
+++ b/src/Alb/Alb.Autorest/exports/Remove-AzAlb.ps1
@@ -168,11 +168,15 @@ begin {
Delete = 'Az.Alb.private\Remove-AzAlb_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlb_DeleteViaIdentity';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Remove-AzAlbAssociation.ps1 b/src/Alb/Alb.Autorest/exports/Remove-AzAlbAssociation.ps1
index 8751733b65b9..26aec7178087 100644
--- a/src/Alb/Alb.Autorest/exports/Remove-AzAlbAssociation.ps1
+++ b/src/Alb/Alb.Autorest/exports/Remove-AzAlbAssociation.ps1
@@ -38,6 +38,14 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/remove-azalbassociation
#>
@@ -52,6 +60,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -78,6 +87,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -173,12 +189,17 @@ begin {
$mapping = @{
Delete = 'Az.Alb.private\Remove-AzAlbAssociation_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlbAssociation_DeleteViaIdentity';
+ DeleteViaIdentityTrafficController = 'Az.Alb.private\Remove-AzAlbAssociation_DeleteViaIdentityTrafficController';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Remove-AzAlbFrontend.ps1 b/src/Alb/Alb.Autorest/exports/Remove-AzAlbFrontend.ps1
index 7e6b24996d38..d2a96b67f409 100644
--- a/src/Alb/Alb.Autorest/exports/Remove-AzAlbFrontend.ps1
+++ b/src/Alb/Alb.Autorest/exports/Remove-AzAlbFrontend.ps1
@@ -38,6 +38,14 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/remove-azalbfrontend
#>
@@ -52,6 +60,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -78,6 +87,13 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='DeleteViaIdentityTrafficController', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -173,12 +189,17 @@ begin {
$mapping = @{
Delete = 'Az.Alb.private\Remove-AzAlbFrontend_Delete';
DeleteViaIdentity = 'Az.Alb.private\Remove-AzAlbFrontend_DeleteViaIdentity';
+ DeleteViaIdentityTrafficController = 'Az.Alb.private\Remove-AzAlbFrontend_DeleteViaIdentityTrafficController';
}
- if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Update-AzAlb.ps1 b/src/Alb/Alb.Autorest/exports/Update-AzAlb.ps1
index a569c51b9dfe..e9457bce34e4 100644
--- a/src/Alb/Alb.Autorest/exports/Update-AzAlb.ps1
+++ b/src/Alb/Alb.Autorest/exports/Update-AzAlb.ps1
@@ -25,7 +25,7 @@ Update-AzAlb -Name test-alb -ResourceGroupName test-rg -Tag @{TestTag="Test tag
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -42,7 +42,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.alb/update-azalb
#>
function Update-AzAlb {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficController])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficController])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -74,7 +74,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.ITrafficControllerUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ITrafficControllerUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -157,11 +157,15 @@ begin {
UpdateExpanded = 'Az.Alb.private\Update-AzAlb_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlb_UpdateViaIdentityExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Update-AzAlbAssociation.ps1 b/src/Alb/Alb.Autorest/exports/Update-AzAlbAssociation.ps1
index f8c35cd0a0b6..1a9512784650 100644
--- a/src/Alb/Alb.Autorest/exports/Update-AzAlbAssociation.ps1
+++ b/src/Alb/Alb.Autorest/exports/Update-AzAlbAssociation.ps1
@@ -25,7 +25,7 @@ Update-AzAlbAssociation -Name test-association -AlbName test-alb -ResourceGroupN
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -38,11 +38,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/update-azalbassociation
#>
function Update-AzAlbAssociation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -52,6 +60,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Name of Association
@@ -78,10 +87,17 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Alb.Support.AssociationType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.PSArgumentCompleterAttribute("subnets")]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Support.AssociationType]
+ [System.String]
# Association Type
${AssociationType},
@@ -93,7 +109,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociationUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -175,12 +191,17 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateViaIdentityExpanded';
+ UpdateViaIdentityTrafficControllerExpanded = 'Az.Alb.private\Update-AzAlbAssociation_UpdateViaIdentityTrafficControllerExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/exports/Update-AzAlbFrontend.ps1 b/src/Alb/Alb.Autorest/exports/Update-AzAlbFrontend.ps1
index b133fc176502..9760bf39b01d 100644
--- a/src/Alb/Alb.Autorest/exports/Update-AzAlbFrontend.ps1
+++ b/src/Alb/Alb.Autorest/exports/Update-AzAlbFrontend.ps1
@@ -25,7 +25,7 @@ Update-AzAlbFrontend -Name test-frontend -AlbName test-alb -ResourceGroupName te
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend
+Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -38,11 +38,19 @@ INPUTOBJECT : Identity Parameter
[ResourceGroupName ]: The name of the resource group. The name is case insensitive.
[SubscriptionId ]: The ID of the target subscription.
[TrafficControllerName ]: traffic controller name for path
+
+TRAFFICCONTROLLERINPUTOBJECT : Identity Parameter
+ [AssociationName ]: Name of Association
+ [FrontendName ]: Frontends
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [SubscriptionId ]: The ID of the target subscription.
+ [TrafficControllerName ]: traffic controller name for path
.Link
https://learn.microsoft.com/powershell/module/az.alb/update-azalbfrontend
#>
function Update-AzAlbFrontend {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontend])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontend])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -52,6 +60,7 @@ param(
${AlbName},
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
[System.String]
# Frontends
@@ -78,9 +87,16 @@ param(
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
+ [Parameter(ParameterSetName='UpdateViaIdentityTrafficControllerExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAlbIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for TRAFFICCONTROLLERINPUTOBJECT properties and create a hash table.
+ ${TrafficControllerInputObject},
+
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IFrontendUpdateTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IFrontendUpdateTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -162,12 +178,17 @@ begin {
$mapping = @{
UpdateExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateExpanded';
UpdateViaIdentityExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateViaIdentityExpanded';
+ UpdateViaIdentityTrafficControllerExpanded = 'Az.Alb.private\Update-AzAlbFrontend_UpdateViaIdentityTrafficControllerExpanded';
}
- if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/Alb/Alb.Autorest/generate-help.ps1 b/src/Alb/Alb.Autorest/generate-help.ps1
index 421a4240b7fa..0b819ec86d80 100644
--- a/src/Alb/Alb.Autorest/generate-help.ps1
+++ b/src/Alb/Alb.Autorest/generate-help.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated)
+param([switch]$NotIsolated)
$ErrorActionPreference = 'Stop'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
- & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
@@ -66,8 +66,8 @@ foreach($directory in $directories)
$docsPath = Join-Path $docsFolder $directory.Name
$null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
$examplesPath = Join-Path $examplesFolder $directory.Name
-
- Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo
Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
}
diff --git a/src/Alb/Alb.Autorest/generate-portal-ux.ps1 b/src/Alb/Alb.Autorest/generate-portal-ux.ps1
new file mode 100644
index 000000000000..d34da666d671
--- /dev/null
+++ b/src/Alb/Alb.Autorest/generate-portal-ux.ps1
@@ -0,0 +1,374 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+#
+# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal.
+# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages.
+# ----------------------------------------------------------------------------------
+param([switch]$NotIsolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $NotIsolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
+ return
+}
+
+$moduleName = 'Az.Alb'
+$rootModuleName = ''
+if ($rootModuleName -eq "")
+{
+ $rootModuleName = $moduleName
+}
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1")
+$modulePath = $modulePsd1.FullName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll")
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.Alb.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+$parameterSetsInfo = Get-Module -Name "$moduleName.private"
+
+function Test-FunctionSupported()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ If (-not $FunctionName.Contains("_")) {
+ return $false
+ }
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+ If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) {
+ return $false
+ }
+ If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) {
+ return $false
+ }
+
+ $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName]
+ foreach ($parameterInfo in $parameterSetInfo.Parameters.Values)
+ {
+ $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories
+ $invalideCategory = @('Query', 'Body')
+ if ($invalideCategory -contains $category)
+ {
+ return $false
+ }
+ }
+
+ $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*"
+ if ($customFiles.Length -ne 0)
+ {
+ Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it."
+ return $false
+ }
+
+ return $true
+}
+
+function Get-MappedCmdletFromFunctionName()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+
+ return $cmdletName
+}
+
+function Get-ParameterAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+ return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $CmdletInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+
+ return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletDescription()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [String]
+ $CmdletName
+ )
+ $helpInfo = Get-Help $CmdletName -Full
+
+ $description = $helpInfo.Description.Text
+ if ($null -eq $description)
+ {
+ return ""
+ }
+ return $description
+}
+
+# Test whether the parameter is from swagger http path
+function Test-ParameterFromSwagger()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo
+ )
+ $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories
+ $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute"
+ if ($null -ne $doNotExport)
+ {
+ return $false
+ }
+
+ $valideCategory = @('Path')
+ if ($valideCategory -contains $category)
+ {
+ return $true
+ }
+ return $false
+}
+
+function New-ExampleForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories
+ $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName
+ $name = $parameter.Name
+ $result += [ordered]@{
+ name = "-$Name"
+ value = "[$category.$sourceName]"
+ }
+ }
+
+ return $result
+}
+
+function New-ParameterArrayInParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory
+ $parameterName = $parameter.Name
+ $parameterType = $parameter.ParameterType.ToString().Split('.')[1]
+ if ($parameter.SwitchParameter)
+ {
+ $parameterSignature = "-$parameterName"
+ }
+ else
+ {
+ $parameterSignature = "-$parameterName <$parameterType>"
+ }
+ if ($parameterName -eq "SubscriptionId")
+ {
+ $isMandatory = $false
+ }
+ if (-not $isMandatory)
+ {
+ $parameterSignature = "[$parameterSignature]"
+ }
+ $result += $parameterSignature
+ }
+
+ return $result
+}
+
+function New-MetadataForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute"
+ $httpPath = $httpAttribute.Path
+ $apiVersion = $httpAttribute.ApiVersion
+ $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value
+ $resourcePath = "/" + $httpPath.Split("$provider/")[1]
+ $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/"
+ $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name
+ $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description
+ [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo
+ [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo
+
+ return @{
+ Path = $httpPath
+ Provider = $provider
+ ResourceType = $resourceType
+ ApiVersion = $apiVersion
+ CmdletName = $cmdletName
+ Description = $description
+ Example = $example
+ Signature = @{
+ parameters = $signature
+ }
+ }
+}
+
+function Merge-WithExistCmdletMetadata()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Collections.Specialized.OrderedDictionary]
+ $ExistedCmdletInfo,
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature
+ $ExistedCmdletInfo.examples += [ordered]@{
+ description = $ParameterSetMetadata.Description
+ parameters = $ParameterSetMetadata.Example
+ }
+
+ return $ExistedCmdletInfo
+}
+
+function New-MetadataForCmdlet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $cmdletName = $ParameterSetMetadata.CmdletName
+ $description = Get-CmdletDescription $cmdletName
+ $result = [ordered]@{
+ name = $cmdletName
+ description = $description
+ path = $ParameterSetMetadata.Path
+ help = [ordered]@{
+ learnMore = [ordered]@{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower()
+ }
+ parameterSets = @()
+ }
+ examples = @()
+ }
+ $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata
+ return $result
+}
+
+$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) }
+$resourceTypes = @{}
+foreach ($parameterSetName in $parameterSets)
+{
+ $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName]
+ $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo
+ $cmdletName = $parameterSetMetadata.CmdletName
+ if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName)))
+ {
+ continue
+ }
+ if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType))
+ {
+ $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName }
+ if ($ExistedCmdletInfo)
+ {
+ $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo
+ }
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{
+ resourceType = $parameterSetMetadata.ResourceType
+ apiVersion = $parameterSetMetadata.ApiVersion
+ learnMore = @{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower()
+ }
+ commands = @($cmdletInfo)
+ provider = $parameterSetMetadata.Provider
+ }
+ }
+}
+
+$UXFolder = 'UX'
+if (Test-Path $UXFolder)
+{
+ Remove-Item -Path $UXFolder -Recurse
+}
+$null = New-Item -ItemType Directory -Path $UXFolder
+
+foreach ($resourceType in $resourceTypes.Keys)
+{
+ $resourceTypeFileName = $resourceType -replace "/", "-"
+ if ($resourceTypeFileName -eq "")
+ {
+ continue
+ }
+ $resourceTypeInfo = $resourceTypes[$resourceType]
+ $provider = $resourceTypeInfo.provider
+ $providerFolder = "$UXFolder/$provider"
+ if (-not (Test-Path $providerFolder))
+ {
+ $null = New-Item -ItemType Directory -Path $providerFolder
+ }
+ $resourceTypeInfo.Remove("provider")
+ $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json"
+}
diff --git a/src/Alb/Alb.Autorest/generated/api/Alb.cs b/src/Alb/Alb.Autorest/generated/api/Alb.cs
index 4d41a0d80432..507087a43edf 100644
--- a/src/Alb/Alb.Autorest/generated/api/Alb.cs
+++ b/src/Alb/Alb.Autorest/generated/api/Alb.cs
@@ -25,12 +25,13 @@ public partial class Alb
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeUpdate)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -57,11 +58,11 @@ public partial class Alb
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
@@ -73,12 +74,13 @@ public partial class Alb
/// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeUpdate)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -118,207 +120,140 @@ public partial class Alb
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Create a Association
+ ///
+ /// Resource create parameters.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation body, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeUpdate)
{
+ var apiVersion = @"2023-11-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- // this operation supports x-ms-long-running-operation
- var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: azure-async-operation
- var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- var location = _response.GetFirstHeader(@"Location");
- while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
-
- // while we wait, let's grab the headers and get ready to poll.
- if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
- asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
- }
- if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
- location = _response.GetFirstHeader(@"Location");
- }
- var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
- request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
-
- // and let's look at the current response body and see if we have some information we can give back to the listener
- var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // drop the old response
- _response?.Dispose();
-
- // make the polling call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // verify that Identity format is an exact match for uri
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
- break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.UndeclaredResponseException(_response);
- }
- }
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}'");
+ }
- // check for terminal status code
- if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
- {
- continue;
- }
- // we are done polling, do a request on final target?
- // create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var trafficControllerName = _match.Groups["trafficControllerName"].Value;
+ var associationName = _match.Groups["associationName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ServiceNetworking/trafficControllers/"
+ + trafficControllerName
+ + "/associations/"
+ + associationName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- // drop the old response
- _response?.Dispose();
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- // make the final call
- _response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- break;
- }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Association.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
- {
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
- }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.AssociationsInterfaceCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- ///
- /// Validation method for method. Call this like the actual call, but you
- /// will get validation events back.
- ///
+ /// Create a Association
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
/// Name of Association
- /// Resource create parameters.
+ /// Json string supplied to the AssociationsInterfaceCreateOrUpdate operation
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
/// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociation body, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2023-11-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(trafficControllerName),trafficControllerName);
- await eventListener.AssertRegEx(nameof(trafficControllerName),trafficControllerName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
- await eventListener.AssertNotNull(nameof(associationName),associationName);
- await eventListener.AssertRegEx(nameof(associationName),associationName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
- await eventListener.AssertNotNull(nameof(body), body);
- await eventListener.AssertObjectIsValid(nameof(body), body);
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.ServiceNetworking/trafficControllers/"
+ + global::System.Uri.EscapeDataString(trafficControllerName)
+ + "/associations/"
+ + global::System.Uri.EscapeDataString(associationName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.AssociationsInterfaceCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// Delete a Association
+ /// Create a Association
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
/// Name of Association
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Json string supplied to the AssociationsInterfaceCreateOrUpdate operation
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceDelete(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -336,88 +271,84 @@ public partial class Alb
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.AssociationsInterfaceDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.AssociationsInterfaceCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// Delete a Association
- ///
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Create a Association
+ /// The ID of the target subscription.
+ /// The name of the resource group. The name is case insensitive.
+ /// traffic controller name for path
+ /// Name of Association
+ /// Resource create parameters.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
+ /// Allows the caller to choose the depth of the serialization. See .
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation body, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.SerializationMode.IncludeUpdate)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
-
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
- if (!_match.Success)
- {
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}'");
- }
-
- // replace URI parameters with values from identity
- var subscriptionId = _match.Groups["subscriptionId"].Value;
- var resourceGroupName = _match.Groups["resourceGroupName"].Value;
- var trafficControllerName = _match.Groups["trafficControllerName"].Value;
- var associationName = _match.Groups["associationName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
- + subscriptionId
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ "/resourceGroups/"
- + resourceGroupName
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.ServiceNetworking/trafficControllers/"
- + trafficControllerName
+ + global::System.Uri.EscapeDataString(trafficControllerName)
+ "/associations/"
- + associationName
+ + global::System.Uri.EscapeDataString(associationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Delete, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.AssociationsInterfaceDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ return await this.AssociationsInterfaceCreateOrUpdateWithResult_Call (request, eventListener,sender);
}
}
- /// Actual wire call for method.
+ ///
+ /// Actual wire call for method.
+ ///
/// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns 204 (NoContent).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -425,24 +356,19 @@ public partial class Alb
try
{
var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; }
_response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// this operation supports x-ms-long-running-operation
var _originalUri = request.RequestUri.AbsoluteUri;
- // declared final-state-via: location
- var _finalUri = _response.GetFirstHeader(@"Location");
+ // declared final-state-via: azure-async-operation
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
var location = _response.GetFirstHeader(@"Location");
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
{
-
- // get the delay before polling. (default to 30 seconds if not present)
- int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // start the delay timer (we'll await later...)
- var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
// while we wait, let's grab the headers and get ready to poll.
if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
@@ -456,57 +382,53 @@ public partial class Alb
// and let's look at the current response body and see if we have some information we can give back to the listener
var content = await _response.Content.ReadAsStringAsync();
- await waiting;
-
- // check for cancellation
- if( eventListener.Token.IsCancellationRequested ) { return; }
// drop the old response
_response?.Dispose();
// make the polling call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
-
- // if we got back an OK, take a peek inside and see if it's done
- if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
- {
- var error = false;
- try {
- if( Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonObject json)
- {
- var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
- if( state is null )
- {
- // the body doesn't contain any information that has the state of the LRO
- // we're going to just get out, and let the consumer have the result
- break;
- }
-
- switch( state?.ToString()?.ToLower() )
- {
- case "failed":
- error = true;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
break;
- case "succeeded":
- case "canceled":
- // we're done polling.
- break;
-
- default:
- // need to keep polling!
- _response.StatusCode = global::System.Net.HttpStatusCode.Created;
- continue;
- }
- }
- } catch {
- // if we run into a problem peeking into the result,
- // we really don't want to do anything special.
- }
- if (error) {
- throw new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.UndeclaredResponseException(_response);
- }
- }
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.UndeclaredResponseException(_response);
+ }
+ }
// check for terminal status code
if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
@@ -515,37 +437,44 @@ public partial class Alb
}
// we are done polling, do a request on final target?
// create a new request with the final uri
- request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
// drop the old response
_response?.Dispose();
// make the final call
_response = await sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
break;
}
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
{
case global::System.Net.HttpStatusCode.OK:
{
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response);
- break;
- }
- case global::System.Net.HttpStatusCode.NoContent:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onNoContent(_response);
- break;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Association.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) );
+ return await _result;
}
default:
{
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) );
+ // Error Response : default
+ var code = (await _result)?.Code;
+ var message = (await _result)?.Message;
+ if ((null == code || null == message))
+ {
+ // Unrecognized Response. Create an error record based on what we have.
+ var ex = new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.RestException(_response, await _result);
+ throw ex;
+ }
+ else
+ {
+ throw new global::System.Exception($"[{code}] : {message}");
+ }
}
}
}
@@ -560,18 +489,159 @@ public partial class Alb
}
///
- /// Validation method for method. Call this like the actual call, but you will
- /// get validation events back.
+ /// Actual wire call for method.
+ ///
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: azure-async-operation
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Association.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you
+ /// will get validation events back.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
/// Name of Association
+ /// Resource create parameters.
/// an instance that will receive events.
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceDelete_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.IAssociation body, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -581,18 +651,21 @@ public partial class Alb
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
await eventListener.AssertNotNull(nameof(trafficControllerName),trafficControllerName);
- await eventListener.AssertRegEx(nameof(trafficControllerName),trafficControllerName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ await eventListener.AssertRegEx(nameof(trafficControllerName), trafficControllerName, @"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
await eventListener.AssertNotNull(nameof(associationName),associationName);
- await eventListener.AssertRegEx(nameof(associationName),associationName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ await eventListener.AssertRegEx(nameof(associationName), associationName, @"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
}
}
- /// Get a Association
+ /// Delete a Association
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
/// Name of Association
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -600,9 +673,9 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceGet(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceDelete(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -624,18 +697,19 @@ public partial class Alb
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
}
}
- /// Get a Association
+ /// Delete a Association
///
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -643,9 +717,9 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -680,18 +754,19 @@ public partial class Alb
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get, _url);
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Delete, _url);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceGet_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender);
}
}
- /// Actual wire call for method.
+ /// Actual wire call for method.
/// the prepared HttpRequestMessage to send.
/// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
/// an instance that will receive events.
@@ -699,7 +774,7 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -708,8 +783,98 @@ public partial class Alb
{
var sendTask = sender.SendAsync(request, eventListener);
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; }
_response = await sendTask;
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: location
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ // delay before making the next polling request
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ break;
+ }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; }
var _contentType = _response.Content.Headers.ContentType?.MediaType;
switch ( _response.StatusCode )
@@ -717,13 +882,19 @@ public partial class Alb
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.Association.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -739,8 +910,8 @@ public partial class Alb
}
///
- /// Validation method for method. Call this like the actual call, but you will get
- /// validation events back.
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
///
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
@@ -750,7 +921,7 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceGet_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceDelete_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -760,16 +931,17 @@ public partial class Alb
await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
await eventListener.AssertNotNull(nameof(trafficControllerName),trafficControllerName);
- await eventListener.AssertRegEx(nameof(trafficControllerName),trafficControllerName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ await eventListener.AssertRegEx(nameof(trafficControllerName), trafficControllerName, @"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
await eventListener.AssertNotNull(nameof(associationName),associationName);
- await eventListener.AssertRegEx(nameof(associationName),associationName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ await eventListener.AssertRegEx(nameof(associationName), associationName, @"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
}
}
- /// List Association resources by TrafficController
+ /// Get a Association
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
+ /// Name of Association
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
/// elsewhere).
@@ -778,9 +950,9 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceListByTrafficController(string subscriptionId, string resourceGroupName, string trafficControllerName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceGet(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -792,7 +964,8 @@ public partial class Alb
+ global::System.Uri.EscapeDataString(resourceGroupName)
+ "/providers/Microsoft.ServiceNetworking/trafficControllers/"
+ global::System.Uri.EscapeDataString(trafficControllerName)
- + "/associations"
+ + "/associations/"
+ + global::System.Uri.EscapeDataString(associationName)
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -806,11 +979,11 @@ public partial class Alb
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceListByTrafficController_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
- /// List Association resources by TrafficController
+ /// Get a Association
///
/// a delegate that is called when the remote service returns 200 (OK).
/// a delegate that is called when the remote service returns default (any response code not handled
@@ -820,24 +993,25 @@ public partial class Alb
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceListByTrafficControllerViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
// verify that Identity format is an exact match for uri
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
if (!_match.Success)
{
- throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations'");
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}'");
}
// replace URI parameters with values from identity
var subscriptionId = _match.Groups["subscriptionId"].Value;
var resourceGroupName = _match.Groups["resourceGroupName"].Value;
var trafficControllerName = _match.Groups["trafficControllerName"].Value;
+ var associationName = _match.Groups["associationName"].Value;
// construct URL
var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
"/subscriptions/"
@@ -846,7 +1020,8 @@ public partial class Alb
+ resourceGroupName
+ "/providers/Microsoft.ServiceNetworking/trafficControllers/"
+ trafficControllerName
- + "/associations"
+ + "/associations/"
+ + associationName
+ "?"
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
@@ -860,103 +1035,78 @@ public partial class Alb
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
// make the call
- await this.AssociationsInterfaceListByTrafficController_Call(request,onOk,onDefault,eventListener,sender);
+ await this.AssociationsInterfaceGet_Call (request, onOk,onDefault,eventListener,sender);
}
}
- ///
- /// Actual wire call for method.
- ///
- /// the prepared HttpRequestMessage to send.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Get a Association
+ ///
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceListByTrafficController_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
+ var apiVersion = @"2023-11-01";
+ // Constant Parameters
using( NoSynchronizationContext )
{
- global::System.Net.Http.HttpResponseMessage _response = null;
- try
- {
- var sendTask = sender.SendAsync(request, eventListener);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
- _response = await sendTask;
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- var _contentType = _response.Content.Headers.ContentType?.MediaType;
+ // verify that Identity format is an exact match for uri
- switch ( _response.StatusCode )
- {
- case global::System.Net.HttpStatusCode.OK:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.AssociationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- default:
- {
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Json.JsonNode.Parse(body.Result)) ));
- break;
- }
- }
- }
- finally
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity);
+ if (!_match.Success)
{
- // finally statements
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Finally, request, _response);
- _response?.Dispose();
- request?.Dispose();
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}'");
}
- }
- }
- ///
- /// Validation method for method. Call this like the actual call,
- /// but you will get validation events back.
- ///
- /// The ID of the target subscription.
- /// The name of the resource group. The name is case insensitive.
- /// traffic controller name for path
- /// an instance that will receive events.
- ///
- /// A that will be complete when handling of the response is completed.
- ///
- internal async global::System.Threading.Tasks.Task AssociationsInterfaceListByTrafficController_Validate(string subscriptionId, string resourceGroupName, string trafficControllerName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener)
- {
- using( NoSynchronizationContext )
- {
- await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
- await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1);
- await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
- await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
- await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
- await eventListener.AssertNotNull(nameof(trafficControllerName),trafficControllerName);
- await eventListener.AssertRegEx(nameof(trafficControllerName),trafficControllerName,@"^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$");
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var trafficControllerName = _match.Groups["trafficControllerName"].Value;
+ var associationName = _match.Groups["associationName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.ServiceNetworking/trafficControllers/"
+ + trafficControllerName
+ + "/associations/"
+ + associationName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ // make the call
+ return await this.AssociationsInterfaceGetWithResult_Call (request, eventListener,sender);
}
}
- /// Update a Association
+ /// Get a Association
/// The ID of the target subscription.
/// The name of the resource group. The name is case insensitive.
/// traffic controller name for path
/// Name of Association
- /// The resource properties to be updated.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceUpdate(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task AssociationsInterfaceGetWithResult(string subscriptionId, string resourceGroupName, string trafficControllerName, string associationName, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -974,85 +1124,80 @@ public partial class Alb
+ "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
// generate request object
var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
- var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Patch, _url);
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; }
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
- // set body content
- request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
- request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; }
// make the call
- await this.AssociationsInterfaceUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ return await this.AssociationsInterfaceGetWithResult_Call (request, eventListener,sender);
}
}
- /// Update a Association
- ///
- /// The resource properties to be updated.
- /// a delegate that is called when the remote service returns 200 (OK).
- /// a delegate that is called when the remote service returns default (any response code not handled
- /// elsewhere).
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
/// an instance that will receive events.
/// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync pipeline to use to make the request.
///
- /// A that will be complete when handling of the response is completed.
+ /// A that
+ /// will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task AssociationsInterfaceUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Alb.Models.Api20230501Preview.IAssociationUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task AssociationsInterfaceGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01-preview";
- // Constant Parameters
using( NoSynchronizationContext )
{
- // verify that Identity format is an exact match for uri
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Alb.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
- var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.ServiceNetworking/trafficControllers/(?[^/]+)/associations/(?