diff --git a/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.format.ps1xml b/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.format.ps1xml index 966afcf7d53b..af54d8efd51a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.format.ps1xml +++ b/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.format.ps1xml @@ -181,6 +181,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCount + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCount#Multiple + + + + + + + + + + + + + + + Count + + + State + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ProxyResource @@ -453,6 +481,114 @@ + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResource + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceProperties + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceProperties#Multiple + + + + + + + + + + + + ProvisioningState + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyPoolIdentity @@ -463,6 +599,9 @@ + + + @@ -482,6 +621,9 @@ ResourceGroupName + + RuntimeView + StandbyContainerGroupPoolName @@ -509,6 +651,9 @@ + + + @@ -516,6 +661,9 @@ MaxReadyCapacity + + MinReadyCapacity + @@ -531,6 +679,9 @@ + + + @@ -538,6 +689,9 @@ MaxReadyCapacity + + MinReadyCapacity + @@ -719,6 +873,114 @@ + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResource + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceListResult + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceProperties + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceProperties#Multiple + + + + + + + + + + + + ProvisioningState + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachineResource @@ -971,5 +1233,27 @@ + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummary + + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummary#Multiple + + + + + + + + + + + + Zone + + + + + + \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.psd1 b/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.psd1 index a0bc22b2d60b..16e5966b5835 100644 --- a/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.psd1 +++ b/src/StandbyPool/StandbyPool.Autorest/Az.StandbyPool.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.StandbyPool.private.dll' FormatsToProcess = './Az.StandbyPool.format.ps1xml' - FunctionsToExport = 'Get-AzStandbyContainerGroupPool', 'Get-AzStandbyVMPool', 'Get-AzStandbyVMPoolVM', 'New-AzStandbyContainerGroupPool', 'New-AzStandbyVMPool', 'Remove-AzStandbyContainerGroupPool', 'Remove-AzStandbyVMPool', 'Update-AzStandbyContainerGroupPool', 'Update-AzStandbyVMPool' + FunctionsToExport = 'Get-AzStandbyContainerGroupPool', 'Get-AzStandbyContainerGroupPoolStatus', 'Get-AzStandbyVMPool', 'Get-AzStandbyVMPoolStatus', 'New-AzStandbyContainerGroupPool', 'New-AzStandbyVMPool', 'Remove-AzStandbyContainerGroupPool', 'Remove-AzStandbyVMPool', 'Update-AzStandbyContainerGroupPool', 'Update-AzStandbyVMPool' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StandbyPool' diff --git a/src/StandbyPool/StandbyPool.Autorest/README.md b/src/StandbyPool/StandbyPool.Autorest/README.md index 00bb6bf7f36a..883cfa6bd7e0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/README.md +++ b/src/StandbyPool/StandbyPool.Autorest/README.md @@ -28,7 +28,8 @@ For information on how to develop for `Az.StandbyPool`, see [how-to.md](how-to.m ```yaml # pin the swagger version by using the commit id instead of branch name -commit: 5cbd7c23897da22f52da4f02534b2819abe9f761 +commit: 1866fc3609f55fad6a5e74a9b206ae4ca144c03a +tag: package-2024-03 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md @@ -63,14 +64,21 @@ directive: subject: StandbyVirtualMachinePool set: subject: StandbyVMPool - - # Rename StandbyVirtualMachine to StandbyVM + + # Rename Get-AzStandbyVirtualMachinePoolRuntimeView to Get-AzStandbyVMPoolStatus - where: verb: Get - subject: StandbyVirtualMachine + subject: StandbyVirtualMachinePoolRuntimeView set: - subject: StandbyVMPoolVM + subject: StandbyVMPoolStatus + # Rename Get-AzStandbyContainerGroupPoolRuntimeView to Get-AzStandbyContainerGroupPoolStatus + - where: + verb: Get + subject: StandbyContainerGroupPoolRuntimeView + set: + subject: StandbyContainerGroupPoolStatus + # Rename standby container group pool parameters - where: verb: New|Update @@ -99,13 +107,27 @@ directive: parameter-name: ElasticityProfileRefillPolicy set: parameter-name: RefillPolicy - + - where: verb: New|Update subject: StandbyContainerGroupPool parameter-name: ContainerGroupPropertySubnetId set: parameter-name: SubnetId + + - where: + verb: Get + subject: StandbyContainerGroupPoolStatus + parameter-name: StandbyContainerGroupPoolName + set: + parameter-name: Name + + - where: + verb: Get + subject: StandbyContainerGroupPoolStatus + parameter-name: RuntimeView + set: + parameter-name: Version # Rename standby virtual machine pool parameters - where: @@ -122,6 +144,13 @@ directive: set: parameter-name: MaxReadyCapacity + - where: + verb: New|Update + subject: StandbyVMPool + parameter-name: ElasticityProfileMinReadyCapacity + set: + parameter-name: MinReadyCapacity + - where: verb: New|Update subject: StandbyVMPool @@ -129,14 +158,13 @@ directive: set: parameter-name: VMState -# Rename standby virtual machine parameters - where: verb: Get subject: StandbyVMPoolVM parameter-name: Name set: parameter-name: VMName - + - where: verb: Get subject: StandbyVMPoolVM @@ -144,6 +172,45 @@ directive: set: parameter-name: Name + - where: + verb: Get + subject: StandbyVMPoolStatus + parameter-name: StandbyVirtualMachinePoolName + set: + parameter-name: Name + + - where: + verb: Get + subject: StandbyVMPoolStatus + parameter-name: RuntimeView + set: + parameter-name: Version + + # Hide parameters from cmdlets + - where: + verb: Get + subject: StandbyVMPoolStatus + parameter-name: Version + hide: true + set: + default: + script: "'latest'" + + - where: + verb: Get + subject: StandbyContainerGroupPoolStatus + parameter-name: Version + hide: true + set: + default: + script: "'latest'" + + # Remove Get-StandbyVirtualMachine + - where: + verb: Get + subject: StandbyVirtualMachine + remove: true + # Remove the set-* cmdlet - where: verb: Set diff --git a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools-runtimeViews.json b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools-runtimeViews.json new file mode 100644 index 000000000000..6c0d65cec131 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools-runtimeViews.json @@ -0,0 +1,47 @@ +{ + "resourceType": "standbyContainerGroupPools/runtimeViews", + "apiVersion": "2024-03-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.standbypool" + }, + "commands": [ + { + "name": "Get-AzStandbyContainerGroupPoolStatus", + "description": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppoolstatus" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "parameters": [ + { + "name": "-Name", + "value": "[Path.standbyContainerGroupPoolName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools.json b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools.json index 4e05bde920c0..df84a297e4bc 100644 --- a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools.json +++ b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyContainerGroupPools.json @@ -1,6 +1,6 @@ { "resourceType": "standbyContainerGroupPools", - "apiVersion": "2023-12-01-preview", + "apiVersion": "2024-03-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.standbypool" }, diff --git a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-standbyVirtualMachines.json b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-runtimeViews.json similarity index 62% rename from src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-standbyVirtualMachines.json rename to src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-runtimeViews.json index 1b9458490ee4..d55827742807 100644 --- a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-standbyVirtualMachines.json +++ b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools-runtimeViews.json @@ -1,32 +1,31 @@ { - "resourceType": "standbyVirtualMachinePools/standbyVirtualMachines", - "apiVersion": "2023-12-01-preview", + "resourceType": "standbyVirtualMachinePools/runtimeViews", + "apiVersion": "2024-03-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.standbypool" }, "commands": [ { - "name": "Get-AzStandbyVMPoolVM", - "description": "Get a StandbyVirtualMachineResource", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", + "name": "Get-AzStandbyVMPoolStatus", + "description": "Get a StandbyVirtualMachinePoolRuntimeViewResource", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", "help": { "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm" + "url": "https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolstatus" }, "parameterSets": [ { "parameters": [ "-Name ", "-ResourceGroupName ", - "[-SubscriptionId ]", - "-VMName " + "[-SubscriptionId ]" ] } ] }, "examples": [ { - "description": "Get a StandbyVirtualMachineResource", + "description": "Get a StandbyVirtualMachinePoolRuntimeViewResource", "parameters": [ { "name": "-Name", @@ -39,10 +38,6 @@ { "name": "-SubscriptionId", "value": "[Path.subscriptionId]" - }, - { - "name": "-VMName", - "value": "[Path.standbyVirtualMachineName]" } ] } diff --git a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools.json b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools.json index ea1733382ddd..41a7e4fb9f83 100644 --- a/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools.json +++ b/src/StandbyPool/StandbyPool.Autorest/UX/Microsoft.StandbyPool/standbyVirtualMachinePools.json @@ -1,6 +1,6 @@ { "resourceType": "standbyVirtualMachinePools", - "apiVersion": "2023-12-01-preview", + "apiVersion": "2024-03-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.standbypool" }, diff --git a/src/StandbyPool/StandbyPool.Autorest/build-module.ps1 b/src/StandbyPool/StandbyPool.Autorest/build-module.ps1 index 98d26963ab03..c5c70b3928b9 100644 --- a/src/StandbyPool/StandbyPool.Autorest/build-module.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/build-module.ps1 @@ -12,7 +12,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks) $ErrorActionPreference = 'Stop' if($PSEdition -ne 'Core') { @@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') } +if (-not $DisableAfterBuildTasks){ + $afterBuildTasksPath = Join-Path $PSScriptRoot '' + $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable + if(Test-Path -Path $afterBuildTasksPath -PathType leaf){ + Write-Host -ForegroundColor Green 'Running after build tasks...' + . $afterBuildTasksPath @afterBuildTasksArgs + } +} + + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPool.md index 5f3aba3cba71..6c4d58a44ef9 100644 --- a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPool.md @@ -1,4 +1,4 @@ -### Example 1: Get a standby container pool +### Example 1: Get a standby container group pool ```powershell Get-AzStandbyContainerGroupPool ` -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` @@ -30,4 +30,4 @@ Tag : { Type : microsoft.standbypool/standbycontainergrouppools ``` -Above command is getting a standby container pool. +Above command is getting a standby container group pool. diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPoolStatus.md b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPoolStatus.md new file mode 100644 index 000000000000..c469fef2bbc9 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyContainerGroupPoolStatus.md @@ -0,0 +1,40 @@ +### Example 1: Get runtime view of a standby container group pool +```powershell +Get-AzStandbyContainerGroupPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-Name testPool ` +-ResourceGroupName test-standbypool +``` + +```output +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyContainerGroupPools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 1 + }, + { + "state": "Running", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews +``` + +Above command is getting a runtime veiw of standby container group pool. \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPool.md index c1197cb78497..850e2d7dad27 100644 --- a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPool.md @@ -9,6 +9,7 @@ Get-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolStatus.md b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolStatus.md new file mode 100644 index 000000000000..3bdd38b04ef1 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolStatus.md @@ -0,0 +1,52 @@ +### Example 1: Get runtime view of a standby virtual machine pool +```powershell +Get-AzStandbyVMPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-ResourceGroupName test-standbypool ` +-Name testPool +``` + +```output +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyVirtualMachinePools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 0 + }, + { + "state": "Starting", + "count": 0 + }, + { + "state": "Running", + "count": 1 + }, + { + "state": "Deallocating", + "count": 0 + }, + { + "state": "Deallocated", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews +``` + +Above command is getting a runtime veiw of standby virtual machine pool. diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolVM.md b/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolVM.md deleted file mode 100644 index cb921f1f6527..000000000000 --- a/src/StandbyPool/StandbyPool.Autorest/examples/Get-AzStandbyVMPoolVM.md +++ /dev/null @@ -1,10 +0,0 @@ -### Example 1: List virtual machines in standby virtual machine pool -```powershell -Get-AzStandbyVMPoolVM -Name testPool -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b -ResourceGroupName test-standbypool -``` - -```output -None -``` - -Above command is listing virtual machines in standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/New-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/examples/New-AzStandbyVMPool.md index dce0fa09d259..4e06f5d07e75 100644 --- a/src/StandbyPool/StandbyPool.Autorest/examples/New-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/examples/New-AzStandbyVMPool.md @@ -7,12 +7,14 @@ New-AzStandbyVMPool ` -Location eastus ` -VMSSId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ` -MaxReadyCapacity 1 ` +-MinReadyCapacity 1 ` -VMState Running ``` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool diff --git a/src/StandbyPool/StandbyPool.Autorest/examples/Update-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/examples/Update-AzStandbyVMPool.md index 38f88ce6b9ef..8dbc1cef4d41 100644 --- a/src/StandbyPool/StandbyPool.Autorest/examples/Update-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/examples/Update-AzStandbyVMPool.md @@ -10,6 +10,7 @@ Update-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 2 +ElasticityProfileMinReadyCapacity : 2 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPool.ps1 index 815a6ac5c2f2..24f6e209d6c0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPool.ps1 @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPoolStatus.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPoolStatus.ps1 new file mode 100644 index 000000000000..de866602f94a --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyContainerGroupPoolStatus.ps1 @@ -0,0 +1,237 @@ + +# ---------------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a StandbyContainerGroupPoolRuntimeViewResource +.Description +Get a StandbyContainerGroupPoolRuntimeViewResource +.Example +Get-AzStandbyContainerGroupPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-Name testPool ` +-ResourceGroupName test-standbypool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. + [StandbyContainerGroupPoolName ]: Name of the standby container group pool + [StandbyVirtualMachineName ]: Name of the standby virtual machine + [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +STANDBYCONTAINERGROUPPOOLINPUTOBJECT : Identity Parameter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. + [StandbyContainerGroupPoolName ]: Name of the standby container group pool + [StandbyVirtualMachineName ]: Name of the standby virtual machine + [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppoolstatus +#> +function Get-AzStandbyContainerGroupPoolStatus { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [System.String] + # Name of the standby container group pool + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStandbyContainerGroupPool', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] + # Identity Parameter + ${StandbyContainerGroupPoolInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_Get'; + GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_GetViaIdentity'; + GetViaIdentityStandbyContainerGroupPool = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool'; + List = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + if (('Get', 'GetViaIdentityStandbyContainerGroupPool') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Version') ) { + $PSBoundParameters['Version'] = 'latest' + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPool.ps1 index 2e224e02e030..8c8f02683181 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPool.ps1 @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolVM.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolStatus.ps1 similarity index 88% rename from src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolVM.ps1 rename to src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolStatus.ps1 index 00f7e9c3ed0b..582122512202 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolVM.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Get-AzStandbyVMPoolStatus.ps1 @@ -16,16 +16,19 @@ <# .Synopsis -Get a StandbyVirtualMachineResource +Get a StandbyVirtualMachinePoolRuntimeViewResource .Description -Get a StandbyVirtualMachineResource +Get a StandbyVirtualMachinePoolRuntimeViewResource .Example -Get-AzStandbyVMPoolVM -Name testPool -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b -ResourceGroupName test-standbypool +Get-AzStandbyVMPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-ResourceGroupName test-standbypool ` +-Name testPool .Inputs Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource .Notes COMPLEX PARAMETER PROPERTIES @@ -34,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -42,20 +46,20 @@ INPUTOBJECT : Identity Parameter STANDBYVIRTUALMACHINEPOOLINPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link -https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm +https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolstatus #> -function Get-AzStandbyVMPoolVM { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzStandbyVMPoolStatus { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] - [Alias('StandbyVirtualMachinePoolName')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] [System.String] # Name of the standby virtual machine pool @@ -78,14 +82,6 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityStandbyVirtualMachinePool', Mandatory)] - [Alias('StandbyVirtualMachineName')] - [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] - [System.String] - # Name of the standby virtual machine - ${VMName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] @@ -173,10 +169,10 @@ begin { } $mapping = @{ - Get = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_Get'; - GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_GetViaIdentity'; - GetViaIdentityStandbyVirtualMachinePool = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool'; - List = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_List'; + Get = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_Get'; + GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_GetViaIdentity'; + GetViaIdentityStandbyVirtualMachinePool = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool'; + List = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false @@ -187,6 +183,9 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } + if (('Get', 'GetViaIdentityStandbyVirtualMachinePool') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Version') ) { + $PSBoundParameters['Version'] = 'latest' + } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/New-AzStandbyVMPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/New-AzStandbyVMPool.ps1 index 8601b242e9e3..3f44cada5d92 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/New-AzStandbyVMPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/New-AzStandbyVMPool.ps1 @@ -27,6 +27,7 @@ New-AzStandbyVMPool ` -Location eastus ` -VMSSId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ` -MaxReadyCapacity 1 ` +-MinReadyCapacity 1 ` -VMState Running .Outputs @@ -69,9 +70,16 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [System.Int64] - # Specifies maximum number of virtual machines in the standby virtual machine pool. + # Specifies the maximum number of virtual machines in the standby virtual machine pool. ${MaxReadyCapacity}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] + [System.Int64] + # Specifies the desired minimum number of virtual machines in the standby virtual machine pool. + # MinReadyCapacity cannot exceed MaxReadyCapacity. + ${MinReadyCapacity}, + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ITrackedResourceTags]))] diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/ProxyCmdletDefinitions.ps1 index 71c0e6192de9..3f43cdcfa2e6 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -14,6 +14,228 @@ # is regenerated. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Get a StandbyContainerGroupPoolRuntimeViewResource +.Description +Get a StandbyContainerGroupPoolRuntimeViewResource +.Example +Get-AzStandbyContainerGroupPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-Name testPool ` +-ResourceGroupName test-standbypool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. + [StandbyContainerGroupPoolName ]: Name of the standby container group pool + [StandbyVirtualMachineName ]: Name of the standby virtual machine + [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +STANDBYCONTAINERGROUPPOOLINPUTOBJECT : Identity Parameter + [Id ]: Resource identity path + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. + [StandbyContainerGroupPoolName ]: Name of the standby container group pool + [StandbyVirtualMachineName ]: Name of the standby virtual machine + [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppoolstatus +#> +function Get-AzStandbyContainerGroupPoolStatus { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [System.String] + # Name of the standby container group pool + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStandbyContainerGroupPool', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] + # Identity Parameter + ${StandbyContainerGroupPoolInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_Get'; + GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_GetViaIdentity'; + GetViaIdentityStandbyContainerGroupPool = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool'; + List = 'Az.StandbyPool.private\Get-AzStandbyContainerGroupPoolStatus_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + if (('Get', 'GetViaIdentityStandbyContainerGroupPool') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Version') ) { + $PSBoundParameters['Version'] = 'latest' + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + <# .Synopsis Get a StandbyContainerGroupPoolResource @@ -37,6 +259,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -220,16 +443,19 @@ end { <# .Synopsis -Get a StandbyVirtualMachineResource +Get a StandbyVirtualMachinePoolRuntimeViewResource .Description -Get a StandbyVirtualMachineResource +Get a StandbyVirtualMachinePoolRuntimeViewResource .Example -Get-AzStandbyVMPoolVM -Name testPool -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b -ResourceGroupName test-standbypool +Get-AzStandbyVMPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-ResourceGroupName test-standbypool ` +-Name testPool .Inputs Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource +Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource .Notes COMPLEX PARAMETER PROPERTIES @@ -238,6 +464,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -246,20 +473,20 @@ INPUTOBJECT : Identity Parameter STANDBYVIRTUALMACHINEPOOLINPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link -https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm +https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolstatus #> -function Get-AzStandbyVMPoolVM { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzStandbyVMPoolStatus { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] - [Alias('StandbyVirtualMachinePoolName')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] [System.String] # Name of the standby virtual machine pool @@ -282,14 +509,6 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityStandbyVirtualMachinePool', Mandatory)] - [Alias('StandbyVirtualMachineName')] - [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] - [System.String] - # Name of the standby virtual machine - ${VMName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity] @@ -377,10 +596,10 @@ begin { } $mapping = @{ - Get = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_Get'; - GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_GetViaIdentity'; - GetViaIdentityStandbyVirtualMachinePool = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool'; - List = 'Az.StandbyPool.private\Get-AzStandbyVMPoolVM_List'; + Get = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_Get'; + GetViaIdentity = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_GetViaIdentity'; + GetViaIdentityStandbyVirtualMachinePool = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool'; + List = 'Az.StandbyPool.private\Get-AzStandbyVMPoolStatus_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false @@ -391,6 +610,9 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } + if (('Get', 'GetViaIdentityStandbyVirtualMachinePool') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Version') ) { + $PSBoundParameters['Version'] = 'latest' + } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ @@ -464,6 +686,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -920,6 +1143,7 @@ New-AzStandbyVMPool ` -Location eastus ` -VMSSId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ` -MaxReadyCapacity 1 ` +-MinReadyCapacity 1 ` -VMState Running .Outputs @@ -962,9 +1186,16 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [System.Int64] - # Specifies maximum number of virtual machines in the standby virtual machine pool. + # Specifies the maximum number of virtual machines in the standby virtual machine pool. ${MaxReadyCapacity}, + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] + [System.Int64] + # Specifies the desired minimum number of virtual machines in the standby virtual machine pool. + # MinReadyCapacity cannot exceed MaxReadyCapacity. + ${MinReadyCapacity}, + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ITrackedResourceTags]))] @@ -1171,6 +1402,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -1389,6 +1621,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -1607,6 +1840,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -1875,6 +2109,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -1924,9 +2159,17 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [System.Int64] - # Specifies maximum number of virtual machines in the standby virtual machine pool. + # Specifies the maximum number of virtual machines in the standby virtual machine pool. ${MaxReadyCapacity}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] + [System.Int64] + # Specifies the desired minimum number of virtual machines in the standby virtual machine pool. + # MinReadyCapacity cannot exceed MaxReadyCapacity. + ${MinReadyCapacity}, + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyContainerGroupPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyContainerGroupPool.ps1 index 0be705a37efb..e42e311f2806 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyContainerGroupPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyContainerGroupPool.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyVMPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyVMPool.ps1 index be944388091e..35c748b2a544 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyVMPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Remove-AzStandbyVMPool.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyContainerGroupPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyContainerGroupPool.ps1 index 48ba9285bd6d..36e1d5cc7526 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyContainerGroupPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyContainerGroupPool.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool diff --git a/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyVMPool.ps1 b/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyVMPool.ps1 index 4a00d7c6c894..605de572922b 100644 --- a/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyVMPool.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/exports/Update-AzStandbyVMPool.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [Id ]: Resource identity path [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [RuntimeView ]: The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. [StandbyContainerGroupPoolName ]: Name of the standby container group pool [StandbyVirtualMachineName ]: Name of the standby virtual machine [StandbyVirtualMachinePoolName ]: Name of the standby virtual machine pool @@ -87,9 +88,17 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] [System.Int64] - # Specifies maximum number of virtual machines in the standby virtual machine pool. + # Specifies the maximum number of virtual machines in the standby virtual machine pool. ${MaxReadyCapacity}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] + [System.Int64] + # Specifies the desired minimum number of virtual machines in the standby virtual machine pool. + # MinReadyCapacity cannot exceed MaxReadyCapacity. + ${MinReadyCapacity}, + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category('Body')] diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.PowerShell.cs new file mode 100644 index 000000000000..16104f8b7892 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.PowerShell.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(ContainerGroupInstanceCountSummaryTypeConverter))] + public partial class ContainerGroupInstanceCountSummary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ContainerGroupInstanceCountSummary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountsByState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummaryInternal)this).InstanceCountsByState = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountsByState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummaryInternal)this).InstanceCountsByState, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCountTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ContainerGroupInstanceCountSummary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountsByState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummaryInternal)this).InstanceCountsByState = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountsByState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummaryInternal)this).InstanceCountsByState, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCountTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ContainerGroupInstanceCountSummary(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ContainerGroupInstanceCountSummary(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(ContainerGroupInstanceCountSummaryTypeConverter))] + public partial interface IContainerGroupInstanceCountSummary + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.TypeConverter.cs new file mode 100644 index 000000000000..ff5b7f7ff6f7 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ContainerGroupInstanceCountSummaryTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ContainerGroupInstanceCountSummary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ContainerGroupInstanceCountSummary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ContainerGroupInstanceCountSummary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.cs new file mode 100644 index 000000000000..0d23f233943f --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + /// + public partial class ContainerGroupInstanceCountSummary : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummaryInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _instanceCountsByState; + + /// The count of pooled resources in each state. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List InstanceCountsByState { get => this._instanceCountsByState; set => this._instanceCountsByState = value; } + + /// Creates an new instance. + public ContainerGroupInstanceCountSummary() + { + + } + } + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + public partial interface IContainerGroupInstanceCountSummary : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// The count of pooled resources in each state. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The count of pooled resources in each state.", + SerializedName = @"instanceCountsByState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount) })] + System.Collections.Generic.List InstanceCountsByState { get; set; } + + } + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + internal partial interface IContainerGroupInstanceCountSummaryInternal + + { + /// The count of pooled resources in each state. + System.Collections.Generic.List InstanceCountsByState { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.json.cs new file mode 100644 index 000000000000..578bea32dbb4 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/ContainerGroupInstanceCountSummary.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider. + /// + public partial class ContainerGroupInstanceCountSummary + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal ContainerGroupInstanceCountSummary(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_instanceCountsByState = If( json?.PropertyT("instanceCountsByState"), out var __jsonInstanceCountsByState) ? If( __jsonInstanceCountsByState as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCount.FromJson(__u) )) ))() : null : _instanceCountsByState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new ContainerGroupInstanceCountSummary(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._instanceCountsByState) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._instanceCountsByState ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("instanceCountsByState",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.PowerShell.cs new file mode 100644 index 000000000000..4f2d4fd6bdbc --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(PoolResourceStateCountTypeConverter))] + public partial class PoolResourceStateCount + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolResourceStateCount(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolResourceStateCount(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolResourceStateCount(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).State = (string) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).State, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).Count = (long) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).Count, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PoolResourceStateCount(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).State = (string) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).State, global::System.Convert.ToString); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).Count = (long) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal)this).Count, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(PoolResourceStateCountTypeConverter))] + public partial interface IPoolResourceStateCount + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.TypeConverter.cs new file mode 100644 index 000000000000..67b78b17d466 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolResourceStateCountTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PoolResourceStateCount.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PoolResourceStateCount.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PoolResourceStateCount.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.cs new file mode 100644 index 000000000000..79be2cd9e719 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + /// + public partial class PoolResourceStateCount : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCountInternal + { + + /// Backing field for property. + private long _count; + + /// The count of pooled resources in the given state. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public long Count { get => this._count; set => this._count = value; } + + /// Backing field for property. + private string _state; + + /// The state that the pooled resources count is for. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string State { get => this._state; set => this._state = value; } + + /// Creates an new instance. + public PoolResourceStateCount() + { + + } + } + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + public partial interface IPoolResourceStateCount : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// The count of pooled resources in the given state. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The count of pooled resources in the given state.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(long) })] + long Count { get; set; } + /// The state that the pooled resources count is for. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The state that the pooled resources count is for.", + SerializedName = @"state", + PossibleTypes = new [] { typeof(string) })] + string State { get; set; } + + } + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + internal partial interface IPoolResourceStateCountInternal + + { + /// The count of pooled resources in the given state. + long Count { get; set; } + /// The state that the pooled resources count is for. + string State { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.json.cs new file mode 100644 index 000000000000..a96f69d1bf78 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/PoolResourceStateCount.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. + /// + public partial class PoolResourceStateCount + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new PoolResourceStateCount(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal PoolResourceStateCount(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_state = If( json?.PropertyT("state"), out var __jsonState) ? (string)__jsonState : (string)_state;} + {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (long)__jsonCount : _count;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._state)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._state.ToString()) : null, "state" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber(this._count), "count" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.cs index b6471f982638..8bf6dc3fa5be 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.cs @@ -164,7 +164,7 @@ public partial interface IStandbyContainerGroupPoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies container group profile id of standby container groups.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -175,7 +175,7 @@ public partial interface IStandbyContainerGroupPoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies revision of container group profile.", SerializedName = @"revision", PossibleTypes = new [] { typeof(long) })] @@ -186,7 +186,7 @@ public partial interface IStandbyContainerGroupPoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies subnet Ids for container group.", SerializedName = @"subnetIds", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISubnet) })] @@ -197,7 +197,7 @@ public partial interface IStandbyContainerGroupPoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies maximum number of standby container groups in the standby pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] @@ -208,7 +208,7 @@ public partial interface IStandbyContainerGroupPoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies refill policy of the pool.", SerializedName = @"refillPolicy", PossibleTypes = new [] { typeof(string) })] diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.json.cs index 89d3a02d2223..7e27e1e7a115 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResource.json.cs @@ -102,10 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs return container; } __trackedResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.cs index 57b35b9d3cf2..e1b7cff77702 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.cs @@ -13,15 +13,12 @@ public partial class StandbyContainerGroupPoolResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceListResultInternal { - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - /// Backing field for property. private string _nextLink; /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } + public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; @@ -45,14 +42,14 @@ public partial interface IStandbyContainerGroupPoolResourceListResult : /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, + Create = true, + Update = true, Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } + string NextLink { get; set; } /// The StandbyContainerGroupPoolResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = true, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.json.cs index 682823881bec..64babdc66b6c 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceListResult.json.cs @@ -112,10 +112,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); - } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceUpdate.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceUpdate.cs index 014f1f1a3729..9980fee9dc92 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceUpdate.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolResourceUpdate.cs @@ -48,7 +48,7 @@ public partial class StandbyContainerGroupPoolResourceUpdate : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdateProperties _property; - /// The updatable properties of the StandbyContainerGroupPoolResource. + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceUpdateProperties()); set => this._property = value; } @@ -159,7 +159,7 @@ internal partial interface IStandbyContainerGroupPoolResourceUpdateInternal /// Specifies refill policy of the pool. [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("always")] string ElasticityProfileRefillPolicy { get; set; } - /// The updatable properties of the StandbyContainerGroupPoolResource. + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdateProperties Property { get; set; } /// Resource tags. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdateTags Tag { get; set; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.PowerShell.cs new file mode 100644 index 000000000000..fe16e0af59f8 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.PowerShell.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourceTypeConverter))] + public partial class StandbyContainerGroupPoolRuntimeViewResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyContainerGroupPoolRuntimeViewResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyContainerGroupPoolRuntimeViewResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ContainerGroupInstanceCountSummaryTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ContainerGroupInstanceCountSummaryTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourceTypeConverter))] + public partial interface IStandbyContainerGroupPoolRuntimeViewResource + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.TypeConverter.cs new file mode 100644 index 000000000000..48b0eafd3aa1 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyContainerGroupPoolRuntimeViewResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyContainerGroupPoolRuntimeViewResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.cs new file mode 100644 index 000000000000..67b7d0520846 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyContainerGroupPoolRuntimeViewResource : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public System.Collections.Generic.List InstanceCountSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type = value; } + + /// Internal Acessors for InstanceCountSummary + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal.InstanceCountSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceProperties()); set => this._property = value; } + + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type; } + + /// + /// Creates an new instance. + /// + public StandbyContainerGroupPoolRuntimeViewResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + public partial interface IStandbyContainerGroupPoolRuntimeViewResource : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResource + { + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.", + SerializedName = @"instanceCountSummary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary) })] + System.Collections.Generic.List InstanceCountSummary { get; } + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Displays the provisioning state of the standby pool", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; } + + } + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + internal partial interface IStandbyContainerGroupPoolRuntimeViewResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResourceInternal + { + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + System.Collections.Generic.List InstanceCountSummary { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties Property { get; set; } + /// Displays the provisioning state of the standby pool + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.json.cs new file mode 100644 index 000000000000..6c538b77350c --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResource.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby container group pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyContainerGroupPoolRuntimeViewResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyContainerGroupPoolRuntimeViewResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyContainerGroupPoolRuntimeViewResource(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.PowerShell.cs new file mode 100644 index 000000000000..e7ac87b8324f --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourceListResultTypeConverter))] + public partial class StandbyContainerGroupPoolRuntimeViewResourceListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyContainerGroupPoolRuntimeViewResourceListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyContainerGroupPoolRuntimeViewResourceListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResourceListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResourceListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourceListResultTypeConverter))] + public partial interface IStandbyContainerGroupPoolRuntimeViewResourceListResult + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..bb5c5c6cacfb --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyContainerGroupPoolRuntimeViewResourceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyContainerGroupPoolRuntimeViewResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResourceListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.cs new file mode 100644 index 000000000000..d91ecd1752a0 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + public partial class StandbyContainerGroupPoolRuntimeViewResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The StandbyContainerGroupPoolRuntimeViewResource items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public StandbyContainerGroupPoolRuntimeViewResourceListResult() + { + + } + } + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + public partial interface IStandbyContainerGroupPoolRuntimeViewResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The StandbyContainerGroupPoolRuntimeViewResource items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The StandbyContainerGroupPoolRuntimeViewResource items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + internal partial interface IStandbyContainerGroupPoolRuntimeViewResourceListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The StandbyContainerGroupPoolRuntimeViewResource items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.json.cs new file mode 100644 index 000000000000..b6ce00526e7d --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation. + public partial class StandbyContainerGroupPoolRuntimeViewResourceListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyContainerGroupPoolRuntimeViewResourceListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyContainerGroupPoolRuntimeViewResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..f44389aec1ae --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.PowerShell.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourcePropertiesTypeConverter))] + public partial class StandbyContainerGroupPoolRuntimeViewResourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyContainerGroupPoolRuntimeViewResourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyContainerGroupPoolRuntimeViewResourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ContainerGroupInstanceCountSummaryTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyContainerGroupPoolRuntimeViewResourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ContainerGroupInstanceCountSummaryTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(StandbyContainerGroupPoolRuntimeViewResourcePropertiesTypeConverter))] + public partial interface IStandbyContainerGroupPoolRuntimeViewResourceProperties + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.TypeConverter.cs new file mode 100644 index 000000000000..e48ca8917b73 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyContainerGroupPoolRuntimeViewResourcePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyContainerGroupPoolRuntimeViewResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResourceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyContainerGroupPoolRuntimeViewResourceProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.cs new file mode 100644 index 000000000000..cd3fbb49bbb0 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyContainerGroupPoolRuntimeViewResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _instanceCountSummary; + + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List InstanceCountSummary { get => this._instanceCountSummary; } + + /// Internal Acessors for InstanceCountSummary + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal.InstanceCountSummary { get => this._instanceCountSummary; set { {_instanceCountSummary = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// + /// Creates an new instance. + /// + public StandbyContainerGroupPoolRuntimeViewResourceProperties() + { + + } + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + public partial interface IStandbyContainerGroupPoolRuntimeViewResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.", + SerializedName = @"instanceCountSummary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary) })] + System.Collections.Generic.List InstanceCountSummary { get; } + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Displays the provisioning state of the standby pool", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; } + + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + internal partial interface IStandbyContainerGroupPoolRuntimeViewResourcePropertiesInternal + + { + /// + /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. + /// + System.Collections.Generic.List InstanceCountSummary { get; set; } + /// Displays the provisioning state of the standby pool + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.json.cs new file mode 100644 index 000000000000..ce03a16ef3a0 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyContainerGroupPoolRuntimeViewResourceProperties.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyContainerGroupPoolRuntimeViewResourceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyContainerGroupPoolRuntimeViewResourceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyContainerGroupPoolRuntimeViewResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_instanceCountSummary = If( json?.PropertyT("instanceCountSummary"), out var __jsonInstanceCountSummary) ? If( __jsonInstanceCountSummary as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IContainerGroupInstanceCountSummary) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ContainerGroupInstanceCountSummary.FromJson(__u) )) ))() : null : _instanceCountSummary;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._instanceCountSummary) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._instanceCountSummary ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("instanceCountSummary",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.PowerShell.cs index 1d3c6e456f5c..fc06cefde9de 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.PowerShell.cs @@ -124,6 +124,10 @@ internal StandbyPoolIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachinePoolName = (string) content.GetValueForProperty("StandbyVirtualMachinePoolName",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachinePoolName, global::System.Convert.ToString); } + if (content.Contains("RuntimeView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).RuntimeView = (string) content.GetValueForProperty("RuntimeView",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).RuntimeView, global::System.Convert.ToString); + } if (content.Contains("StandbyVirtualMachineName")) { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachineName = (string) content.GetValueForProperty("StandbyVirtualMachineName",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachineName, global::System.Convert.ToString); @@ -165,6 +169,10 @@ internal StandbyPoolIdentity(global::System.Management.Automation.PSObject conte { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachinePoolName = (string) content.GetValueForProperty("StandbyVirtualMachinePoolName",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachinePoolName, global::System.Convert.ToString); } + if (content.Contains("RuntimeView")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).RuntimeView = (string) content.GetValueForProperty("RuntimeView",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).RuntimeView, global::System.Convert.ToString); + } if (content.Contains("StandbyVirtualMachineName")) { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachineName = (string) content.GetValueForProperty("StandbyVirtualMachineName",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentityInternal)this).StandbyVirtualMachineName, global::System.Convert.ToString); diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.cs index 97e9b57f648b..7960e806afa5 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.cs @@ -26,6 +26,16 @@ public partial class StandbyPoolIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// Backing field for property. + private string _runtimeView; + + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string RuntimeView { get => this._runtimeView; set => this._runtimeView = value; } + /// Backing field for property. private string _standbyContainerGroupPoolName; @@ -85,6 +95,20 @@ public partial interface IStandbyPoolIdentity : SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] string ResourceGroupName { get; set; } + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + SerializedName = @"runtimeView", + PossibleTypes = new [] { typeof(string) })] + string RuntimeView { get; set; } /// Name of the standby container group pool [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -138,6 +162,11 @@ internal partial interface IStandbyPoolIdentityInternal string Id { get; set; } /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + string RuntimeView { get; set; } /// Name of the standby container group pool string StandbyContainerGroupPoolName { get; set; } /// Name of the standby virtual machine diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.json.cs index 214b3fc130b6..828d1f1862dc 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyPoolIdentity.json.cs @@ -80,6 +80,7 @@ internal StandbyPoolIdentity(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runt {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} {_standbyContainerGroupPoolName = If( json?.PropertyT("standbyContainerGroupPoolName"), out var __jsonStandbyContainerGroupPoolName) ? (string)__jsonStandbyContainerGroupPoolName : (string)_standbyContainerGroupPoolName;} {_standbyVirtualMachinePoolName = If( json?.PropertyT("standbyVirtualMachinePoolName"), out var __jsonStandbyVirtualMachinePoolName) ? (string)__jsonStandbyVirtualMachinePoolName : (string)_standbyVirtualMachinePoolName;} + {_runtimeView = If( json?.PropertyT("runtimeView"), out var __jsonRuntimeView) ? (string)__jsonRuntimeView : (string)_runtimeView;} {_standbyVirtualMachineName = If( json?.PropertyT("standbyVirtualMachineName"), out var __jsonStandbyVirtualMachineName) ? (string)__jsonStandbyVirtualMachineName : (string)_standbyVirtualMachineName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); @@ -108,6 +109,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); AddIf( null != (((object)this._standbyContainerGroupPoolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._standbyContainerGroupPoolName.ToString()) : null, "standbyContainerGroupPoolName" ,container.Add ); AddIf( null != (((object)this._standbyVirtualMachinePoolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._standbyVirtualMachinePoolName.ToString()) : null, "standbyVirtualMachinePoolName" ,container.Add ); + AddIf( null != (((object)this._runtimeView)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._runtimeView.ToString()) : null, "runtimeView" ,container.Add ); AddIf( null != (((object)this._standbyVirtualMachineName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._standbyVirtualMachineName.ToString()) : null, "standbyVirtualMachineName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.PowerShell.cs index 238d1605a47f..fe691c5cbac7 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.PowerShell.cs @@ -118,6 +118,10 @@ internal StandbyVirtualMachinePoolElasticityProfile(global::System.Collections.I { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MaxReadyCapacity = (long) content.GetValueForProperty("MaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("MinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MinReadyCapacity = (long?) content.GetValueForProperty("MinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -139,6 +143,10 @@ internal StandbyVirtualMachinePoolElasticityProfile(global::System.Management.Au { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MaxReadyCapacity = (long) content.GetValueForProperty("MaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("MinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MinReadyCapacity = (long?) content.GetValueForProperty("MinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)this).MinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.cs index 465d93eb35cd..8a57b25d38c6 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.cs @@ -17,11 +17,21 @@ public partial class StandbyVirtualMachinePoolElasticityProfile : private long _maxReadyCapacity; /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] public long MaxReadyCapacity { get => this._maxReadyCapacity; set => this._maxReadyCapacity = value; } + /// Backing field for property. + private long? _minReadyCapacity; + + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public long? MinReadyCapacity { get => this._minReadyCapacity; set => this._minReadyCapacity = value; } + /// /// Creates an new instance. /// @@ -35,7 +45,7 @@ public partial interface IStandbyVirtualMachinePoolElasticityProfile : Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable { /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = true, @@ -43,10 +53,24 @@ public partial interface IStandbyVirtualMachinePoolElasticityProfile : Read = true, Create = true, Update = true, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long MaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? MinReadyCapacity { get; set; } } /// Details of the elasticity profile. @@ -54,9 +78,14 @@ internal partial interface IStandbyVirtualMachinePoolElasticityProfileInternal { /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long MaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? MinReadyCapacity { get; set; } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.json.cs index 081d134ef890..d6f46348356b 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfile.json.cs @@ -78,6 +78,7 @@ internal StandbyVirtualMachinePoolElasticityProfile(Microsoft.Azure.PowerShell.C return; } {_maxReadyCapacity = If( json?.PropertyT("maxReadyCapacity"), out var __jsonMaxReadyCapacity) ? (long)__jsonMaxReadyCapacity : _maxReadyCapacity;} + {_minReadyCapacity = If( json?.PropertyT("minReadyCapacity"), out var __jsonMinReadyCapacity) ? (long?)__jsonMinReadyCapacity : _minReadyCapacity;} AfterFromJson(json); } @@ -103,6 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs return container; } AddIf( (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber(this._maxReadyCapacity), "maxReadyCapacity" ,container.Add ); + AddIf( null != this._minReadyCapacity ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber((long)this._minReadyCapacity) : null, "minReadyCapacity" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.PowerShell.cs index c40408c031a8..6b7d23d48b8b 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.PowerShell.cs @@ -118,6 +118,10 @@ internal StandbyVirtualMachinePoolElasticityProfileUpdate(global::System.Collect { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MaxReadyCapacity = (long?) content.GetValueForProperty("MaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("MinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MinReadyCapacity = (long?) content.GetValueForProperty("MinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -139,6 +143,10 @@ internal StandbyVirtualMachinePoolElasticityProfileUpdate(global::System.Managem { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MaxReadyCapacity = (long?) content.GetValueForProperty("MaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("MinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MinReadyCapacity = (long?) content.GetValueForProperty("MinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)this).MinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.cs index 1b555231b038..9f63e3f3e1b0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.cs @@ -17,11 +17,21 @@ public partial class StandbyVirtualMachinePoolElasticityProfileUpdate : private long? _maxReadyCapacity; /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] public long? MaxReadyCapacity { get => this._maxReadyCapacity; set => this._maxReadyCapacity = value; } + /// Backing field for property. + private long? _minReadyCapacity; + + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public long? MinReadyCapacity { get => this._minReadyCapacity; set => this._minReadyCapacity = value; } + /// /// Creates an new instance. /// @@ -35,7 +45,7 @@ public partial interface IStandbyVirtualMachinePoolElasticityProfileUpdate : Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable { /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -43,10 +53,24 @@ public partial interface IStandbyVirtualMachinePoolElasticityProfileUpdate : Read = true, Create = true, Update = true, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long? MaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? MinReadyCapacity { get; set; } } /// Details of the elasticity profile. @@ -54,9 +78,14 @@ internal partial interface IStandbyVirtualMachinePoolElasticityProfileUpdateInte { /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long? MaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? MinReadyCapacity { get; set; } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.json.cs index a9b8eee558c5..8cdfcab5c81e 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolElasticityProfileUpdate.json.cs @@ -79,6 +79,7 @@ internal StandbyVirtualMachinePoolElasticityProfileUpdate(Microsoft.Azure.PowerS return; } {_maxReadyCapacity = If( json?.PropertyT("maxReadyCapacity"), out var __jsonMaxReadyCapacity) ? (long?)__jsonMaxReadyCapacity : _maxReadyCapacity;} + {_minReadyCapacity = If( json?.PropertyT("minReadyCapacity"), out var __jsonMinReadyCapacity) ? (long?)__jsonMinReadyCapacity : _minReadyCapacity;} AfterFromJson(json); } @@ -104,6 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs return container; } AddIf( null != this._maxReadyCapacity ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber((long)this._maxReadyCapacity) : null, "maxReadyCapacity" ,container.Add ); + AddIf( null != this._minReadyCapacity ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber((long)this._minReadyCapacity) : null, "minReadyCapacity" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.PowerShell.cs index c5a574d0accb..ac882315364f 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.PowerShell.cs @@ -183,6 +183,10 @@ internal StandbyVirtualMachinePoolResource(global::System.Collections.IDictionar { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMaxReadyCapacity = (long) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -272,6 +276,10 @@ internal StandbyVirtualMachinePoolResource(global::System.Management.Automation. { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMaxReadyCapacity = (long) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.cs index ff8b85ba2680..a11357b82ea8 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.cs @@ -26,11 +26,18 @@ public partial class StandbyVirtualMachinePoolResource : public string AttachedVirtualMachineScaleSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).AttachedVirtualMachineScaleSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).AttachedVirtualMachineScaleSetId = value ?? null; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] public long? ElasticityProfileMaxReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).ElasticityProfileMaxReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).ElasticityProfileMaxReadyCapacity = value ?? default(long); } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public long? ElasticityProfileMinReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).ElasticityProfileMinReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)Property).ElasticityProfileMinReadyCapacity = value ?? default(long); } + /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// @@ -156,24 +163,38 @@ public partial interface IStandbyVirtualMachinePoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.", SerializedName = @"attachedVirtualMachineScaleSetId", PossibleTypes = new [] { typeof(string) })] string AttachedVirtualMachineScaleSetId { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, - Update = false, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Update = true, + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? ElasticityProfileMinReadyCapacity { get; set; } /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -192,7 +213,7 @@ public partial interface IStandbyVirtualMachinePoolResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Specifies the desired state of virtual machines in the pool.", SerializedName = @"virtualMachineState", PossibleTypes = new [] { typeof(string) })] @@ -211,9 +232,14 @@ internal partial interface IStandbyVirtualMachinePoolResourceInternal : /// Specifies the elasticity profile of the standby virtual machine pools. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfile ElasticityProfile { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? ElasticityProfileMinReadyCapacity { get; set; } /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceProperties Property { get; set; } /// The status of the last operation. diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.json.cs index d5dd01a2e773..aac2c4a03075 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResource.json.cs @@ -102,10 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs return container; } __trackedResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.cs index 6f394b1facb5..ef97578a21aa 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.cs @@ -13,15 +13,12 @@ public partial class StandbyVirtualMachinePoolResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceListResultInternal { - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - /// Backing field for property. private string _nextLink; /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } + public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; @@ -45,14 +42,14 @@ public partial interface IStandbyVirtualMachinePoolResourceListResult : /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, + Create = true, + Update = true, Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } + string NextLink { get; set; } /// The StandbyVirtualMachinePoolResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = true, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.json.cs index b583bc3c7a2a..665ae684c8b9 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceListResult.json.cs @@ -112,10 +112,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); - } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.PowerShell.cs index f23971805342..7de53ebddc8c 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.PowerShell.cs @@ -134,6 +134,10 @@ internal StandbyVirtualMachinePoolResourceProperties(global::System.Collections. { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMaxReadyCapacity = (long) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -171,6 +175,10 @@ internal StandbyVirtualMachinePoolResourceProperties(global::System.Management.A { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMaxReadyCapacity = (long) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.cs index 2fe08ecd1438..f7b67f4490c4 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceProperties.cs @@ -30,11 +30,18 @@ public partial class StandbyVirtualMachinePoolResourceProperties : internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfile ElasticityProfile { get => (this._elasticityProfile = this._elasticityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolElasticityProfile()); set => this._elasticityProfile = value; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] public long? ElasticityProfileMaxReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)ElasticityProfile).MaxReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)ElasticityProfile).MaxReadyCapacity = value ?? default(long); } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public long? ElasticityProfileMinReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)ElasticityProfile).MinReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileInternal)ElasticityProfile).MinReadyCapacity = value ?? default(long); } + /// Internal Acessors for ElasticityProfile Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfile Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourcePropertiesInternal.ElasticityProfile { get => (this._elasticityProfile = this._elasticityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolElasticityProfile()); set { {_elasticityProfile = value;} } } @@ -81,7 +88,7 @@ public partial interface IStandbyVirtualMachinePoolResourceProperties : PossibleTypes = new [] { typeof(string) })] string AttachedVirtualMachineScaleSetId { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -89,10 +96,24 @@ public partial interface IStandbyVirtualMachinePoolResourceProperties : Read = true, Create = true, Update = true, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? ElasticityProfileMinReadyCapacity { get; set; } /// The status of the last operation. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -130,9 +151,14 @@ internal partial interface IStandbyVirtualMachinePoolResourcePropertiesInternal /// Specifies the elasticity profile of the standby virtual machine pools. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfile ElasticityProfile { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? ElasticityProfileMinReadyCapacity { get; set; } /// The status of the last operation. [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] string ProvisioningState { get; set; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.PowerShell.cs index 27909dffb6a3..ee39d215228a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.PowerShell.cs @@ -138,6 +138,10 @@ internal StandbyVirtualMachinePoolResourceUpdate(global::System.Collections.IDic { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMaxReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -179,6 +183,10 @@ internal StandbyVirtualMachinePoolResourceUpdate(global::System.Management.Autom { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMaxReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.cs index 26191deb7313..ec9bd130c5cc 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdate.cs @@ -20,11 +20,18 @@ public partial class StandbyVirtualMachinePoolResourceUpdate : public string AttachedVirtualMachineScaleSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).AttachedVirtualMachineScaleSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).AttachedVirtualMachineScaleSetId = value ?? null; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] public long? ElasticityProfileMaxReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfileMaxReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfileMaxReadyCapacity = value ?? default(long); } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public long? ElasticityProfileMinReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfileMinReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfileMinReadyCapacity = value ?? default(long); } + /// Internal Acessors for ElasticityProfile Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdate Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateInternal.ElasticityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)Property).ElasticityProfile = value; } @@ -34,7 +41,7 @@ public partial class StandbyVirtualMachinePoolResourceUpdate : /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateProperties _property; - /// The updatable properties of the StandbyVirtualMachinePoolResource. + /// The resource-specific properties for this resource. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolResourceUpdateProperties()); set => this._property = value; } @@ -73,7 +80,7 @@ public partial interface IStandbyVirtualMachinePoolResourceUpdate : PossibleTypes = new [] { typeof(string) })] string AttachedVirtualMachineScaleSetId { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -81,10 +88,24 @@ public partial interface IStandbyVirtualMachinePoolResourceUpdate : Read = true, Create = true, Update = true, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? ElasticityProfileMinReadyCapacity { get; set; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -121,10 +142,15 @@ internal partial interface IStandbyVirtualMachinePoolResourceUpdateInternal /// Specifies the elasticity profile of the standby virtual machine pools. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdate ElasticityProfile { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long? ElasticityProfileMaxReadyCapacity { get; set; } - /// The updatable properties of the StandbyVirtualMachinePoolResource. + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? ElasticityProfileMinReadyCapacity { get; set; } + /// The resource-specific properties for this resource. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateProperties Property { get; set; } /// Resource tags. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdateTags Tag { get; set; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.PowerShell.cs index 3f6d1e9fe1d6..985bec83d932 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.PowerShell.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.PowerShell.cs @@ -130,6 +130,10 @@ internal StandbyVirtualMachinePoolResourceUpdateProperties(global::System.Collec { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMaxReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializeDictionary(content); } @@ -163,6 +167,10 @@ internal StandbyVirtualMachinePoolResourceUpdateProperties(global::System.Manage { ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMaxReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMaxReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMaxReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } + if (content.Contains("ElasticityProfileMinReadyCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMinReadyCapacity = (long?) content.GetValueForProperty("ElasticityProfileMinReadyCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal)this).ElasticityProfileMinReadyCapacity, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } AfterDeserializePSObject(content); } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.cs index 480bf09f5104..36583a1fbccc 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolResourceUpdateProperties.cs @@ -30,11 +30,18 @@ public partial class StandbyVirtualMachinePoolResourceUpdateProperties : internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdate ElasticityProfile { get => (this._elasticityProfile = this._elasticityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolElasticityProfileUpdate()); set => this._elasticityProfile = value; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] public long? ElasticityProfileMaxReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)ElasticityProfile).MaxReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)ElasticityProfile).MaxReadyCapacity = value ?? default(long); } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public long? ElasticityProfileMinReadyCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)ElasticityProfile).MinReadyCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdateInternal)ElasticityProfile).MinReadyCapacity = value ?? default(long); } + /// Internal Acessors for ElasticityProfile Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdate Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdatePropertiesInternal.ElasticityProfile { get => (this._elasticityProfile = this._elasticityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolElasticityProfileUpdate()); set { {_elasticityProfile = value;} } } @@ -71,7 +78,7 @@ public partial interface IStandbyVirtualMachinePoolResourceUpdateProperties : PossibleTypes = new [] { typeof(string) })] string AttachedVirtualMachineScaleSetId { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -79,10 +86,24 @@ public partial interface IStandbyVirtualMachinePoolResourceUpdateProperties : Read = true, Create = true, Update = true, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + long? ElasticityProfileMinReadyCapacity { get; set; } /// Specifies the desired state of virtual machines in the pool. [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, @@ -108,9 +129,14 @@ internal partial interface IStandbyVirtualMachinePoolResourceUpdatePropertiesInt /// Specifies the elasticity profile of the standby virtual machine pools. Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolElasticityProfileUpdate ElasticityProfile { get; set; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// long? ElasticityProfileMaxReadyCapacity { get; set; } + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + long? ElasticityProfileMinReadyCapacity { get; set; } /// Specifies the desired state of virtual machines in the pool. [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Running", "Deallocated")] string VirtualMachineState { get; set; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.PowerShell.cs new file mode 100644 index 000000000000..9ba3db947189 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.PowerShell.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourceTypeConverter))] + public partial class StandbyVirtualMachinePoolRuntimeViewResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyVirtualMachinePoolRuntimeViewResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyVirtualMachinePoolRuntimeViewResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummaryTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummaryTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourceTypeConverter))] + public partial interface IStandbyVirtualMachinePoolRuntimeViewResource + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.TypeConverter.cs new file mode 100644 index 000000000000..bd3fb21ada58 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyVirtualMachinePoolRuntimeViewResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.cs new file mode 100644 index 000000000000..3f921f295862 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResource : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public System.Collections.Generic.List InstanceCountSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type = value; } + + /// Internal Acessors for InstanceCountSummary + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal.InstanceCountSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).InstanceCountSummary = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceProperties()); set => this._property = value; } + + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IResourceInternal)__proxyResource).Type; } + + /// + /// Creates an new instance. + /// + public StandbyVirtualMachinePoolRuntimeViewResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + public partial interface IStandbyVirtualMachinePoolRuntimeViewResource : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResource + { + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider. + If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + SerializedName = @"instanceCountSummary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary) })] + System.Collections.Generic.List InstanceCountSummary { get; } + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Displays the provisioning state of the standby pool", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; } + + } + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + internal partial interface IStandbyVirtualMachinePoolRuntimeViewResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IProxyResourceInternal + { + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + System.Collections.Generic.List InstanceCountSummary { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties Property { get; set; } + /// Displays the provisioning state of the standby pool + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.json.cs new file mode 100644 index 000000000000..bff6c8cde1c2 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResource.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyVirtualMachinePoolRuntimeViewResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyVirtualMachinePoolRuntimeViewResource(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.PowerShell.cs new file mode 100644 index 000000000000..4685e8032e45 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourceListResultTypeConverter))] + public partial class StandbyVirtualMachinePoolRuntimeViewResourceListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyVirtualMachinePoolRuntimeViewResourceListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyVirtualMachinePoolRuntimeViewResourceListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResourceListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResourceListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourceListResultTypeConverter))] + public partial interface IStandbyVirtualMachinePoolRuntimeViewResourceListResult + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.TypeConverter.cs new file mode 100644 index 000000000000..00ed8d94322e --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResourceListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyVirtualMachinePoolRuntimeViewResourceListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResourceListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResourceListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.cs new file mode 100644 index 000000000000..a62fa29a8a15 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + public partial class StandbyVirtualMachinePoolRuntimeViewResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The StandbyVirtualMachinePoolRuntimeViewResource items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public StandbyVirtualMachinePoolRuntimeViewResourceListResult() + { + + } + } + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + public partial interface IStandbyVirtualMachinePoolRuntimeViewResourceListResult : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The StandbyVirtualMachinePoolRuntimeViewResource items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The StandbyVirtualMachinePoolRuntimeViewResource items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + internal partial interface IStandbyVirtualMachinePoolRuntimeViewResourceListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The StandbyVirtualMachinePoolRuntimeViewResource items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.json.cs new file mode 100644 index 000000000000..9dee3feffc54 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation. + public partial class StandbyVirtualMachinePoolRuntimeViewResourceListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyVirtualMachinePoolRuntimeViewResourceListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyVirtualMachinePoolRuntimeViewResourceListResult(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResource.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.PowerShell.cs new file mode 100644 index 000000000000..c5cfb655de10 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.PowerShell.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourcePropertiesTypeConverter))] + public partial class StandbyVirtualMachinePoolRuntimeViewResourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StandbyVirtualMachinePoolRuntimeViewResourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StandbyVirtualMachinePoolRuntimeViewResourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummaryTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StandbyVirtualMachinePoolRuntimeViewResourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("InstanceCountSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountSummary",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).InstanceCountSummary, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummaryTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + [System.ComponentModel.TypeConverter(typeof(StandbyVirtualMachinePoolRuntimeViewResourcePropertiesTypeConverter))] + public partial interface IStandbyVirtualMachinePoolRuntimeViewResourceProperties + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.TypeConverter.cs new file mode 100644 index 000000000000..62738fbd1c83 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResourcePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StandbyVirtualMachinePoolRuntimeViewResourceProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResourceProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StandbyVirtualMachinePoolRuntimeViewResourceProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.cs new file mode 100644 index 000000000000..84232979686e --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _instanceCountSummary; + + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List InstanceCountSummary { get => this._instanceCountSummary; } + + /// Internal Acessors for InstanceCountSummary + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal.InstanceCountSummary { get => this._instanceCountSummary; set { {_instanceCountSummary = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// + /// Creates an new instance. + /// + public StandbyVirtualMachinePoolRuntimeViewResourceProperties() + { + + } + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + public partial interface IStandbyVirtualMachinePoolRuntimeViewResourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider. + If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + SerializedName = @"instanceCountSummary", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary) })] + System.Collections.Generic.List InstanceCountSummary { get; } + /// Displays the provisioning state of the standby pool + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Displays the provisioning state of the standby pool", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; } + + } + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + internal partial interface IStandbyVirtualMachinePoolRuntimeViewResourcePropertiesInternal + + { + /// + /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the + /// StandbyPool resource provider. + /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + System.Collections.Generic.List InstanceCountSummary { get; set; } + /// Displays the provisioning state of the standby pool + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.json.cs new file mode 100644 index 000000000000..dfe2c17c1121 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachinePoolRuntimeViewResourceProperties.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains information about a standby pool as last known by the StandbyPool resource provider. + /// + public partial class StandbyVirtualMachinePoolRuntimeViewResourceProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new StandbyVirtualMachinePoolRuntimeViewResourceProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal StandbyVirtualMachinePoolRuntimeViewResourceProperties(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_instanceCountSummary = If( json?.PropertyT("instanceCountSummary"), out var __jsonInstanceCountSummary) ? If( __jsonInstanceCountSummary as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.VirtualMachineInstanceCountSummary.FromJson(__u) )) ))() : null : _instanceCountSummary;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._instanceCountSummary) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._instanceCountSummary ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("instanceCountSummary",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.cs index 248ba31567c3..90b212778b5b 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.cs @@ -144,7 +144,7 @@ public partial interface IStandbyVirtualMachineResource : ReadOnly = false, Read = true, Create = true, - Update = false, + Update = true, Description = @"Resource id of the virtual machine.", SerializedName = @"virtualMachineResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.json.cs index d038ec4e181b..a4bd6043dd67 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResource.json.cs @@ -104,10 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs return container; } __proxyResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.cs index af561512e385..91a7adf46cc6 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.cs @@ -13,15 +13,12 @@ public partial class StandbyVirtualMachineResourceListResult : Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResourceListResultInternal { - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResourceListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - /// Backing field for property. private string _nextLink; /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } + public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. private System.Collections.Generic.List _value; @@ -43,14 +40,14 @@ public partial interface IStandbyVirtualMachineResourceListResult : /// The link to the next page of items [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, - Create = false, - Update = false, + Create = true, + Update = true, Description = @"The link to the next page of items", SerializedName = @"nextLink", PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } + string NextLink { get; set; } /// The StandbyVirtualMachineResource items on this page [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = true, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.json.cs index 5d78d4e872e5..5f4320c84bfa 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.json.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/StandbyVirtualMachineResourceListResult.json.cs @@ -112,10 +112,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJs } container.Add("value",__w); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeRead)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); - } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.PowerShell.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.PowerShell.cs new file mode 100644 index 000000000000..68b5d03ec05d --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + [System.ComponentModel.TypeConverter(typeof(VirtualMachineInstanceCountSummaryTypeConverter))] + public partial class VirtualMachineInstanceCountSummary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualMachineInstanceCountSummary(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualMachineInstanceCountSummary(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualMachineInstanceCountSummary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).Zone = (long?) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).Zone, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("InstanceCountsByState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).InstanceCountsByState = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountsByState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).InstanceCountsByState, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCountTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualMachineInstanceCountSummary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).Zone = (long?) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).Zone, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("InstanceCountsByState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).InstanceCountsByState = (System.Collections.Generic.List) content.GetValueForProperty("InstanceCountsByState",((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal)this).InstanceCountsByState, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCountTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + } + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + [System.ComponentModel.TypeConverter(typeof(VirtualMachineInstanceCountSummaryTypeConverter))] + public partial interface IVirtualMachineInstanceCountSummary + + { + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.TypeConverter.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.TypeConverter.cs new file mode 100644 index 000000000000..b8eb15a16365 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualMachineInstanceCountSummaryTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualMachineInstanceCountSummary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualMachineInstanceCountSummary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualMachineInstanceCountSummary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.cs new file mode 100644 index 000000000000..320c813fd032 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + public partial class VirtualMachineInstanceCountSummary : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummaryInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _instanceCountsByState; + + /// The count of pooled resources in each state for the given zone. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public System.Collections.Generic.List InstanceCountsByState { get => this._instanceCountsByState; set => this._instanceCountsByState = value; } + + /// Backing field for property. + private long? _zone; + + /// + /// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Origin(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.PropertyOrigin.Owned)] + public long? Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public VirtualMachineInstanceCountSummary() + { + + } + } + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + public partial interface IVirtualMachineInstanceCountSummary : + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IJsonSerializable + { + /// The count of pooled resources in each state for the given zone. + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The count of pooled resources in each state for the given zone.", + SerializedName = @"instanceCountsByState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount) })] + System.Collections.Generic.List InstanceCountsByState { get; set; } + /// + /// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS.", + SerializedName = @"zone", + PossibleTypes = new [] { typeof(long) })] + long? Zone { get; set; } + + } + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + internal partial interface IVirtualMachineInstanceCountSummaryInternal + + { + /// The count of pooled resources in each state for the given zone. + System.Collections.Generic.List InstanceCountsByState { get; set; } + /// + /// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS. + /// + long? Zone { get; set; } + + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.json.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.json.cs new file mode 100644 index 000000000000..eadb14b36c99 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/Models/VirtualMachineInstanceCountSummary.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + + /// + /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. + /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. + /// Note: any resources in the Running state may still be installing extensions / not fully provisioned. + /// + public partial class VirtualMachineInstanceCountSummary + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IVirtualMachineInstanceCountSummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json ? new VirtualMachineInstanceCountSummary(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._zone ? (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNumber((long)this._zone) : null, "zone" ,container.Add ); + if (null != this._instanceCountsByState) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.XNodeArray(); + foreach( var __x in this._instanceCountsByState ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("instanceCountsByState",__w); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualMachineInstanceCountSummary(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_zone = If( json?.PropertyT("zone"), out var __jsonZone) ? (long?)__jsonZone : _zone;} + {_instanceCountsByState = If( json?.PropertyT("instanceCountsByState"), out var __jsonInstanceCountsByState) ? If( __jsonInstanceCountsByState as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IPoolResourceStateCount) (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.PoolResourceStateCount.FromJson(__u) )) ))() : null : _instanceCountsByState;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/api/StandbyPool.cs b/src/StandbyPool/StandbyPool.Autorest/generated/api/StandbyPool.cs index 25379d6c1e54..dba4fa9d3d37 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/api/StandbyPool.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/api/StandbyPool.cs @@ -24,7 +24,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -60,7 +60,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task OperationsListViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -103,7 +103,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -145,7 +145,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -295,23 +295,23 @@ public partial class StandbyPool } } - /// Create a StandbyContainerGroupPoolResource + /// Get a StandbyContainerGroupPoolRuntimeViewResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby container group pool - /// Resource create parameters. + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. /// 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.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGet(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, string runtimeView, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -323,6 +323,8 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/runtimeViews/" + + global::System.Uri.EscapeDataString(runtimeView) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -331,49 +333,44 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolRuntimeViewsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Create a StandbyContainerGroupPoolResource + /// Get a StandbyContainerGroupPoolRuntimeViewResource /// - /// Resource create parameters. /// 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.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools/(?[^/]+)/runtimeViews/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + var runtimeView = _match.Groups["runtimeView"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -382,6 +379,8 @@ public partial class StandbyPool + resourceGroupName + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + standbyContainerGroupPoolName + + "/runtimeViews/" + + runtimeView + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -390,47 +389,42 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolRuntimeViewsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Create a StandbyContainerGroupPoolResource + /// Get a StandbyContainerGroupPoolRuntimeViewResource /// - /// Resource create parameters. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools/(?[^/]+)/runtimeViews/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + var runtimeView = _match.Groups["runtimeView"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -439,6 +433,8 @@ public partial class StandbyPool + resourceGroupName + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + standbyContainerGroupPoolName + + "/runtimeViews/" + + runtimeView + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -447,128 +443,30 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// Create a StandbyContainerGroupPoolResource - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// Json string supplied to the StandbyContainerGroupPoolsCreateOrUpdate 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Create a StandbyContainerGroupPoolResource - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// Json string supplied to the StandbyContainerGroupPoolsCreateOrUpdate operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolRuntimeViewsGetWithResult_Call (request, eventListener,sender); } } - /// Create a StandbyContainerGroupPoolResource + /// Get a StandbyContainerGroupPoolRuntimeViewResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby container group pool - /// Resource create parameters. + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGetWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, string runtimeView, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -580,6 +478,8 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/runtimeViews/" + + global::System.Uri.EscapeDataString(runtimeView) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -588,30 +488,26 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolRuntimeViewsGetWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -620,96 +516,8 @@ public partial class StandbyPool { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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: 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.StandbyPool.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"))) { - 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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -718,7 +526,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -752,7 +560,7 @@ public partial class StandbyPool } /// - /// 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). @@ -763,7 +571,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsCreateOrUpdate_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsGet_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -772,96 +580,1581 @@ public partial class StandbyPool { var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // 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"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - 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.StandbyPool.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 + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. + /// 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 StandbyContainerGroupPoolRuntimeViewsGet_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, string runtimeView, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); + await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); + await eventListener.AssertNotNull(nameof(runtimeView),runtimeView); + await eventListener.AssertRegEx(nameof(runtimeView), runtimeView, @"^[a-zA-Z0-9-]{0,24}$"); + } + } + + /// + /// List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsListByStandbyPool(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/runtimeViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolRuntimeViewsListByStandbyPool_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource + /// + /// + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)/runtimeViews$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "/runtimeViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolRuntimeViewsListByStandbyPool_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)/runtimeViews$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "/runtimeViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolWithResult_Call (request, eventListener,sender); + } + } + + /// + /// List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/runtimeViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// 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.StandbyPool.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 StandbyContainerGroupPoolRuntimeViewsListByStandbyPool_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolRuntimeViewResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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 StandbyContainerGroupPoolRuntimeViewsListByStandbyPool_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); + await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Resource create parameters. + /// 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.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// + /// Resource create parameters. + /// 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.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Json string supplied to the StandbyContainerGroupPoolsCreateOrUpdate 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Json string supplied to the StandbyContainerGroupPoolsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-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.StandbyPool.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"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// 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.StandbyPool.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 StandbyContainerGroupPoolsCreateOrUpdate_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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"); + var operationLocation = _response.GetFirstHeader(@"Operation-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.StandbyPool.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"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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 StandbyContainerGroupPoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); + await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsDelete(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a StandbyContainerGroupPoolResource + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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.StandbyPool.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 StandbyContainerGroupPoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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"); + var operationLocation = _response.GetFirstHeader(@"Operation-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.StandbyPool.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"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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 StandbyContainerGroupPoolsDelete_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); + await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// Get a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGet(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a StandbyContainerGroupPoolResource + /// + /// 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a StandbyContainerGroupPoolResource + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.URLCreated, pathAndQuery); 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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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; - } + // 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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsGetWithResult_Call (request, eventListener,sender); + } + } - 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.StandbyPool.Runtime.UndeclaredResponseException(_response); - } - } + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // 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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// 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.StandbyPool.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 StandbyContainerGroupPoolsGet_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -892,18 +2185,17 @@ public partial class StandbyPool } /// - /// 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 value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby container group pool - /// 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 StandbyContainerGroupPoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGet_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -914,16 +2206,13 @@ public partial class StandbyPool await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delete a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by resource group /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -931,9 +2220,9 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsDelete(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -943,8 +2232,7 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -953,18 +2241,18 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsDelete_Call (request, onNoContent,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); } } - /// Delete a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by resource group /// - /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -972,60 +2260,146 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroupViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List StandbyContainerGroupPoolResource resources by resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools$", 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.StandbyPool/standbyContainerGroupPools'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// List StandbyContainerGroupPoolResource resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + standbyContainerGroupPoolName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StandbyContainerGroupPoolsDelete_Call (request, onNoContent,onDefault,eventListener,sender); + return await this.StandbyContainerGroupPoolsListByResourceGroupWithResult_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 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.StandbyPool.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 StandbyContainerGroupPoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1033,107 +2407,82 @@ public partial class StandbyPool try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // 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"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - 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.StandbyPool.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.StandbyPool.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.StandbyPool.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + default: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // 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.StandbyPool.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.StandbyPool.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// 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.StandbyPool.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 StandbyContainerGroupPoolsListByResourceGroup_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.NoContent: + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1155,17 +2504,16 @@ public partial class StandbyPool } /// - /// 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 value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool /// 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 StandbyContainerGroupPoolsDelete_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1174,15 +2522,11 @@ public partial class StandbyPool await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); - await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); } } - /// Get a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by subscription ID /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool /// 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). @@ -1191,9 +2535,9 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGet(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1201,10 +2545,7 @@ public partial class StandbyPool var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1218,11 +2559,11 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by subscription ID /// /// 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 @@ -1232,32 +2573,27 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + standbyContainerGroupPoolName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1271,44 +2607,39 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// Get a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by subscription ID /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + standbyContainerGroupPoolName + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1322,34 +2653,29 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsGetWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolsListBySubscriptionWithResult_Call (request, eventListener,sender); } } - /// Get a StandbyContainerGroupPoolResource + /// List StandbyContainerGroupPoolResource resources by subscription ID /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGetWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1363,21 +2689,21 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsGetWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolsListBySubscriptionWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1396,7 +2722,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -1429,7 +2755,9 @@ public partial class StandbyPool } } - /// 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 default (any response code not handled @@ -1439,7 +2767,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsGet_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscription_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1458,7 +2786,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1480,44 +2808,40 @@ public partial class StandbyPool } /// - /// 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 value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool /// 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 StandbyContainerGroupPoolsGet_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); - await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); } } - /// List StandbyContainerGroupPoolResource resources by resource group + /// Update a StandbyContainerGroupPoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// 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.StandbyPool.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 StandbyContainerGroupPoolsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1527,7 +2851,8 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1536,49 +2861,57 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by resource group + /// Update a StandbyContainerGroupPoolResource /// + /// 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.StandbyPool.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 StandbyContainerGroupPoolsListByResourceGroupViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1587,47 +2920,55 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by resource group + /// Update a StandbyContainerGroupPoolResource /// + /// The resource properties to be updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", 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.StandbyPool/standbyContainerGroupPools'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + standbyContainerGroupPoolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1636,27 +2977,81 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by resource group + /// Update a StandbyContainerGroupPoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Json string supplied to the StandbyContainerGroupPoolsUpdate 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// Json string supplied to the StandbyContainerGroupPoolsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1666,7 +3061,8 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1675,26 +3071,77 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a StandbyContainerGroupPoolResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2024-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" + + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1713,7 +3160,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -1746,9 +3193,7 @@ public partial class StandbyPool } } - /// - /// 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 default (any response code not handled @@ -1758,7 +3203,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListByResourceGroup_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdate_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1777,7 +3222,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1799,16 +3244,18 @@ public partial class StandbyPool } /// - /// 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 value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// Name of the standby container group pool + /// The resource properties to be updated. /// 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 StandbyContainerGroupPoolsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdate_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1817,11 +3264,19 @@ public partial class StandbyPool await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); + await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// List StandbyContainerGroupPoolResource resources by subscription ID + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby virtual machine pool + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. /// 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). @@ -1830,9 +3285,9 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGet(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, string runtimeView, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1840,7 +3295,12 @@ public partial class StandbyPool var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + global::System.Uri.EscapeDataString(standbyVirtualMachinePoolName) + + "/runtimeViews/" + + global::System.Uri.EscapeDataString(runtimeView) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1854,11 +3314,11 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolRuntimeViewsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by subscription ID + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// /// 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 @@ -1868,27 +3328,35 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/(?[^/]+)/runtimeViews/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyVirtualMachinePoolName = _match.Groups["standbyVirtualMachinePoolName"].Value; + var runtimeView = _match.Groups["runtimeView"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + standbyVirtualMachinePoolName + + "/runtimeViews/" + + runtimeView + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1902,39 +3370,47 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolRuntimeViewsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by subscription ID + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StandbyPool/standbyContainerGroupPools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/(?[^/]+)/runtimeViews/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var standbyVirtualMachinePoolName = _match.Groups["standbyVirtualMachinePoolName"].Value; + var runtimeView = _match.Groups["runtimeView"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + standbyVirtualMachinePoolName + + "/runtimeViews/" + + runtimeView + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1948,21 +3424,25 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsListBySubscriptionWithResult_Call (request, eventListener,sender); + return await this.StandbyVirtualMachinePoolRuntimeViewsGetWithResult_Call (request, eventListener,sender); } } - /// List StandbyContainerGroupPoolResource resources by subscription ID + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby virtual machine pool + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGetWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, string runtimeView, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1970,7 +3450,12 @@ public partial class StandbyPool var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + global::System.Uri.EscapeDataString(standbyVirtualMachinePoolName) + + "/runtimeViews/" + + global::System.Uri.EscapeDataString(runtimeView) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1984,21 +3469,21 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsListBySubscriptionWithResult_Call (request, eventListener,sender); + return await this.StandbyVirtualMachinePoolRuntimeViewsGetWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2017,7 +3502,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2051,7 +3536,7 @@ public partial class StandbyPool } /// - /// 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). @@ -2062,7 +3547,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsListBySubscription_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGet_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2081,7 +3566,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2103,40 +3588,51 @@ public partial class StandbyPool } /// - /// Validation method for method. Call this like the actual call, + /// Validation method for method. Call this like the actual call, /// but you will get validation events back. /// /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the standby virtual machine pool + /// The unique identifier for the runtime view. The input string should be the word 'latest', which + /// will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception. /// 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 StandbyContainerGroupPoolsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsGet_Validate(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, string runtimeView, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(standbyVirtualMachinePoolName),standbyVirtualMachinePoolName); + await eventListener.AssertRegEx(nameof(standbyVirtualMachinePoolName), standbyVirtualMachinePoolName, @"^[a-zA-Z0-9-]{3,24}$"); + await eventListener.AssertNotNull(nameof(runtimeView),runtimeView); + await eventListener.AssertRegEx(nameof(runtimeView), runtimeView, @"^[a-zA-Z0-9-]{0,24}$"); } } - /// Update a StandbyContainerGroupPoolResource + /// + /// List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource + /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// The resource properties to be updated. + /// Name of the standby virtual machine pool /// 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.StandbyPool.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 StandbyContainerGroupPoolsUpdate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2146,8 +3642,9 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + global::System.Uri.EscapeDataString(standbyVirtualMachinePoolName) + + "/runtimeViews" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2156,57 +3653,54 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool_Call (request, onOk,onDefault,eventListener,sender); } } - /// Update a StandbyContainerGroupPoolResource + /// + /// List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource + /// /// - /// 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.StandbyPool.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 StandbyContainerGroupPoolsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/(?[^/]+)/runtimeViews$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + var standbyVirtualMachinePoolName = _match.Groups["standbyVirtualMachinePoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + standbyContainerGroupPoolName + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + standbyVirtualMachinePoolName + + "/runtimeViews" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2215,149 +3709,52 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool_Call (request, onOk,onDefault,eventListener,sender); } } - /// Update a StandbyContainerGroupPoolResource + /// + /// List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource + /// /// - /// The resource properties to be updated. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-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.StandbyPool/standbyContainerGroupPools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/(?[^/]+)/runtimeViews$", 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.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var standbyContainerGroupPoolName = _match.Groups["standbyContainerGroupPoolName"].Value; + var standbyVirtualMachinePoolName = _match.Groups["standbyVirtualMachinePoolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + standbyContainerGroupPoolName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); - } - } - - /// Update a StandbyContainerGroupPoolResource - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// Json string supplied to the StandbyContainerGroupPoolsUpdate 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.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.StandbyContainerGroupPoolsUpdate_Call (request, onOk,onDefault,eventListener,sender); - } - } - - /// Update a StandbyContainerGroupPoolResource - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// Json string supplied to the StandbyContainerGroupPoolsUpdate operation - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the response is completed. - /// - public async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) - { - var apiVersion = @"2023-12-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + standbyVirtualMachinePoolName + + "/runtimeViews" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2366,34 +3763,30 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); + return await this.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolWithResult_Call (request, eventListener,sender); } } - /// Update a StandbyContainerGroupPoolResource + /// + /// List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource + /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// The resource properties to be updated. + /// Name of the standby virtual machine pool /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2403,8 +3796,9 @@ public partial class StandbyPool + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StandbyPool/standbyContainerGroupPools/" - + global::System.Uri.EscapeDataString(standbyContainerGroupPoolName) + + "/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/" + + global::System.Uri.EscapeDataString(standbyVirtualMachinePoolName) + + "/runtimeViews" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2413,30 +3807,26 @@ public partial class StandbyPool // 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.StandbyPool.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.StandbyContainerGroupPoolsUpdateWithResult_Call (request, eventListener,sender); + return await this.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 StandbyContainerGroupPoolsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2455,7 +3845,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2488,7 +3878,9 @@ public partial class StandbyPool } } - /// 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 default (any response code not handled @@ -2498,7 +3890,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyContainerGroupPoolsUpdate_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool_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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2517,7 +3909,7 @@ public partial class StandbyPool case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyContainerGroupPoolResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.StandbyVirtualMachinePoolRuntimeViewResourceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2539,18 +3931,17 @@ public partial class StandbyPool } /// - /// 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 value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the standby container group pool - /// The resource properties to be updated. + /// Name of the standby virtual machine pool /// 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 StandbyContainerGroupPoolsUpdate_Validate(string subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool_Validate(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2559,14 +3950,12 @@ public partial class StandbyPool await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(standbyContainerGroupPoolName),standbyContainerGroupPoolName); - await eventListener.AssertRegEx(nameof(standbyContainerGroupPoolName), standbyContainerGroupPoolName, @"^[a-zA-Z0-9-]{3,24}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(standbyVirtualMachinePoolName),standbyVirtualMachinePoolName); + await eventListener.AssertRegEx(nameof(standbyVirtualMachinePoolName), standbyVirtualMachinePoolName, @"^[a-zA-Z0-9-]{3,24}$"); } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby virtual machine pool @@ -2582,7 +3971,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2615,7 +4004,7 @@ public partial class StandbyPool } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// /// Resource create parameters. /// a delegate that is called when the remote service returns 200 (OK). @@ -2629,7 +4018,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2674,7 +4063,7 @@ public partial class StandbyPool } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// /// Resource create parameters. /// an instance that will receive events. @@ -2686,7 +4075,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2731,7 +4120,7 @@ public partial class StandbyPool } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby virtual machine pool @@ -2746,7 +4135,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2779,7 +4168,7 @@ public partial class StandbyPool } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby virtual machine pool @@ -2792,7 +4181,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2825,7 +4214,7 @@ public partial class StandbyPool } } - /// Create a StandbyVirtualMachinePoolResource + /// Update a StandbyVirtualMachinePoolResource /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// Name of the standby virtual machine pool @@ -2839,7 +4228,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2899,6 +4288,7 @@ public partial class StandbyPool // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-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 @@ -2911,7 +4301,10 @@ public partial class StandbyPool 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; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 @@ -3051,6 +4444,7 @@ public partial class StandbyPool // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-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 @@ -3063,7 +4457,10 @@ public partial class StandbyPool 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; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 @@ -3195,6 +4592,7 @@ public partial class StandbyPool /// The name of the resource group. The name is case insensitive. /// Name of the standby virtual machine pool /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -3202,9 +4600,9 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDelete(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDelete(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3229,13 +4627,14 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyVirtualMachinePoolsDelete_Call (request, onNoContent,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } /// Delete a StandbyVirtualMachinePoolResource /// /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -3243,9 +4642,9 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3282,13 +4681,14 @@ public partial class StandbyPool await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StandbyVirtualMachinePoolsDelete_Call (request, onNoContent,onDefault,eventListener,sender); + await this.StandbyVirtualMachinePoolsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); } } /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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. @@ -3296,7 +4696,7 @@ public partial class StandbyPool /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3314,6 +4714,7 @@ public partial class StandbyPool var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-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 @@ -3326,7 +4727,10 @@ public partial class StandbyPool 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; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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 @@ -3401,6 +4805,12 @@ public partial class StandbyPool switch ( _response.StatusCode ) { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.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.StandbyPool.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -3464,7 +4874,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsGet(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3505,7 +4915,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3556,7 +4966,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3609,7 +5019,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsGetWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3788,7 +5198,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3828,7 +5238,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListByResourceGroupViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3877,7 +5287,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3927,7 +5337,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4103,7 +5513,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4141,7 +5551,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListBySubscriptionViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4187,7 +5597,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4233,7 +5643,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4407,7 +5817,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdate(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4454,7 +5864,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4511,7 +5921,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4571,7 +5981,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, 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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4617,7 +6027,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4664,7 +6074,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinePoolsUpdateWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResourceUpdate body, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4852,7 +6262,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesGet(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, string standbyVirtualMachineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4895,7 +6305,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesGetViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4949,7 +6359,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5006,7 +6416,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesGetWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, string standbyVirtualMachineName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5193,7 +6603,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesListByStandbyVirtualMachinePoolResource(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5237,7 +6647,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceViaIdentity(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.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5291,7 +6701,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5347,7 +6757,7 @@ public partial class StandbyPool /// public async global::System.Threading.Tasks.Task StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceWithResult(string subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.ISendAsync sender) { - var apiVersion = @"2023-12-01-preview"; + var apiVersion = @"2024-03-01"; // Constant Parameters using( NoSynchronizationContext ) { diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_Get.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_Get.cs new file mode 100644 index 000000000000..13ae9ebd860c --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_Get.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; + using System; + + /// Get a StandbyContainerGroupPoolRuntimeViewResource + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyContainerGroupPoolStatus_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyContainerGroupPoolRuntimeViewResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyContainerGroupPoolStatus_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.StandbyPool Client => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the standby container group pool + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the standby container group pool")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the standby container group pool", + SerializedName = @"standbyContainerGroupPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _version; + + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + SerializedName = @"runtimeView", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"'latest'", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string Version { get => this._version; set => this._version = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStandbyContainerGroupPoolStatus_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("Version")) + { + Version = (string)this.MyInvocation.BoundParameters["Version"]; + } + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StandbyContainerGroupPoolRuntimeViewsGet(SubscriptionId, ResourceGroupName, Name, Version, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,Version=Version}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentity.cs new file mode 100644 index 000000000000..303bc99831cd --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; + using System; + + /// Get a StandbyContainerGroupPoolRuntimeViewResource + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyContainerGroupPoolStatus_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyContainerGroupPoolRuntimeViewResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyContainerGroupPoolStatus_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.StandbyPool Client => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStandbyContainerGroupPoolStatus_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.StandbyContainerGroupPoolRuntimeViewsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.StandbyContainerGroupPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StandbyContainerGroupPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.RuntimeView) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuntimeView"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.StandbyContainerGroupPoolRuntimeViewsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyContainerGroupPoolName ?? null, InputObject.RuntimeView ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool.cs new file mode 100644 index 000000000000..8a2318f54160 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool.cs @@ -0,0 +1,514 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; + using System; + + /// Get a StandbyContainerGroupPoolRuntimeViewResource + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyContainerGroupPoolRuntimeViewResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.StandbyPool Client => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity _standbyContainerGroupPoolInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity StandbyContainerGroupPoolInputObject { get => this._standbyContainerGroupPoolInputObject; set => this._standbyContainerGroupPoolInputObject = value; } + + /// Backing field for property. + private string _version; + + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + SerializedName = @"runtimeView", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"'latest'", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string Version { get => this._version; set => this._version = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStandbyContainerGroupPoolStatus_GetViaIdentityStandbyContainerGroupPool() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("Version")) + { + Version = (string)this.MyInvocation.BoundParameters["Version"]; + } + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StandbyContainerGroupPoolInputObject?.Id != null) + { + this.StandbyContainerGroupPoolInputObject.Id += $"/runtimeViews/{(global::System.Uri.EscapeDataString(this.Version.ToString()))}"; + await this.Client.StandbyContainerGroupPoolRuntimeViewsGetViaIdentity(StandbyContainerGroupPoolInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StandbyContainerGroupPoolInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StandbyContainerGroupPoolInputObject has null value for StandbyContainerGroupPoolInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StandbyContainerGroupPoolInputObject) ); + } + if (null == StandbyContainerGroupPoolInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StandbyContainerGroupPoolInputObject has null value for StandbyContainerGroupPoolInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StandbyContainerGroupPoolInputObject) ); + } + if (null == StandbyContainerGroupPoolInputObject.StandbyContainerGroupPoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StandbyContainerGroupPoolInputObject has null value for StandbyContainerGroupPoolInputObject.StandbyContainerGroupPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StandbyContainerGroupPoolInputObject) ); + } + await this.Client.StandbyContainerGroupPoolRuntimeViewsGet(StandbyContainerGroupPoolInputObject.SubscriptionId ?? null, StandbyContainerGroupPoolInputObject.ResourceGroupName ?? null, StandbyContainerGroupPoolInputObject.StandbyContainerGroupPoolName ?? null, Version, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Version=Version}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_List.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_List.cs new file mode 100644 index 000000000000..071a0b293f43 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPoolStatus_List.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; + using System; + + /// + /// List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource + /// + /// + /// [OpenAPI] ListByStandbyPool=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyContainerGroupPoolStatus_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyContainerGroupPoolStatus_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.StandbyPool Client => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Name of the standby container group pool + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the standby container group pool")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the standby container group pool", + SerializedName = @"standbyContainerGroupPoolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStandbyContainerGroupPoolStatus_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StandbyContainerGroupPoolRuntimeViewsListByStandbyPool(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResourceListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StandbyContainerGroupPoolRuntimeViewsListByStandbyPool_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_Get.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_Get.cs index 5a122e40e93a..2f74e795055f 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_Get.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class GetAzStandbyContainerGroupPool_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_GetViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_GetViaIdentity.cs index 35ed2fdf31f1..fc57e138bde2 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_GetViaIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class GetAzStandbyContainerGroupPool_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List.cs index 7b51ca0998b7..0e9ee88714c0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyContainerGroupPoolResource resources by subscription ID")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", ApiVersion = "2024-03-01")] public partial class GetAzStandbyContainerGroupPool_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List1.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List1.cs index 38f328c599b6..86d4782a10ed 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List1.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyContainerGroupPool_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyContainerGroupPoolResource resources by resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", ApiVersion = "2024-03-01")] public partial class GetAzStandbyContainerGroupPool_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyOperation_List.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyOperation_List.cs index 55132b65e2c5..73efcda2f40e 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyOperation_List.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyOperation_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List the operations for the provider")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/providers/Microsoft.StandbyPool/operations", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/providers/Microsoft.StandbyPool/operations", ApiVersion = "2024-03-01")] public partial class GetAzStandbyOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_Get.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_Get.cs similarity index 92% rename from src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_Get.cs rename to src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_Get.cs index 261c5fda8239..06ed3e0ca5e3 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_Get.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_Get.cs @@ -10,16 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; using System; - /// Get a StandbyVirtualMachineResource + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolVM_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachineResource")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolStatus_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachinePoolRuntimeViewResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", ApiVersion = "2023-12-01-preview")] - public partial class GetAzStandbyVMPoolVM_Get : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyVMPoolStatus_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext { @@ -107,7 +107,6 @@ public partial class GetAzStandbyVMPoolVM_Get : global::System.Management.Automa Description = @"Name of the standby virtual machine pool", SerializedName = @"standbyVirtualMachinePoolName", PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StandbyVirtualMachinePoolName")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] public string Name { get => this._name; set => this._name = value; } @@ -165,20 +164,28 @@ public partial class GetAzStandbyVMPoolVM_Get : global::System.Management.Automa [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - /// Backing field for property. - private string _vMName; + /// Backing field for property. + private string _version; - /// Name of the standby virtual machine - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the standby virtual machine")] + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.")] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, - Description = @"Name of the standby virtual machine", - SerializedName = @"standbyVirtualMachineName", + Description = @"The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + SerializedName = @"runtimeView", PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StandbyVirtualMachineName")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"'latest'", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.DoNotExport] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] - public string VMName { get => this._vMName; set => this._vMName = value; } + public string Version { get => this._version; set => this._version = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -197,12 +204,12 @@ public partial class GetAzStandbyVMPoolVM_Get : global::System.Management.Automa /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -251,9 +258,9 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public GetAzStandbyVMPoolVM_Get() + public GetAzStandbyVMPoolStatus_Get() { } @@ -391,18 +398,22 @@ protected override void ProcessRecord() Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); } // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("Version")) + { + Version = (string)this.MyInvocation.BoundParameters["Version"]; + } try { foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StandbyVirtualMachinesGet(SubscriptionId, ResourceGroupName, Name, VMName, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsGet(SubscriptionId, ResourceGroupName, Name, Version, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,VMName=VMName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,Version=Version}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -480,12 +491,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -497,7 +508,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource var result = (await response); if (null != result) { diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentity.cs similarity index 94% rename from src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentity.cs rename to src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentity.cs index fd9886f66880..5c578e834a38 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentity.cs @@ -10,16 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; using System; - /// Get a StandbyVirtualMachineResource + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolVM_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachineResource")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolStatus_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachinePoolRuntimeViewResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", ApiVersion = "2023-12-01-preview")] - public partial class GetAzStandbyVMPoolVM_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyVMPoolStatus_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext { @@ -142,12 +142,12 @@ public partial class GetAzStandbyVMPoolVM_GetViaIdentity : global::System.Manage /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -196,9 +196,9 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public GetAzStandbyVMPoolVM_GetViaIdentity() + public GetAzStandbyVMPoolStatus_GetViaIdentity() { } @@ -341,7 +341,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.StandbyVirtualMachinesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); } else { @@ -358,11 +358,11 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StandbyVirtualMachinePoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - if (null == InputObject.StandbyVirtualMachineName) + if (null == InputObject.RuntimeView) { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StandbyVirtualMachineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.RuntimeView"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StandbyVirtualMachinesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyVirtualMachinePoolName ?? null, InputObject.StandbyVirtualMachineName ?? null, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyVirtualMachinePoolName ?? null, InputObject.RuntimeView ?? null, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -446,12 +446,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,7 +463,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource var result = (await response); if (null != result) { diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool.cs similarity index 90% rename from src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool.cs rename to src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool.cs index 1933c0c24855..2ef06ee548e9 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool.cs @@ -10,16 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets using Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Cmdlets; using System; - /// Get a StandbyVirtualMachineResource + /// Get a StandbyVirtualMachinePoolRuntimeViewResource /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}" + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachineResource")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachinePoolRuntimeViewResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", ApiVersion = "2023-12-01-preview")] - public partial class GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext { @@ -125,20 +125,28 @@ public partial class GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePoo [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] public Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity StandbyVirtualMachinePoolInputObject { get => this._standbyVirtualMachinePoolInputObject; set => this._standbyVirtualMachinePoolInputObject = value; } - /// Backing field for property. - private string _vMName; + /// Backing field for property. + private string _version; - /// Name of the standby virtual machine - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the standby virtual machine")] + /// + /// The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime + /// view of the pool, otherwise the request will fail with NotFound exception. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.")] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, - Description = @"Name of the standby virtual machine", - SerializedName = @"standbyVirtualMachineName", + Description = @"The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + SerializedName = @"runtimeView", PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StandbyVirtualMachineName")] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"'latest'", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.DoNotExport] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] - public string VMName { get => this._vMName; set => this._vMName = value; } + public string Version { get => this._version; set => this._version = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -157,12 +165,12 @@ public partial class GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePoo /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -211,9 +219,10 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet + /// class. /// - public GetAzStandbyVMPoolVM_GetViaIdentityStandbyVirtualMachinePool() + public GetAzStandbyVMPoolStatus_GetViaIdentityStandbyVirtualMachinePool() { } @@ -351,13 +360,17 @@ protected override void ProcessRecord() Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); } // get the client instance + if (true == this.MyInvocation?.BoundParameters?.ContainsKey("Version")) + { + Version = (string)this.MyInvocation.BoundParameters["Version"]; + } try { await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (StandbyVirtualMachinePoolInputObject?.Id != null) { - this.StandbyVirtualMachinePoolInputObject.Id += $"/standbyVirtualMachines/{(global::System.Uri.EscapeDataString(this.VMName.ToString()))}"; - await this.Client.StandbyVirtualMachinesGetViaIdentity(StandbyVirtualMachinePoolInputObject.Id, onOk, onDefault, this, Pipeline); + this.StandbyVirtualMachinePoolInputObject.Id += $"/runtimeViews/{(global::System.Uri.EscapeDataString(this.Version.ToString()))}"; + await this.Client.StandbyVirtualMachinePoolRuntimeViewsGetViaIdentity(StandbyVirtualMachinePoolInputObject.Id, onOk, onDefault, this, Pipeline); } else { @@ -374,13 +387,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StandbyVirtualMachinePoolInputObject has null value for StandbyVirtualMachinePoolInputObject.StandbyVirtualMachinePoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StandbyVirtualMachinePoolInputObject) ); } - await this.Client.StandbyVirtualMachinesGet(StandbyVirtualMachinePoolInputObject.SubscriptionId ?? null, StandbyVirtualMachinePoolInputObject.ResourceGroupName ?? null, StandbyVirtualMachinePoolInputObject.StandbyVirtualMachinePoolName ?? null, VMName, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsGet(StandbyVirtualMachinePoolInputObject.SubscriptionId ?? null, StandbyVirtualMachinePoolInputObject.ResourceGroupName ?? null, StandbyVirtualMachinePoolInputObject.StandbyVirtualMachinePoolName ?? null, Version, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VMName=VMName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Version=Version}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -458,12 +471,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,7 +488,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource var result = (await response); if (null != result) { diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_List.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_List.cs similarity index 95% rename from src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_List.cs rename to src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_List.cs index 59738ea95598..a7432c95002d 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolVM_List.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPoolStatus_List.cs @@ -11,17 +11,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets using System; /// - /// List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource + /// List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource /// /// - /// [OpenAPI] ListByStandbyVirtualMachinePoolResource=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines" + /// [OpenAPI] ListByStandbyPool=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolVM_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStandbyVMPoolStatus_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines", ApiVersion = "2023-12-01-preview")] - public partial class GetAzStandbyVMPoolVM_List : global::System.Management.Automation.PSCmdlet, + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews", ApiVersion = "2024-03-01")] + public partial class GetAzStandbyVMPoolStatus_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext { @@ -115,7 +115,6 @@ public partial class GetAzStandbyVMPoolVM_List : global::System.Management.Autom Description = @"Name of the standby virtual machine pool", SerializedName = @"standbyVirtualMachinePoolName", PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StandbyVirtualMachinePoolName")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Path)] public string Name { get => this._name; set => this._name = value; } @@ -190,12 +189,12 @@ public partial class GetAzStandbyVMPoolVM_List : global::System.Management.Autom /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) @@ -244,9 +243,9 @@ protected override void EndProcessing() } /// - /// Initializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// - public GetAzStandbyVMPoolVM_List() + public GetAzStandbyVMPoolStatus_List() { } @@ -389,7 +388,7 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StandbyVirtualMachinesListByStandbyVirtualMachinePoolResource(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } @@ -473,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResourceListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -490,7 +489,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResourceListResult + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResourceListResult var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink @@ -527,7 +526,7 @@ protected override void StopProcessing() { requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Method.Get ); await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StandbyVirtualMachinesListByStandbyVirtualMachinePoolResource_Call(requestMessage, onOk, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolRuntimeViewsListByStandbyPool_Call(requestMessage, onOk, onDefault, this, Pipeline); } } } diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_Get.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_Get.cs index 72e37334ed35..4aba7eaea705 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_Get.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class GetAzStandbyVMPool_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_GetViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_GetViaIdentity.cs index 3f5a34549725..99b75b550fa0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_GetViaIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Get a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class GetAzStandbyVMPool_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List.cs index 7fc6a141f977..0d404f77ff2d 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyVirtualMachinePoolResource resources by subscription ID")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", ApiVersion = "2024-03-01")] public partial class GetAzStandbyVMPool_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List1.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List1.cs index cd6a534042dd..ac5a306e82be 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List1.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/GetAzStandbyVMPool_List1.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"List StandbyVirtualMachinePoolResource resources by resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", ApiVersion = "2024-03-01")] public partial class GetAzStandbyVMPool_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateExpanded.cs index 31a7d3042311..90948519a432 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class NewAzStandbyContainerGroupPool_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonFilePath.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonFilePath.cs index 5823e78061e4..c68056b87c4a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonFilePath.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class NewAzStandbyContainerGroupPool_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonString.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonString.cs index 7d3d0137b5f1..7d025ae53e4d 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonString.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyContainerGroupPool_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class NewAzStandbyContainerGroupPool_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateExpanded.cs index 1fb5bac74561..264592d992a1 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class NewAzStandbyVMPool_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -108,14 +108,14 @@ public partial class NewAzStandbyVMPool_CreateExpanded : global::System.Manageme public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies maximum number of virtual machines in the standby virtual machine pool.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the maximum number of virtual machines in the standby virtual machine pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] public long MaxReadyCapacity { get => _resourceBody.ElasticityProfileMaxReadyCapacity ?? default(long); set => _resourceBody.ElasticityProfileMaxReadyCapacity = value; } @@ -128,6 +128,20 @@ public partial class NewAzStandbyVMPool_CreateExpanded : global::System.Manageme /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + public long MinReadyCapacity { get => _resourceBody.ElasticityProfileMinReadyCapacity ?? default(long); set => _resourceBody.ElasticityProfileMinReadyCapacity = value; } + /// Backing field for property. private string _name; diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonFilePath.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonFilePath.cs index 8142cbc07ce9..73d8fdcfc92a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonFilePath.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class NewAzStandbyVMPool_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonString.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonString.cs index 818c812271ba..849abb496011 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonString.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/NewAzStandbyVMPool_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Create a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class NewAzStandbyVMPool_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_Delete.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_Delete.cs index 7b69290cc4c9..4af228ec6fb6 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_Delete.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Delete a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class RemoveAzStandbyContainerGroupPool_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -207,6 +207,16 @@ public partial class RemoveAzStandbyContainerGroupPool_Delete : global::System.M partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -461,7 +471,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StandbyContainerGroupPoolsDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyContainerGroupPoolsDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) @@ -573,5 +583,29 @@ protected override void StopProcessing() } } } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_DeleteViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_DeleteViaIdentity.cs index 661dce648271..f9d795c79cc6 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_DeleteViaIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyContainerGroupPool_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Delete a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class RemoveAzStandbyContainerGroupPool_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -167,6 +167,16 @@ public partial class RemoveAzStandbyContainerGroupPool_DeleteViaIdentity : globa partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -420,7 +430,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.StandbyContainerGroupPoolsDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyContainerGroupPoolsDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -437,7 +447,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StandbyContainerGroupPoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StandbyContainerGroupPoolsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyContainerGroupPoolName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyContainerGroupPoolsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyContainerGroupPoolName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -550,5 +560,29 @@ protected override void StopProcessing() } } } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_Delete.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_Delete.cs index 1cf4cb85c38e..c5c1936d80c2 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_Delete.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_Delete.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Delete a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class RemoveAzStandbyVMPool_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -207,6 +207,16 @@ public partial class RemoveAzStandbyVMPool_Delete : global::System.Management.Au partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -461,7 +471,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StandbyVirtualMachinePoolsDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolsDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.UndeclaredResponseException urexception) @@ -573,5 +583,29 @@ protected override void StopProcessing() } } } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_DeleteViaIdentity.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_DeleteViaIdentity.cs index 61121c2b5e2d..9622162b07b8 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_DeleteViaIdentity.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/RemoveAzStandbyVMPool_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Delete a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class RemoveAzStandbyVMPool_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -167,6 +167,16 @@ public partial class RemoveAzStandbyVMPool_DeleteViaIdentity : global::System.Ma partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + /// /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) /// @@ -420,7 +430,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.StandbyVirtualMachinePoolsDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolsDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); } else { @@ -437,7 +447,7 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StandbyVirtualMachinePoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StandbyVirtualMachinePoolsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyVirtualMachinePoolName ?? null, onNoContent, onDefault, this, Pipeline); + await this.Client.StandbyVirtualMachinePoolsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StandbyVirtualMachinePoolName ?? null, onNoContent, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -550,5 +560,29 @@ protected override void StopProcessing() } } } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } } } \ No newline at end of file diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateExpanded.cs index f78750d747ed..9d648f383899 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class UpdateAzStandbyContainerGroupPool_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaIdentityExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaIdentityExpanded.cs index f7b777f22d5a..3b1f1a9cdff0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaIdentityExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] public partial class UpdateAzStandbyContainerGroupPool_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonFilePath.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonFilePath.cs index 55369136b663..afd0b9d68373 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonFilePath.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class UpdateAzStandbyContainerGroupPool_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonString.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonString.cs index b184f8d202ce..3df47cee6f8d 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonString.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyContainerGroupPool_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyContainerGroupPoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class UpdateAzStandbyContainerGroupPool_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateExpanded.cs index bc49faf77da4..5bf084656a76 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class UpdateAzStandbyVMPool_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -92,14 +92,14 @@ public partial class UpdateAzStandbyVMPool_UpdateExpanded : global::System.Manag public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies maximum number of virtual machines in the standby virtual machine pool.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the maximum number of virtual machines in the standby virtual machine pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] public long MaxReadyCapacity { get => _propertiesBody.ElasticityProfileMaxReadyCapacity ?? default(long); set => _propertiesBody.ElasticityProfileMaxReadyCapacity = value; } @@ -112,6 +112,20 @@ public partial class UpdateAzStandbyVMPool_UpdateExpanded : global::System.Manag /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + public long MinReadyCapacity { get => _propertiesBody.ElasticityProfileMinReadyCapacity ?? default(long); set => _propertiesBody.ElasticityProfileMinReadyCapacity = value; } + /// Backing field for property. private string _name; diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaIdentityExpanded.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaIdentityExpanded.cs index b7ddb13a0b19..21f4d3c41f43 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaIdentityExpanded.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] public partial class UpdateAzStandbyVMPool_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IContext @@ -100,14 +100,14 @@ public partial class UpdateAzStandbyVMPool_UpdateViaIdentityExpanded : global::S public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// Specifies maximum number of virtual machines in the standby virtual machine pool. + /// Specifies the maximum number of virtual machines in the standby virtual machine pool. /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies maximum number of virtual machines in the standby virtual machine pool.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the maximum number of virtual machines in the standby virtual machine pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies maximum number of virtual machines in the standby virtual machine pool.", + Description = @"Specifies the maximum number of virtual machines in the standby virtual machine pool.", SerializedName = @"maxReadyCapacity", PossibleTypes = new [] { typeof(long) })] public long MaxReadyCapacity { get => _propertiesBody.ElasticityProfileMaxReadyCapacity ?? default(long); set => _propertiesBody.ElasticityProfileMaxReadyCapacity = value; } @@ -120,6 +120,20 @@ public partial class UpdateAzStandbyVMPool_UpdateViaIdentityExpanded : global::S /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + /// + /// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot + /// exceed MaxReadyCapacity. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + SerializedName = @"minReadyCapacity", + PossibleTypes = new [] { typeof(long) })] + public long MinReadyCapacity { get => _propertiesBody.ElasticityProfileMinReadyCapacity ?? default(long); set => _propertiesBody.ElasticityProfileMinReadyCapacity = value; } + /// /// The instance of the that the remote call will use. /// diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonFilePath.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonFilePath.cs index 807560085634..60f7c12513a1 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonFilePath.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class UpdateAzStandbyVMPool_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonString.cs b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonString.cs index d2cba3bdca77..54b37b1894f0 100644 --- a/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonString.cs +++ b/src/StandbyPool/StandbyPool.Autorest/generated/cmdlets/UpdateAzStandbyVMPool_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolResource))] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Description(@"Update a StandbyVirtualMachinePoolResource")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2023-12-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", ApiVersion = "2024-03-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.NotSuggestDefaultParameterSet] public partial class UpdateAzStandbyVMPool_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Runtime.IEventListener, diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Az.StandbyPool.md b/src/StandbyPool/StandbyPool.Autorest/help/Az.StandbyPool.md index 7c699ca059a4..0f8dadf2077b 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/Az.StandbyPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/Az.StandbyPool.md @@ -14,11 +14,14 @@ Microsoft Azure PowerShell: StandbyPool cmdlets ### [Get-AzStandbyContainerGroupPool](Get-AzStandbyContainerGroupPool.md) Get a StandbyContainerGroupPoolResource +### [Get-AzStandbyContainerGroupPoolStatus](Get-AzStandbyContainerGroupPoolStatus.md) +Get a StandbyContainerGroupPoolRuntimeViewResource + ### [Get-AzStandbyVMPool](Get-AzStandbyVMPool.md) Get a StandbyVirtualMachinePoolResource -### [Get-AzStandbyVMPoolVM](Get-AzStandbyVMPoolVM.md) -Get a StandbyVirtualMachineResource +### [Get-AzStandbyVMPoolStatus](Get-AzStandbyVMPoolStatus.md) +Get a StandbyVirtualMachinePoolRuntimeViewResource ### [New-AzStandbyContainerGroupPool](New-AzStandbyContainerGroupPool.md) Create a StandbyContainerGroupPoolResource diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPool.md index 24f9daf397b3..a82d3e2a6b15 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPool.md @@ -40,7 +40,7 @@ Get a StandbyContainerGroupPoolResource ## EXAMPLES -### Example 1: Get a standby container pool +### Example 1: Get a standby container group pool ```powershell Get-AzStandbyContainerGroupPool ` -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` @@ -72,7 +72,7 @@ Tag : { Type : microsoft.standbypool/standbycontainergrouppools ``` -Above command is getting a standby container pool. +Above command is getting a standby container group pool. ## PARAMETERS diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolVM.md b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPoolStatus.md similarity index 51% rename from src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolVM.md rename to src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPoolStatus.md index d07a7d3052e3..91bc0ba10afe 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolVM.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyContainerGroupPoolStatus.md @@ -1,55 +1,86 @@ --- external help file: Module Name: Az.StandbyPool -online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm +online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppoolstatus schema: 2.0.0 --- -# Get-AzStandbyVMPoolVM +# Get-AzStandbyContainerGroupPoolStatus ## SYNOPSIS -Get a StandbyVirtualMachineResource +Get a StandbyContainerGroupPoolRuntimeViewResource ## SYNTAX -### List (Default) +### Get (Default) ``` -Get-AzStandbyVMPoolVM -Name -ResourceGroupName [-SubscriptionId ] +Get-AzStandbyContainerGroupPoolStatus -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] ``` -### Get +### GetViaIdentity ``` -Get-AzStandbyVMPoolVM -Name -ResourceGroupName -VMName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzStandbyContainerGroupPoolStatus -InputObject [-DefaultProfile ] + [] ``` -### GetViaIdentity +### GetViaIdentityStandbyContainerGroupPool ``` -Get-AzStandbyVMPoolVM -InputObject [-DefaultProfile ] [] +Get-AzStandbyContainerGroupPoolStatus -StandbyContainerGroupPoolInputObject + [-DefaultProfile ] [] ``` -### GetViaIdentityStandbyVirtualMachinePool +### List ``` -Get-AzStandbyVMPoolVM -StandbyVirtualMachinePoolInputObject -VMName +Get-AzStandbyContainerGroupPoolStatus -Name -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] ``` ## DESCRIPTION -Get a StandbyVirtualMachineResource +Get a StandbyContainerGroupPoolRuntimeViewResource ## EXAMPLES -### Example 1: List virtual machines in standby virtual machine pool +### Example 1: Get runtime view of a standby container group pool ```powershell -Get-AzStandbyVMPoolVM -Name testPool -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b -ResourceGroupName test-standbypool +Get-AzStandbyContainerGroupPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-Name testPool ` +-ResourceGroupName test-standbypool ``` ```output -None -``` - -Above command is listing virtual machines in standby virtual machine pool +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyContainerGroupPools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 1 + }, + { + "state": "Running", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews +``` + +Above command is getting a runtime veiw of standby container group pool. ## PARAMETERS @@ -85,12 +116,12 @@ Accept wildcard characters: False ``` ### -Name -Name of the standby virtual machine pool +Name of the standby container group pool ```yaml Type: System.String Parameter Sets: Get, List -Aliases: StandbyVirtualMachinePoolName +Aliases: Required: True Position: Named @@ -115,12 +146,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -StandbyVirtualMachinePoolInputObject +### -StandbyContainerGroupPoolInputObject Identity Parameter ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity -Parameter Sets: GetViaIdentityStandbyVirtualMachinePool +Parameter Sets: GetViaIdentityStandbyContainerGroupPool Aliases: Required: True @@ -146,21 +177,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -VMName -Name of the standby virtual machine - -```yaml -Type: System.String -Parameter Sets: Get, GetViaIdentityStandbyVirtualMachinePool -Aliases: StandbyVirtualMachineName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). @@ -170,7 +186,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource ## NOTES diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPool.md index 758f355b3993..130d0c320191 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPool.md @@ -50,6 +50,7 @@ Get-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolStatus.md b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolStatus.md new file mode 100644 index 000000000000..98ef70aca5e1 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/help/Get-AzStandbyVMPoolStatus.md @@ -0,0 +1,206 @@ +--- +external help file: +Module Name: Az.StandbyPool +online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolstatus +schema: 2.0.0 +--- + +# Get-AzStandbyVMPoolStatus + +## SYNOPSIS +Get a StandbyVirtualMachinePoolRuntimeViewResource + +## SYNTAX + +### Get (Default) +``` +Get-AzStandbyVMPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzStandbyVMPoolStatus -InputObject [-DefaultProfile ] + [] +``` + +### GetViaIdentityStandbyVirtualMachinePool +``` +Get-AzStandbyVMPoolStatus -StandbyVirtualMachinePoolInputObject + [-DefaultProfile ] [] +``` + +### List +``` +Get-AzStandbyVMPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a StandbyVirtualMachinePoolRuntimeViewResource + +## EXAMPLES + +### Example 1: Get runtime view of a standby virtual machine pool +```powershell +Get-AzStandbyVMPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-ResourceGroupName test-standbypool ` +-Name testPool +``` + +```output +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyVirtualMachinePools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 0 + }, + { + "state": "Starting", + "count": 0 + }, + { + "state": "Running", + "count": 1 + }, + { + "state": "Deallocating", + "count": 0 + }, + { + "state": "Deallocated", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews +``` + +Above command is getting a runtime veiw of standby virtual machine pool. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the standby virtual machine pool + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StandbyVirtualMachinePoolInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentityStandbyVirtualMachinePool +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource + +## NOTES + +## RELATED LINKS + diff --git a/src/StandbyPool/StandbyPool.Autorest/help/New-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/help/New-AzStandbyVMPool.md index 50e5e5b9cd7f..55829c196d8a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/New-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/New-AzStandbyVMPool.md @@ -15,8 +15,8 @@ Create a StandbyVirtualMachinePoolResource ### CreateExpanded (Default) ``` New-AzStandbyVMPool -Name -ResourceGroupName -Location [-SubscriptionId ] - [-MaxReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-MaxReadyCapacity ] [-MinReadyCapacity ] [-Tag ] [-VMSSId ] + [-VMState ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` ### CreateViaJsonFilePath @@ -46,12 +46,14 @@ New-AzStandbyVMPool ` -Location eastus ` -VMSSId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ` -MaxReadyCapacity 1 ` +-MinReadyCapacity 1 ` -VMState Running ``` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool @@ -150,7 +152,23 @@ Accept wildcard characters: False ``` ### -MaxReadyCapacity -Specifies maximum number of virtual machines in the standby virtual machine pool. +Specifies the maximum number of virtual machines in the standby virtual machine pool. + +```yaml +Type: System.Int64 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReadyCapacity +Specifies the desired minimum number of virtual machines in the standby virtual machine pool. +MinReadyCapacity cannot exceed MaxReadyCapacity. ```yaml Type: System.Int64 diff --git a/src/StandbyPool/StandbyPool.Autorest/help/Update-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool.Autorest/help/Update-AzStandbyVMPool.md index f8ed201feb48..e3d05e776677 100644 --- a/src/StandbyPool/StandbyPool.Autorest/help/Update-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool.Autorest/help/Update-AzStandbyVMPool.md @@ -15,14 +15,15 @@ Update a StandbyVirtualMachinePoolResource ### UpdateExpanded (Default) ``` Update-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - [-MaxReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-MaxReadyCapacity ] [-MinReadyCapacity ] [-Tag ] [-VMSSId ] + [-VMState ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzStandbyVMPool -InputObject [-MaxReadyCapacity ] [-Tag ] - [-VMSSId ] [-VMState ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Update-AzStandbyVMPool -InputObject [-MaxReadyCapacity ] + [-MinReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` ### UpdateViaJsonFilePath @@ -54,6 +55,7 @@ Update-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 2 +ElasticityProfileMinReadyCapacity : 2 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool @@ -137,7 +139,23 @@ Accept wildcard characters: False ``` ### -MaxReadyCapacity -Specifies maximum number of virtual machines in the standby virtual machine pool. +Specifies the maximum number of virtual machines in the standby virtual machine pool. + +```yaml +Type: System.Int64 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReadyCapacity +Specifies the desired minimum number of virtual machines in the standby virtual machine pool. +MinReadyCapacity cannot exceed MaxReadyCapacity. ```yaml Type: System.Int64 diff --git a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Recording.json b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Recording.json index 2c9addd31255..3e74558f3d49 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Recording.json +++ b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Recording.json @@ -1,15 +1,15 @@ { - "AzStandbyContainerPool+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview+1": { + "AzStandbyContainerPool+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview", - "Content": "{\n \"location\": \"eastus\",\n \"properties\": {\n \"elasticityProfile\": {\n \"maxReadyCapacity\": 1,\n \"refillPolicy\": \"always\"\n },\n \"containerGroupProperties\": {\n \"containerGroupProfile\": {\n \"id\": \"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\n \"revision\": 1\n },\n \"subnetIds\": [\n {\n \"id\": \"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default\"\n }\n ]\n }\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01", + "Content": "{\n \"location\": \"eastasia\",\n \"properties\": {\n \"elasticityProfile\": {\n \"maxReadyCapacity\": 1,\n \"refillPolicy\": \"always\"\n },\n \"containerGroupProperties\": {\n \"containerGroupProfile\": {\n \"id\": \"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\n \"revision\": 1\n },\n \"subnetIds\": [\n {\n \"id\": \"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default\"\n }\n ]\n }\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "655" ] + "Content-Length": [ "639" ] } }, "Response": { @@ -17,42 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"4200b817-0000-0100-0000-6616cb2f0000\"" ], + "ETag": [ "\"3c00d652-0000-1900-0000-66c67d6a0000\"" ], "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "4c6589b6-9f72-4e92-ab80-1ac339231f02" ], - "x-ms-correlation-request-id": [ "8f38b05d-1cb4-4c09-8244-f4ccb5d07b39" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172359Z:8f38b05d-1cb4-4c09-8244-f4ccb5d07b39" ], + "x-ms-request-id": [ "613de8c2-49bc-46aa-b15e-7f30211ae804" ], + "x-ms-correlation-request-id": [ "d3160399-1dc7-42f6-ae61-0e023ef113bc" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235106Z:d3160399-1dc7-42f6-ae61-0e023ef113bc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: F304F610224C4757856CF53E7038059D Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:23:57Z" ], - "Date": [ "Wed, 10 Apr 2024 17:23:59 GMT" ] + "X-MSEdge-Ref": [ "Ref A: EF06C5F5DDF8431D856C7DBA3047BB05 Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:50:59Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1040" ], + "Content-Length": [ "1018" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:23:59.0514746Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:23:59.0514746Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastasia\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:51:03.9206045Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:51:03.9206045Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyContainerPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview+2": { + "AzStandbyContainerPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "dd06bca4-6d3a-40b8-8bab-c9b74cf34dfd" ], - "CommandName": [ "New-AzStandbyContainerPool" ], - "FullCommandName": [ "New-AzStandbyContainerPool_CreateExpanded" ], + "x-ms-client-request-id": [ "4f63819b-9653-4e09-abae-67a4e12b5cd9" ], + "CommandName": [ "New-AzStandbyContainerGroupPool" ], + "FullCommandName": [ "New-AzStandbyContainerGroupPool_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ] }, "ContentHeaders": { } @@ -62,41 +62,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"4200b817-0000-0100-0000-6616cb2f0000\"" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "ETag": [ "\"3c00d652-0000-1900-0000-66c67d6a0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "2569936e-4d64-48ab-8b61-8c3fa98bdddd" ], - "x-ms-correlation-request-id": [ "864470a3-60ad-4f50-ba89-42d40a8cceaa" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172430Z:864470a3-60ad-4f50-ba89-42d40a8cceaa" ], + "x-ms-request-id": [ "42cc521c-b114-437c-bfe6-7d3ea336b821" ], + "x-ms-correlation-request-id": [ "b3d6a4ba-2651-4dd0-888a-07e9d7253540" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235137Z:b3d6a4ba-2651-4dd0-888a-07e9d7253540" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 3C296A9E965C4F2D9F7F86425CA4C0CA Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:24:29Z" ], - "Date": [ "Wed, 10 Apr 2024 17:24:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 79BCFF7E895C4A56A4A1DEFC4DFAF937 Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:51:36Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1040" ], + "Content-Length": [ "1018" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:23:59.0514746Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:23:59.0514746Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastasia\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:51:03.9206045Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:51:03.9206045Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyContainerPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview+3": { + "AzStandbyContainerPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "dd06bca4-6d3a-40b8-8bab-c9b74cf34dfd" ], - "CommandName": [ "New-AzStandbyContainerPool" ], - "FullCommandName": [ "New-AzStandbyContainerPool_CreateExpanded" ], + "x-ms-client-request-id": [ "4f63819b-9653-4e09-abae-67a4e12b5cd9" ], + "CommandName": [ "New-AzStandbyContainerGroupPool" ], + "FullCommandName": [ "New-AzStandbyContainerGroupPool_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ] }, "ContentHeaders": { } @@ -106,40 +106,40 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"4200b817-0000-0100-0000-6616cb2f0000\"" ], + "ETag": [ "\"3c00d652-0000-1900-0000-66c67d6a0000\"" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "5f7e2d16-0287-4f1e-b2dd-441018cee05c" ], - "x-ms-correlation-request-id": [ "3d50dad4-8748-4c47-85c5-6c89610cf989" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172430Z:3d50dad4-8748-4c47-85c5-6c89610cf989" ], + "x-ms-request-id": [ "24f88f85-e135-40da-9314-dec3f346943a" ], + "x-ms-correlation-request-id": [ "e0146573-6c0f-4e4a-9c6f-d596ec6ca9dd" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235137Z:e0146573-6c0f-4e4a-9c6f-d596ec6ca9dd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 47628562AB4F4EFC89DD1B6011137E39 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:24:30Z" ], - "Date": [ "Wed, 10 Apr 2024 17:24:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6F9D44A97BC64E258234F4E474467084 Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:51:37Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1040" ], + "Content-Length": [ "1018" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:23:59.0514746Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:23:59.0514746Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastasia\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:51:03.9206045Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:51:03.9206045Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyContainerPool+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview+1": { + "AzStandbyContainerPool+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "bbb52fb0-e5f8-4030-96b9-3f40b78b25c0" ], - "CommandName": [ "Get-AzStandbyContainerPool" ], - "FullCommandName": [ "Get-AzStandbyContainerPool_Get" ], + "x-ms-client-request-id": [ "552debd0-3759-4600-ac3f-530b2ccb5938" ], + "CommandName": [ "Get-AzStandbyContainerGroupPool" ], + "FullCommandName": [ "Get-AzStandbyContainerGroupPool_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -150,40 +150,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"4200b817-0000-0100-0000-6616cb2f0000\"" ], + "ETag": [ "\"3c00d652-0000-1900-0000-66c67d6a0000\"" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "569b3704-671c-458a-9a73-8167316277db" ], - "x-ms-correlation-request-id": [ "a3571d0b-2739-4f02-93ba-02a7af4878e8" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172430Z:a3571d0b-2739-4f02-93ba-02a7af4878e8" ], + "x-ms-request-id": [ "9460b5b5-fc41-433a-ace2-4f855729648b" ], + "x-ms-correlation-request-id": [ "8b68e5a0-e269-495c-923b-43d6a370d2b8" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235138Z:8b68e5a0-e269-495c-923b-43d6a370d2b8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 8239C2606CE0487F9D64F15DC26499C1 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:24:30Z" ], - "Date": [ "Wed, 10 Apr 2024 17:24:29 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 7130E291AA16472C843C73C10B232C81 Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:51:38Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "1040" ], + "Content-Length": [ "1018" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:23:59.0514746Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:23:59.0514746Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool\",\"name\":\"testCGPool\",\"type\":\"microsoft.standbypool/standbycontainergrouppools\",\"location\":\"eastasia\",\"tags\":{},\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:51:03.9206045Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:51:03.9206045Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"refillPolicy\":\"always\"},\"containerGroupProperties\":{\"containerGroupProfile\":{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG\",\"revision\":1},\"subnetIds\":[{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default\"}]},\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyContainerPool+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview+1": { + "AzStandbyContainerPool+[NoContext]+GetRuntimeView+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool/runtimeViews/latest?api-version=2024-03-01+1": { "Request": { - "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2023-12-01-preview", + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool/runtimeViews/latest?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "b31e0fe3-a1b4-4477-b61d-5216a61bae54" ], - "CommandName": [ "Remove-AzStandbyContainerPool" ], - "FullCommandName": [ "Remove-AzStandbyContainerPool_Delete" ], + "x-ms-client-request-id": [ "3808dea4-1fed-4316-812c-43df2f53d65c" ], + "CommandName": [ "Get-AzStandbyContainerGroupPoolStatus" ], + "FullCommandName": [ "Get-AzStandbyContainerGroupPoolStatus_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Vary": [ "Accept-Encoding" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "55630f5a-7b85-41c9-9c6b-b26f75a811a7" ], + "x-ms-correlation-request-id": [ "bfc2db22-12d8-4df1-b347-356d60861dfa" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235140Z:bfc2db22-12d8-4df1-b347-356d60861dfa" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CD6F740ED8814F70A862986ABE91B67D Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:51:38Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "457" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool/runtimeViews/latest\",\"name\":\"latest\",\"type\":\"Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews\",\"properties\":{\"instanceCountSummary\":[{\"instanceCountsByState\":[{\"state\":\"Creating\",\"count\":1},{\"state\":\"Running\",\"count\":0},{\"state\":\"Deleting\",\"count\":0}]}],\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzStandbyContainerPool+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyContainerGroupPools/testCGPool?api-version=2024-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "8d65a4ec-fd22-4a20-a5c5-1eee2839b074" ], + "CommandName": [ "Remove-AzStandbyContainerGroupPool" ], + "FullCommandName": [ "Remove-AzStandbyContainerGroupPool_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -194,20 +238,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"4200ee17-0000-0100-0000-6616cb4f0000\"" ], - "Location": [ "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/providers/Microsoft.StandbyPool/locations/EASTUS/operationStatuses/40636459-3ea8-4473-a530-0adc1100bd30*6D2A11BEC3224A39A3A67CE9F85C9E22A88463451B7E6A46ED6E738D787FDCFC?api-version=2023-12-01-preview\u0026t=638483666713080038\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBT2vcy9ccvhGewsiHI1BQHsz3Wn8zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=wPI2AG6pvti7cNeoIOKQXZi9HsF_SQR29PvqoKaXHw4xzELjIaEaiqr9GRSf23OJT7NC_FSRWxANQKEAyfs11yreDmqsHC5xbLvaUbgbmiocpkNTolTRXZAAWR93AEtwBNd37ou9XidjlQeE3z1XCwqCcB8U2RSdIefqLiGOzR5wiwFaKeDdB7v5C_hRlUfWrtYUEEuzdj9GvMwr1R52loL9rwahgvW2EIKV2wvGiTi3ERhxd4Hm4qLntZP5IKl-DhRN6ZatwA7MZxwrYpSuU35DtjiHRPywMgD2f_SzLwQTtqpPE9Iam7Df5988rs4X4M7tV0huhJc3Q6cBDSwlyA\u0026h=aiK2LfwFM3kpk3Q4lUyj-VEa-dQtgGBHd_K_mHh0cXM" ], + "ETag": [ "\"3c009653-0000-1900-0000-66c67d900000\"" ], + "Location": [ "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/providers/Microsoft.StandbyPool/locations/EASTASIA/operationStatuses/e6058d79-d595-4ca2-8240-1b6dad4df146*DC03F2FA74E8A334E9BB9AFFE013DA985EAB8EEC410919893AE74DAF0EA56585?api-version=2024-03-01\u0026t=638598811050431624\u0026c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q\u0026s=SBAEFj0tmUc_RTt1Z6fl2xx7kzBmBaNo8ejaxbVFLS8oh4UGIhdkFpYvA1ygEMyRHp6PdqOHsSUo3jXUZGgRG9e_1fJOISDpLAXOb8rYJBZ8JpeNbyFtIZv2W-E08nuWHmyivUDQmlGdd9WeVYUIHmiZP0ZfaXnw7MIotiHnUvQgJ-3lCenEyC-XqUGmfG7CevrNXHtb3tRiROqoT68KMkEgGxbJNo36qfQ9Fp3mHhzPTp0jXmhxvXCsjSX8BBHpUckZ3trQZQyj_MXZf_iVUJAeYrBtVKwnip0ICpEd63fGaFtFXXhmgYkdNWM0wQzXEMQyVCYHUs0xkfs7wQC94g\u0026h=E1-gZq7lvlEmYTPMdnxx3eoHp44J3C5ge0tqd5S5Ask" ], "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-providerhub-traffic": [ "True" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/providers/Microsoft.StandbyPool/locations/EASTUS/operationStatuses/40636459-3ea8-4473-a530-0adc1100bd30*6D2A11BEC3224A39A3A67CE9F85C9E22A88463451B7E6A46ED6E738D787FDCFC?api-version=2023-12-01-preview\u0026t=638483666713080038\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBT2vcy9ccvhGewsiHI1BQHsz3Wn8zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=wPI2AG6pvti7cNeoIOKQXZi9HsF_SQR29PvqoKaXHw4xzELjIaEaiqr9GRSf23OJT7NC_FSRWxANQKEAyfs11yreDmqsHC5xbLvaUbgbmiocpkNTolTRXZAAWR93AEtwBNd37ou9XidjlQeE3z1XCwqCcB8U2RSdIefqLiGOzR5wiwFaKeDdB7v5C_hRlUfWrtYUEEuzdj9GvMwr1R52loL9rwahgvW2EIKV2wvGiTi3ERhxd4Hm4qLntZP5IKl-DhRN6ZatwA7MZxwrYpSuU35DtjiHRPywMgD2f_SzLwQTtqpPE9Iam7Df5988rs4X4M7tV0huhJc3Q6cBDSwlyA\u0026h=aiK2LfwFM3kpk3Q4lUyj-VEa-dQtgGBHd_K_mHh0cXM" ], - "x-ms-request-id": [ "40636459-3ea8-4473-a530-0adc1100bd30" ], - "x-ms-correlation-request-id": [ "7051bc6f-d244-4077-bd05-fc6b189a4f80" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172431Z:7051bc6f-d244-4077-bd05-fc6b189a4f80" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/providers/Microsoft.StandbyPool/locations/EASTASIA/operationStatuses/e6058d79-d595-4ca2-8240-1b6dad4df146*DC03F2FA74E8A334E9BB9AFFE013DA985EAB8EEC410919893AE74DAF0EA56585?api-version=2024-03-01\u0026t=638598811050431624\u0026c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q\u0026s=SBAEFj0tmUc_RTt1Z6fl2xx7kzBmBaNo8ejaxbVFLS8oh4UGIhdkFpYvA1ygEMyRHp6PdqOHsSUo3jXUZGgRG9e_1fJOISDpLAXOb8rYJBZ8JpeNbyFtIZv2W-E08nuWHmyivUDQmlGdd9WeVYUIHmiZP0ZfaXnw7MIotiHnUvQgJ-3lCenEyC-XqUGmfG7CevrNXHtb3tRiROqoT68KMkEgGxbJNo36qfQ9Fp3mHhzPTp0jXmhxvXCsjSX8BBHpUckZ3trQZQyj_MXZf_iVUJAeYrBtVKwnip0ICpEd63fGaFtFXXhmgYkdNWM0wQzXEMQyVCYHUs0xkfs7wQC94g\u0026h=E1-gZq7lvlEmYTPMdnxx3eoHp44J3C5ge0tqd5S5Ask" ], + "x-ms-request-id": [ "e6058d79-d595-4ca2-8240-1b6dad4df146" ], + "x-ms-correlation-request-id": [ "d6e6aa03-5af7-4cec-a0dc-9e8f67468d12" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235145Z:d6e6aa03-5af7-4cec-a0dc-9e8f67468d12" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: C90213A0E2014CA88F23204CED946453 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:24:30Z" ], - "Date": [ "Wed, 10 Apr 2024 17:24:30 GMT" ] + "X-MSEdge-Ref": [ "Ref A: B4FA1C3D76464838A930AB94FE18E215 Ref B: CO6AA3150217023 Ref C: 2024-08-21T23:51:40Z" ], + "Date": [ "Wed, 21 Aug 2024 23:51:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "4" ], diff --git a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Tests.ps1 b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Tests.ps1 index 3ed3a9029f75..ebefeeab192a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Tests.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyContainerPool.Tests.ps1 @@ -17,21 +17,30 @@ if(($null -eq $TestName) -or ($TestName -contains 'AzStandbyContainerPool')) Describe 'AzStandbyContainerPool' { It 'CreateExpanded' { { - $standbyvmpool = New-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId -Location eastus -MaxReadyCapacity 1 -RefillPolicy always -ContainerProfileId "/subscriptions/$($env.SubscriptionId)/resourcegroups/test-rg/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG" -ProfileRevision 1 -SubnetId @{id="/subscriptions/$($env.SubscriptionId)/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-rg-vnet/subnets/default"} - $standbyvmpool.Name | Should -Be testCGPool + $standbycgpool = New-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId -Location eastasia -MaxReadyCapacity 1 -RefillPolicy always -ContainerProfileId "/subscriptions/$($env.SubscriptionId)/resourcegroups/test-sdks/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG" -ProfileRevision 1 -SubnetId @{id="/subscriptions/$($env.SubscriptionId)/resourceGroups/test-sdks/providers/Microsoft.Network/virtualNetworks/test-sdks-vnet/subnets/default"} + $standbycgpool.Name | Should -Be testCGPool } | Should -Not -Throw } It 'Get' { { - $standbyvmpool = Get-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId - $standbyvmpool.Name | Should -Be testCGPool + $standbycgpool = Get-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId + $standbycgpool.Name | Should -Be testCGPool + } | Should -Not -Throw + } + + It 'GetRuntimeView' { + { + $standbycgpoolRuntimeView = Get-AzStandbyContainerGroupPoolStatus -Name testCGPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId + $standbycgpoolRuntimeView.Name | Should -Be latest + $standbycgpoolRuntimeView.InstanceCountSummary.Count | Should BeGreaterThan 0 + $standbycgpoolRuntimeView.InstanceCountSummary.instanceCountsByState.Count | Should BeGreaterThan 0 } | Should -Not -Throw } It 'Delete' { { - Remove-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId -NoWait + Remove-AzStandbyContainerGroupPool -Name testCGPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId -NoWait } | Should -Not -Throw } } diff --git a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Recording.json b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Recording.json index edf4a7ee3893..71122ef3443a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Recording.json +++ b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Recording.json @@ -1,15 +1,15 @@ { - "AzStandbyVMPool+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+1": { + "AzStandbyVMPool+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", - "Content": "{\n \"location\": \"eastus\",\n \"properties\": {\n \"elasticityProfile\": {\n \"maxReadyCapacity\": 1\n },\n \"virtualMachineState\": \"Running\",\n \"attachedVirtualMachineScaleSetId\": \"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", + "Content": "{\n \"location\": \"eastasia\",\n \"properties\": {\n \"elasticityProfile\": {\n \"maxReadyCapacity\": 1,\n \"minReadyCapacity\": 1\n },\n \"virtualMachineState\": \"Running\",\n \"attachedVirtualMachineScaleSetId\": \"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\"\n }\n}", "isContentBase64": false, "Headers": { }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "339" ] + "Content-Length": [ "364" ] } }, "Response": { @@ -17,42 +17,42 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0025fb-0000-0100-0000-6616cb5c0000\"" ], + "ETag": [ "\"ba004a25-0000-1900-0000-66c67db00000\"" ], "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "66aa01e7-e40c-40f0-8669-282e12bc7695" ], - "x-ms-correlation-request-id": [ "c698da03-681e-4ced-9f52-870d06747620" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172444Z:c698da03-681e-4ced-9f52-870d06747620" ], + "x-ms-request-id": [ "2429e9ed-bfb5-4f13-8175-4300b2f2f8c9" ], + "x-ms-correlation-request-id": [ "a24816a5-2a3c-4d33-8c69-ec357cf78c55" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235216Z:a24816a5-2a3c-4d33-8c69-ec357cf78c55" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: B42C4708A66349A0913087FC514DF26B Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:24:43Z" ], - "Date": [ "Wed, 10 Apr 2024 17:24:44 GMT" ] + "X-MSEdge-Ref": [ "Ref A: BE68673184974F17BE4E7C5F76837EE6 Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:11Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:16 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "795" ], + "Content-Length": [ "806" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:24:44.110937Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:24:44.110937Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastasia\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:52:14.877708Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:52:14.877708Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"minReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyVMPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+2": { + "AzStandbyVMPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "961fa386-d696-4daf-bc19-16d57217040d" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "ae642bea-2351-4430-9900-b9a21d60d52f" ], "CommandName": [ "New-AzStandbyVMPool" ], "FullCommandName": [ "New-AzStandbyVMPool_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ] }, "ContentHeaders": { } @@ -62,41 +62,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0025fb-0000-0100-0000-6616cb5c0000\"" ], + "ETag": [ "\"ba004a25-0000-1900-0000-66c67db00000\"" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "acf8ee98-d617-47ec-b956-f3e91d9311b7" ], - "x-ms-correlation-request-id": [ "38772ea6-2837-48dd-b543-a90635f711c3" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172515Z:38772ea6-2837-48dd-b543-a90635f711c3" ], + "x-ms-request-id": [ "1b89a6e3-2a59-49ec-8d9b-7aeb5302568b" ], + "x-ms-correlation-request-id": [ "4d8e7c42-19ae-4c3a-97f2-bc3366834e26" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235247Z:4d8e7c42-19ae-4c3a-97f2-bc3366834e26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4DB4319C1F2A4B61A4F3BECC8127EDDD Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:25:14Z" ], - "Date": [ "Wed, 10 Apr 2024 17:25:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: FEECAB243F964248A5EE3383C25C8A07 Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:47Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "795" ], + "Content-Length": [ "806" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:24:44.110937Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:24:44.110937Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastasia\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:52:14.877708Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:52:14.877708Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"minReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyVMPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+3": { + "AzStandbyVMPool+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "961fa386-d696-4daf-bc19-16d57217040d" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "ae642bea-2351-4430-9900-b9a21d60d52f" ], "CommandName": [ "New-AzStandbyVMPool" ], "FullCommandName": [ "New-AzStandbyVMPool_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ] }, "ContentHeaders": { } @@ -106,40 +106,84 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0025fb-0000-0100-0000-6616cb5c0000\"" ], + "ETag": [ "\"ba004a25-0000-1900-0000-66c67db00000\"" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "c120d0dc-53f5-470b-8bf9-d0e1dc639db5" ], - "x-ms-correlation-request-id": [ "62bf6512-8a78-49ac-8f6d-1b7ca8c22639" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172515Z:62bf6512-8a78-49ac-8f6d-1b7ca8c22639" ], + "x-ms-request-id": [ "f0cdc169-1983-480e-8b14-63d80dc21a5f" ], + "x-ms-correlation-request-id": [ "c98d4898-1e3d-4a5f-aa34-b0df8da37a52" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235248Z:c98d4898-1e3d-4a5f-aa34-b0df8da37a52" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 37E4C7028BAC4CD3AF3F319849DD0058 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:25:15Z" ], - "Date": [ "Wed, 10 Apr 2024 17:25:14 GMT" ] + "X-MSEdge-Ref": [ "Ref A: F8A050B0EECA497C8EE9A0DAED9BB887 Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:47Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "795" ], + "Content-Length": [ "806" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:24:44.110937Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:24:44.110937Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastasia\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:52:14.877708Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:52:14.877708Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"minReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyVMPool+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+1": { + "AzStandbyVMPool+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "a86ffe5b-3866-435b-a582-4af8d36a8040" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "35eff8f9-7545-43d9-a861-68a7c75064ba" ], "CommandName": [ "Get-AzStandbyVMPool" ], "FullCommandName": [ "Get-AzStandbyVMPool_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"ba004a25-0000-1900-0000-66c67db00000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "d20744b2-b651-4a24-8b0b-1e7127d3e943" ], + "x-ms-correlation-request-id": [ "c7aeb80a-0ecc-4eee-a20b-be4e7f7ec540" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235248Z:c7aeb80a-0ecc-4eee-a20b-be4e7f7ec540" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 06CFC778C6F04B36809D90799885EFB8 Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:48Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "806" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastasia\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:52:14.877708Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:52:14.877708Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1,\"minReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "AzStandbyVMPool+[NoContext]+GetRuntimeView+$GET+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool/runtimeViews/latest?api-version=2024-03-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool/runtimeViews/latest?api-version=2024-03-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "d9d4d964-3f7e-48e7-9624-614076b73747" ], + "CommandName": [ "Get-AzStandbyVMPoolStatus" ], + "FullCommandName": [ "Get-AzStandbyVMPoolStatus_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -150,31 +194,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0025fb-0000-0100-0000-6616cb5c0000\"" ], + "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "1f936553-754e-4236-8fb2-600b1fecf8f3" ], - "x-ms-correlation-request-id": [ "f3e32570-8c0c-49bf-964b-d40d319b302e" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172515Z:f3e32570-8c0c-49bf-964b-d40d319b302e" ], + "x-ms-request-id": [ "80fb191f-75ae-4f1d-aeb7-d7ccb4bc9584" ], + "x-ms-correlation-request-id": [ "6a628bcf-d789-424b-ad9b-e08cacde0690" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235250Z:6a628bcf-d789-424b-ad9b-e08cacde0690" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 4718563A349F42EC884158B3F7225839 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:25:15Z" ], - "Date": [ "Wed, 10 Apr 2024 17:25:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 3FFB34A5EBF34EBA9CFAF36521AAB326 Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:49Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:49 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "795" ], + "Content-Length": [ "555" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:24:44.110937Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:24:44.110937Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool/runtimeViews/latest\",\"name\":\"latest\",\"type\":\"Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews\",\"properties\":{\"instanceCountSummary\":[{\"instanceCountsByState\":[{\"state\":\"Creating\",\"count\":1},{\"state\":\"Starting\",\"count\":0},{\"state\":\"Running\",\"count\":0},{\"state\":\"Deallocating\",\"count\":0},{\"state\":\"Deallocated\",\"count\":0},{\"state\":\"Deleting\",\"count\":0}]}],\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyVMPool+[NoContext]+Update+$PATCH+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+1": { + "AzStandbyVMPool+[NoContext]+Update+$PATCH+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", "Content": "{\n \"properties\": {\n \"elasticityProfile\": {\n \"maxReadyCapacity\": 2\n }\n }\n}", "isContentBase64": false, "Headers": { @@ -189,41 +233,41 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0032fb-0000-0100-0000-6616cb7c0000\"" ], + "ETag": [ "\"ba009e28-0000-1900-0000-66c67dd50000\"" ], "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-providerhub-traffic": [ "True" ], - "x-ms-request-id": [ "f08be0ab-c562-46e8-af18-f0333fd119df" ], - "x-ms-correlation-request-id": [ "b40aaeb8-f5f1-4e83-9f31-5ee995353660" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172516Z:b40aaeb8-f5f1-4e83-9f31-5ee995353660" ], + "x-ms-request-id": [ "acaa047c-8eaa-4f64-b755-9b9433bca7e0" ], + "x-ms-correlation-request-id": [ "93e73202-622c-416b-b10c-91c50d308b7f" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235254Z:93e73202-622c-416b-b10c-91c50d308b7f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 6B2055A95CCE4DEFB8D9E02DBA0639E9 Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:25:16Z" ], - "Date": [ "Wed, 10 Apr 2024 17:25:15 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 6DF797D2C8B04EB79DB537CECB08502E Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:50Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:53 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "796" ], + "Content-Length": [ "807" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-10T17:24:44.110937Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-10T17:25:16.2214364Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", + "Content": "{\"id\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool\",\"name\":\"testPool\",\"type\":\"microsoft.standbypool/standbyvirtualmachinepools\",\"location\":\"eastasia\",\"systemData\":{\"createdBy\":\"dev@microsoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-08-21T23:52:14.877708Z\",\"lastModifiedBy\":\"dev@microsoft.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-08-21T23:52:52.9865873Z\"},\"properties\":{\"elasticityProfile\":{\"maxReadyCapacity\":2,\"minReadyCapacity\":1},\"virtualMachineState\":\"Running\",\"attachedVirtualMachineScaleSetId\":\"/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss\",\"provisioningState\":\"Succeeded\"}}", "isContentBase64": false } }, - "AzStandbyVMPool+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview+1": { + "AzStandbyVMPool+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-rg/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2023-12-01-preview", + "RequestUri": "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/resourceGroups/test-sdks/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool?api-version=2024-03-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "97e35491-0e4c-4fff-b554-0a1095595353" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "cc474429-be7f-4bba-ba50-26f5713bb09e" ], "CommandName": [ "Remove-AzStandbyVMPool" ], "FullCommandName": [ "Remove-AzStandbyVMPool_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.12", "Az.StandbyPool/0.2.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -234,20 +278,20 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "ETag": [ "\"6f0033fb-0000-0100-0000-6616cb7c0000\"" ], - "Location": [ "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/providers/Microsoft.StandbyPool/locations/EASTUS/operationStatuses/5ea1cb69-99c4-4a6b-8c39-2c45b92a48ed*9F4DB3114D3D8F7DED8497F0D441BD1016348E645BEF0AF23FFE9753EE918EA8?api-version=2023-12-01-preview\u0026t=638483667169844206\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBT2vcy9ccvhGewsiHI1BQHsz3Wn8zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=tSxMUonvHaLorSbY2j2lnP1XnN5qOfw06b_sGZgvKAWVnOzZaz0PkgADVSCOsp_F4JKeFluqyg9oneVQ6-4vtXQskg40zCati2fuHbKc5l2uOQ9rd-lBdVxaI8w7HzS67-QGH0ownSNVhwKs_crjgD4vckZWK6dxZRg3lCvcr6B3T6dHxJ-uAGDtQK9VTLx2eMiPj-_Fnt-bnxGx_qoF4UhtDEz-XOu08agw2YHvkBYLbYGFUjN7D62mVVaWL9liKE61zCnz3s-4hrqbDJ4RXYQGJlRtmaIGRkaPhn0JLKOLpm_QTiAu8rNJzRxLrhClkWeZzx13loUZT3HKvY4jDA\u0026h=MwKf4uFRwUAWAildPz0uy6TrQ3almfHDf2vgem5qLjM" ], + "ETag": [ "\"ba001029-0000-1900-0000-66c67dd80000\"" ], + "Location": [ "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/providers/Microsoft.StandbyPool/locations/EASTASIA/operationStatuses/8e6b855b-5775-4f2e-9eb6-aee6cc66795f*3262CD08E09091F3F5EEBA7B79CD746AAD5BC0FA4A48F87200F09B8C363E469A?api-version=2024-03-01\u0026t=638598811771111285\u0026c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q\u0026s=mmQY9PXXX6P97nkg6W3YOHHA4EyUZdJN_dJqNZgiaSvNaUP-U2v9chRI5a0viC3G4gcAFdgfnlyCD5LIF1k6xMKf-kUK6hXsQw313iVsC3x0KU9-PqXC1fnKAfAdOFjbRBPLztr7zel9IYtfXGzGLsqIsRjYD32qvsUkjcw6fYlPEPddMkkBVG8g9o12V9CmLEnXA0jsvYyhD59eaI9KvPu2H70DL19GxJI_AjEjzsAFnrK-HS27zpKatzixIWFrWNq_VW3AFFkAGWiIxtHBR-O5N6X-at9wmqoFi8Ud_CagEW8vGTz41xUR0023B7k5w4hGJqTsYH8tbjcHRqznuQ\u0026h=qRx4CUuBRldvt-5HsO0abUNQHT115a5oOTOHOsHjnkY" ], "Vary": [ "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "x-ms-providerhub-traffic": [ "True" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/providers/Microsoft.StandbyPool/locations/EASTUS/operationStatuses/5ea1cb69-99c4-4a6b-8c39-2c45b92a48ed*9F4DB3114D3D8F7DED8497F0D441BD1016348E645BEF0AF23FFE9753EE918EA8?api-version=2023-12-01-preview\u0026t=638483667169687953\u0026c=MIIHADCCBeigAwIBAgITfARmPsJdo2ShuN-ImAAABGY-wjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjQwMTMxMjIwNzA5WhcNMjUwMTI1MjIwNzA5WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOVFiSMi9Sg6cKnrBuPHbDk_Zwa1ZNYHwLVPJArEI9N2bLrgd1mU0ZdNVcdf6rtZCkUUuCe3vxnVTGwufpwH9GPWDgJOpJoL9wgKOzUDiHLUeiWPjrK1AoaQVprZgjnzXBIWiZC2tZjbUT9pOI_ixYJJPrsCfLt7HEccnhObROE1mo_hpiPDrtOQDaX-BboNceB8vI1wmSPApGpPRM9hBRQbXgqKFC8094UNsMVkWPCrsPvP5YlMBLARlGf2WTevGKRREjstkApf1Swi7uKnpyhhsidD1yREMU0mWY9wnZfAX0jpEp3p9jKVMPQ3L-m-nSZI4zrtbW0AnI0O3pAEwe0CAwEAAaOCA-0wggPpMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBT2vcy9ccvhGewsiHI1BQHsz3Wn8zAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAGCN3sBATAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBADNBZjhX44bpBtC8kogZJGe4lYeHX95whfZ7X_CMSUuZRbQQ_b6raUpp8V8eF0YUa9b3Oa-DGrs5WfzogCuGcJPeoEVnDYzc1jlKubSIpGw73aGZzhbTjJeNf-Qe-5vTG-GcNzVtIcrwi93YSiK2LSbgrLpTL7T7znjePcGRRkCBjAslrV5SqufcsrpGmqvPAVKXRV-OIOzvXy6qmn9CHmdo0RGBXGIakbLMec_1SIS8NdPsB6i6XPjL2SDjqKTa5car7bVYlXEVsgL-000VF1t6x1II3VBNfsEJ81CdJyxaCJnwvWI6kHtCtJX9QYK3qZab9PfZRBvcetJoPdMFvBU\u0026s=S9tkAKzgoor0-17q7JJrMhezUL_VtIACVHCTIGWu3XBO_p7uoMmoX5QtJ1ziGay3t4xye22a6VUMum9M5wLZyBlukkOQeVSJSCE3oYk6STQp0elLwzLB2MpknV8hTL22dLKi3ndBp8m32vxL9vGoRm668oj8raUheI8qOKzHfre6_-IyTOzLNWpRiBi3WamthQsWlpOIItLyPM5fSJ2ar_MlDsC0LMFsKg2iYJTkA_oUV6-AEUrqmaK7YUHUxHHvheGBa-0LSMwe9PKq36LVjZCXdwszfUmao1S134ZAPTdysRN5OM1_b4wfLnx-FGCENhj6c81GM2GOiZHdOn1P3A\u0026h=xejbVRx7NLArwHxmsfjgctlPiasLcbfmFG0fGKYu_d4" ], - "x-ms-request-id": [ "5ea1cb69-99c4-4a6b-8c39-2c45b92a48ed" ], - "x-ms-correlation-request-id": [ "9c762d74-ff65-40ac-8564-7cc8dc31bbfe" ], - "x-ms-routing-request-id": [ "WESTUS2:20240410T172517Z:9c762d74-ff65-40ac-8564-7cc8dc31bbfe" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/826c93bf-0407-46d0-86dc-6c41c64c8f0c/providers/Microsoft.StandbyPool/locations/EASTASIA/operationStatuses/8e6b855b-5775-4f2e-9eb6-aee6cc66795f*3262CD08E09091F3F5EEBA7B79CD746AAD5BC0FA4A48F87200F09B8C363E469A?api-version=2024-03-01\u0026t=638598811770955020\u0026c=MIIHpTCCBo2gAwIBAgITOgM6dTLGpzYZpvPtgQAEAzp1MjANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwNjI2MDEzMjIxWhcNMjUwNjIxMDEzMjIxWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPPPKY5bDN03KptFFhiyLIyn86BlrXYFIZWYXA-hY7_WbLyWN0IxcLIUBW_I-9u-YsXOHk9WPMlUYHIFPgHW7A3FsSGfl9dd6YGapKoSSw0NkTpNXM58R54BBgLp7AhiWzK15D9T-XELNSU4Wq9sEeA5T24kazcgS2MUkzELH0I9dwu7g0dwJIuIJkoJjEzg1b1Q3Ie5HKHHNbjottJn7Q5LBS-9QtQyruuwaNTgSJpCoi4PBKVIOTBYL_Nv1wecmKmfWcT0mnhQE9zjhJTbcoN9hKSvAMqsDHtxWUFZosiw3JKIY0zb59CrVGSuOhfN3qaarwN9EAlXLqc4ZyKpsTkCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CWTJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSU5GUkElMjBDQSUyMDAxKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQlkyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMElORlJBJTIwQ0ElMjAwMSg0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JZMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3J0MB0GA1UdDgQWBBRk_38CqdKjPVylWUR4uuqhbFGeHTAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJTkZSQSUyMENBJTIwMDEoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTl2Ztn_PjsurvwwKidileIud8-YzAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAFsx7FtYAzSo98T5ydNFa0ukjPZ6XCQc9zo7ldqy235P_zJAUkaNgCU4EGOzbZJDoMa8mAfhyukL_0GfPeApUaY2e44ZOzoYAkeEuDiwcs-9zoQ1fCyXhn0pCumGFXRilX9KjAPaYTzDvQMEllTy_ZViwTahuKaGtFVamZguBPdaeYC_0oybtTVNQCs8hGnffhNZOMASB-5pFs35MNxsDWTVIQksDee419jqpsbWLkh6rnanILO1O_ihwb-WpvRQByQ5NGpG1-z0MQ6nRpr9wWxUi-DsrVsD38NTMIPc2uei4Ivf6qnGRvOOj0fmsciWuTTEXMaD-5a81mGlzhZc09Q\u0026s=feH1PA54Bds9fFQsEhf06rRz_efUNnEQErmn70jeDj3ONo_Vp63TgttEhhP_eKSRuQFqeHB9PP-tfYPkWgZaDV3kyhN1j5PP1_TQ2bCx0w_WhQlYTUVIBbsk9_0j_JceWxPACqqGZ7FVcpfCw9DvJQTc1LOs_DUfO8xGP1bu2UQ8zDRwYpEz6RQtyf-61kDDNYo_fjNk-bgL7QPIRLJOg-OjC4hJko1rpbKVp2VrKVNn4W9p9eRWfE6qN-BP5I5nwGq_o6WrNCTGFoEIa503TtU2RxfrgUdClK3vr_fkSMaPdp_D6TMA34Ki3N_2HUHNRFOq9KVSWHDYfw2xhaTNSA\u0026h=TdrRFg0NT0y_WXY2HijepAJ3gYKuiQCy1PcQkHi8qVw" ], + "x-ms-request-id": [ "8e6b855b-5775-4f2e-9eb6-aee6cc66795f" ], + "x-ms-correlation-request-id": [ "138ac87b-f431-4311-9daf-b3b5b50a3f88" ], + "x-ms-routing-request-id": [ "WESTUS2:20240821T235257Z:138ac87b-f431-4311-9daf-b3b5b50a3f88" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "X-Cache": [ "CONFIG_NOCACHE" ], - "X-MSEdge-Ref": [ "Ref A: 30EE1E2F0F264238A9265A63057C5D6E Ref B: CO6AA3150219047 Ref C: 2024-04-10T17:25:16Z" ], - "Date": [ "Wed, 10 Apr 2024 17:25:16 GMT" ] + "X-MSEdge-Ref": [ "Ref A: 2E47F75E859E493B8A808699F6B6314D Ref B: CO6AA3150218009 Ref C: 2024-08-21T23:52:54Z" ], + "Date": [ "Wed, 21 Aug 2024 23:52:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "4" ], diff --git a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Tests.ps1 b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Tests.ps1 index 076527d358c2..e8081b4de55a 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Tests.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/test/AzStandbyVMPool.Tests.ps1 @@ -17,21 +17,32 @@ if(($null -eq $TestName) -or ($TestName -contains 'AzStandbyVMPool')) Describe 'AzStandbyVMPool' { It 'CreateExpanded' { { - $standbyvmpool = New-AzStandbyVMPool -Name testPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId -Location eastus -VMSSId "/subscriptions/$($env.SubscriptionId)/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss" -MaxReadyCapacity 1 -VMState Running + $standbyvmpool = New-AzStandbyVMPool -Name testPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId -Location eastasia -VMSSId "/subscriptions/$($env.SubscriptionId)/resourceGroups/test-sdks/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss" -MaxReadyCapacity 1 -MinReadyCapacity 1 -VMState Running $standbyvmpool.Name | Should -Be testPool + $standbyvmpool.ElasticityProfileMaxReadyCapacity | Should -Be 1 + $standbyvmpool.ElasticityProfileMinReadyCapacity | Should -Be 1 } | Should -Not -Throw } It 'Get' { { - $standbyvmpool = Get-AzStandbyVMPool -Name testPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId + $standbyvmpool = Get-AzStandbyVMPool -Name testPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId $standbyvmpool.Name | Should -Be testPool } | Should -Not -Throw } + It 'GetRuntimeView' { + { + $standbyvmpool = Get-AzStandbyVMPoolStatus -Name testPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId + $standbyvmpool.Name | Should -Be latest + $standbyvmpool.InstanceCountSummary.Count | Should BeGreaterThan 0 + $standbyvmpool.InstanceCountSummary.instanceCountsByState.Count | Should BeGreaterThan 0 + } | Should -Not -Throw + } + It 'Update' { { - $standbyvmpool = Update-AzStandbyVMPool -Name testPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId -MaxReadyCapacity 2 + $standbyvmpool = Update-AzStandbyVMPool -Name testPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId -MaxReadyCapacity 2 $standbyvmpool.Name | Should -Be testPool $standbyvmpool.ElasticityProfileMaxReadyCapacity | Should -Be 2 } | Should -Not -Throw @@ -39,7 +50,7 @@ Describe 'AzStandbyVMPool' { It 'Delete' { { - Remove-AzStandbyVMPool -Name testPool -ResourceGroupName test-rg -SubscriptionId $env.SubscriptionId -NoWait + Remove-AzStandbyVMPool -Name testPool -ResourceGroupName test-sdks -SubscriptionId $env.SubscriptionId -NoWait } | Should -Not -Throw } diff --git a/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyContainerGroupPoolStatus.Tests.ps1 b/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyContainerGroupPoolStatus.Tests.ps1 new file mode 100644 index 000000000000..a069fa444cd4 --- /dev/null +++ b/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyContainerGroupPoolStatus.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStandbyContainerGroupPoolStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStandbyContainerGroupPoolStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzStandbyContainerGroupPoolStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityStandbyContainerGroupPool' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolVM.Tests.ps1 b/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolStatus.Tests.ps1 similarity index 92% rename from src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolVM.Tests.ps1 rename to src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolStatus.Tests.ps1 index 9d30142c6e40..32420cab6ea9 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolVM.Tests.ps1 +++ b/src/StandbyPool/StandbyPool.Autorest/test/Get-AzStandbyVMPoolStatus.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStandbyVMPoolVM')) +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStandbyVMPoolStatus')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStandbyVMPoolVM.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStandbyVMPoolStatus.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,20 +14,20 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStandbyVMPoolVM')) . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Get-AzStandbyVMPoolVM' { - It 'List' -skip { +Describe 'Get-AzStandbyVMPoolStatus' { + It 'Get' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } - It 'Get' -skip { + It 'List' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } - It 'GetViaIdentityStandbyVirtualMachinePool' -skip { + It 'GetViaIdentity' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } - It 'GetViaIdentity' -skip { + It 'GetViaIdentityStandbyVirtualMachinePool' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } } diff --git a/src/StandbyPool/StandbyPool.Autorest/test/env.json b/src/StandbyPool/StandbyPool.Autorest/test/env.json index 51e051114681..213909a267bf 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/env.json +++ b/src/StandbyPool/StandbyPool.Autorest/test/env.json @@ -1,4 +1,4 @@ { - "Tenant": "45cbe9a4-8378-4c2a-8fb9-0fe654c51558", - "SubscriptionId": "f8da6e30-a9d8-48ab-b05c-3f7fe482e13b" + "Tenant": "9d443c47-1ad7-4a6f-9cd7-7ae8f68d867a", + "SubscriptionId": "826c93bf-0407-46d0-86dc-6c41c64c8f0c" } diff --git a/src/StandbyPool/StandbyPool.Autorest/test/localEnv.json b/src/StandbyPool/StandbyPool.Autorest/test/localEnv.json index 959f3daaf529..213909a267bf 100644 --- a/src/StandbyPool/StandbyPool.Autorest/test/localEnv.json +++ b/src/StandbyPool/StandbyPool.Autorest/test/localEnv.json @@ -1,4 +1,4 @@ { - "SubscriptionId": "8cf6c1b6-c80f-437c-87ad-45fbaff54f73", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" + "Tenant": "9d443c47-1ad7-4a6f-9cd7-7ae8f68d867a", + "SubscriptionId": "826c93bf-0407-46d0-86dc-6c41c64c8f0c" } diff --git a/src/StandbyPool/StandbyPool/Az.StandbyPool.psd1 b/src/StandbyPool/StandbyPool/Az.StandbyPool.psd1 index 9defd5e6d7ff..285e632d4eb8 100644 --- a/src/StandbyPool/StandbyPool/Az.StandbyPool.psd1 +++ b/src/StandbyPool/StandbyPool/Az.StandbyPool.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 5/16/2024 +# Generated on: 9/18/2024 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '3.0.0'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '3.0.4'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'StandbyPool.Autorest/bin/Az.StandbyPool.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'StandbyPool.Autorest/Az.StandbyPool.format.ps1xml' @@ -69,8 +69,9 @@ FormatsToProcess = 'StandbyPool.Autorest/Az.StandbyPool.format.ps1xml' NestedModules = @('StandbyPool.Autorest/Az.StandbyPool.psm1') # 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-AzStandbyContainerGroupPool', 'Get-AzStandbyVMPool', - 'Get-AzStandbyVMPoolVM', 'New-AzStandbyContainerGroupPool', +FunctionsToExport = 'Get-AzStandbyContainerGroupPool', + 'Get-AzStandbyContainerGroupPoolStatus', 'Get-AzStandbyVMPool', + 'Get-AzStandbyVMPoolStatus', 'New-AzStandbyContainerGroupPool', 'New-AzStandbyVMPool', 'Remove-AzStandbyContainerGroupPool', 'Remove-AzStandbyVMPool', 'Update-AzStandbyContainerGroupPool', 'Update-AzStandbyVMPool' @@ -99,7 +100,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','StandbyPool' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StandbyPool' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -124,7 +125,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/StandbyPool/StandbyPool/ChangeLog.md b/src/StandbyPool/StandbyPool/ChangeLog.md index 97782dcaa2f1..7e1fd1756ccd 100644 --- a/src/StandbyPool/StandbyPool/ChangeLog.md +++ b/src/StandbyPool/StandbyPool/ChangeLog.md @@ -18,6 +18,13 @@ - Additional information about change #1 --> ## Upcoming Release +* Added new Cmdlets: + - Get-AzStandbyContainerGroupPoolStatus + - Get-AzStandbyVMPoolStatus +* Updated existing Cmdlets + - New-AzStandbyVMPool by add new parameter -MinReadyCapacity to support new added properties in put call. +* Deprecated Cmdlets + - Get-StandbyVMPoolVM ## Version 0.1.1 * Fixed the placeholder in psd1 file. diff --git a/src/StandbyPool/StandbyPool/help/Az.StandbyPool.md b/src/StandbyPool/StandbyPool/help/Az.StandbyPool.md index 7c699ca059a4..0f8dadf2077b 100644 --- a/src/StandbyPool/StandbyPool/help/Az.StandbyPool.md +++ b/src/StandbyPool/StandbyPool/help/Az.StandbyPool.md @@ -14,11 +14,14 @@ Microsoft Azure PowerShell: StandbyPool cmdlets ### [Get-AzStandbyContainerGroupPool](Get-AzStandbyContainerGroupPool.md) Get a StandbyContainerGroupPoolResource +### [Get-AzStandbyContainerGroupPoolStatus](Get-AzStandbyContainerGroupPoolStatus.md) +Get a StandbyContainerGroupPoolRuntimeViewResource + ### [Get-AzStandbyVMPool](Get-AzStandbyVMPool.md) Get a StandbyVirtualMachinePoolResource -### [Get-AzStandbyVMPoolVM](Get-AzStandbyVMPoolVM.md) -Get a StandbyVirtualMachineResource +### [Get-AzStandbyVMPoolStatus](Get-AzStandbyVMPoolStatus.md) +Get a StandbyVirtualMachinePoolRuntimeViewResource ### [New-AzStandbyContainerGroupPool](New-AzStandbyContainerGroupPool.md) Create a StandbyContainerGroupPoolResource diff --git a/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPool.md index 3dfa9be17650..d36d27b93aa4 100644 --- a/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPool.md @@ -15,25 +15,25 @@ Get a StandbyContainerGroupPoolResource ### List (Default) ``` Get-AzStandbyContainerGroupPool [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzStandbyContainerGroupPool -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzStandbyContainerGroupPool -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -41,7 +41,7 @@ Get a StandbyContainerGroupPoolResource ## EXAMPLES -### Example 1: Get a standby container pool +### Example 1: Get a standby container group pool ```powershell Get-AzStandbyContainerGroupPool ` -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` @@ -73,7 +73,7 @@ Tag : { Type : microsoft.standbypool/standbycontainergrouppools ``` -Above command is getting a standby container pool. +Above command is getting a standby container group pool. ## PARAMETERS @@ -123,6 +123,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPoolStatus.md b/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPoolStatus.md new file mode 100644 index 000000000000..24c14534083c --- /dev/null +++ b/src/StandbyPool/StandbyPool/help/Get-AzStandbyContainerGroupPoolStatus.md @@ -0,0 +1,208 @@ +--- +external help file: Az.StandbyPool-help.xml +Module Name: Az.StandbyPool +online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppoolstatus +schema: 2.0.0 +--- + +# Get-AzStandbyContainerGroupPoolStatus + +## SYNOPSIS +Get a StandbyContainerGroupPoolRuntimeViewResource + +## SYNTAX + +### Get (Default) +``` +Get-AzStandbyContainerGroupPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List +``` +Get-AzStandbyContainerGroupPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzStandbyContainerGroupPoolStatus -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityStandbyContainerGroupPool +``` +Get-AzStandbyContainerGroupPoolStatus -StandbyContainerGroupPoolInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a StandbyContainerGroupPoolRuntimeViewResource + +## EXAMPLES + +### Example 1: Get runtime view of a standby container group pool +```powershell +Get-AzStandbyContainerGroupPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-Name testPool ` +-ResourceGroupName test-standbypool +``` + +```output +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyContainerGroupPools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 1 + }, + { + "state": "Running", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews +``` + +Above command is getting a runtime veiw of standby container group pool. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the standby container group pool + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StandbyContainerGroupPoolInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentityStandbyContainerGroupPool +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyContainerGroupPoolRuntimeViewResource + +## NOTES + +## RELATED LINKS diff --git a/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPool.md index eb36a4d2f964..aac838adcae8 100644 --- a/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPool.md @@ -15,25 +15,25 @@ Get a StandbyVirtualMachinePoolResource ### List (Default) ``` Get-AzStandbyVMPool [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### List1 ``` Get-AzStandbyVMPool -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzStandbyVMPool -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -52,6 +52,7 @@ Get-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool @@ -119,6 +120,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolStatus.md b/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolStatus.md new file mode 100644 index 000000000000..de64536e40b8 --- /dev/null +++ b/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolStatus.md @@ -0,0 +1,220 @@ +--- +external help file: Az.StandbyPool-help.xml +Module Name: Az.StandbyPool +online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolstatus +schema: 2.0.0 +--- + +# Get-AzStandbyVMPoolStatus + +## SYNOPSIS +Get a StandbyVirtualMachinePoolRuntimeViewResource + +## SYNTAX + +### Get (Default) +``` +Get-AzStandbyVMPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List +``` +Get-AzStandbyVMPoolStatus -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzStandbyVMPoolStatus -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentityStandbyVirtualMachinePool +``` +Get-AzStandbyVMPoolStatus -StandbyVirtualMachinePoolInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a StandbyVirtualMachinePoolRuntimeViewResource + +## EXAMPLES + +### Example 1: Get runtime view of a standby virtual machine pool +```powershell +Get-AzStandbyVMPoolStatus ` +-SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b ` +-ResourceGroupName test-standbypool ` +-Name testPool +``` + +```output +Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Standb + yPool/standbyVirtualMachinePools/testPool/runtimeViews/latest +InstanceCountSummary : {{ + "instanceCountsByState": [ + { + "state": "Creating", + "count": 0 + }, + { + "state": "Starting", + "count": 0 + }, + { + "state": "Running", + "count": 1 + }, + { + "state": "Deallocating", + "count": 0 + }, + { + "state": "Deallocated", + "count": 0 + }, + { + "state": "Deleting", + "count": 0 + } + ] + }} +Name : latest +ProvisioningState : Succeeded +ResourceGroupName : test-standbypool +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews +``` + +Above command is getting a runtime veiw of standby virtual machine pool. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the standby virtual machine pool + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StandbyVirtualMachinePoolInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity +Parameter Sets: GetViaIdentityStandbyVirtualMachinePool +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachinePoolRuntimeViewResource + +## NOTES + +## RELATED LINKS diff --git a/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolVM.md b/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolVM.md deleted file mode 100644 index 4dce077d4079..000000000000 --- a/src/StandbyPool/StandbyPool/help/Get-AzStandbyVMPoolVM.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -external help file: Az.StandbyPool-help.xml -Module Name: Az.StandbyPool -online version: https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm -schema: 2.0.0 ---- - -# Get-AzStandbyVMPoolVM - -## SYNOPSIS -Get a StandbyVirtualMachineResource - -## SYNTAX - -### List (Default) -``` -Get-AzStandbyVMPoolVM -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -### Get -``` -Get-AzStandbyVMPoolVM -Name -ResourceGroupName [-SubscriptionId ] -VMName - [-DefaultProfile ] [] -``` - -### GetViaIdentityStandbyVirtualMachinePool -``` -Get-AzStandbyVMPoolVM -VMName -StandbyVirtualMachinePoolInputObject - [-DefaultProfile ] [] -``` - -### GetViaIdentity -``` -Get-AzStandbyVMPoolVM -InputObject [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Get a StandbyVirtualMachineResource - -## EXAMPLES - -### Example 1: List virtual machines in standby virtual machine pool -```powershell -Get-AzStandbyVMPoolVM -Name testPool -SubscriptionId f8da6e30-a9d8-48ab-b05c-3f7fe482e13b -ResourceGroupName test-standbypool -``` - -```output -None -``` - -Above command is listing virtual machines in standby virtual machine pool - -## PARAMETERS - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity -Parameter Sets: GetViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -Name of the standby virtual machine pool - -```yaml -Type: System.String -Parameter Sets: List, Get -Aliases: StandbyVirtualMachinePoolName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: List, Get -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StandbyVirtualMachinePoolInputObject -Identity Parameter - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity -Parameter Sets: GetViaIdentityStandbyVirtualMachinePool -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. -The value must be an UUID. - -```yaml -Type: System.String[] -Parameter Sets: List, Get -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -VMName -Name of the standby virtual machine - -```yaml -Type: System.String -Parameter Sets: Get, GetViaIdentityStandbyVirtualMachinePool -Aliases: StandbyVirtualMachineName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyPoolIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.Models.IStandbyVirtualMachineResource - -## NOTES - -## RELATED LINKS diff --git a/src/StandbyPool/StandbyPool/help/New-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool/help/New-AzStandbyContainerGroupPool.md index 75bc29508f34..4f4e998d87e8 100644 --- a/src/StandbyPool/StandbyPool/help/New-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool/help/New-AzStandbyContainerGroupPool.md @@ -17,20 +17,20 @@ Create a StandbyContainerGroupPoolResource New-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] -Location [-ContainerProfileId ] [-MaxReadyCapacity ] [-ProfileRevision ] [-RefillPolicy ] [-SubnetId ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -232,6 +232,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RefillPolicy Specifies refill policy of the pool. diff --git a/src/StandbyPool/StandbyPool/help/New-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool/help/New-AzStandbyVMPool.md index 1e0bb14af4df..efc76d729afe 100644 --- a/src/StandbyPool/StandbyPool/help/New-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool/help/New-AzStandbyVMPool.md @@ -15,22 +15,22 @@ Create a StandbyVirtualMachinePoolResource ### CreateExpanded (Default) ``` New-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] -Location - [-MaxReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-MaxReadyCapacity ] [-MinReadyCapacity ] [-Tag ] [-VMSSId ] + [-VMState ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] -JsonString - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -48,12 +48,14 @@ New-AzStandbyVMPool ` -Location eastus ` -VMSSId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ` -MaxReadyCapacity 1 ` +-MinReadyCapacity 1 ` -VMState Running ``` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 1 +ElasticityProfileMinReadyCapacity : 1 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool @@ -152,7 +154,23 @@ Accept wildcard characters: False ``` ### -MaxReadyCapacity -Specifies maximum number of virtual machines in the standby virtual machine pool. +Specifies the maximum number of virtual machines in the standby virtual machine pool. + +```yaml +Type: System.Int64 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReadyCapacity +Specifies the desired minimum number of virtual machines in the standby virtual machine pool. +MinReadyCapacity cannot exceed MaxReadyCapacity. ```yaml Type: System.Int64 @@ -196,6 +214,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/StandbyPool/StandbyPool/help/Remove-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool/help/Remove-AzStandbyContainerGroupPool.md index 2ff001393991..185c1faeda24 100644 --- a/src/StandbyPool/StandbyPool/help/Remove-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool/help/Remove-AzStandbyContainerGroupPool.md @@ -15,14 +15,14 @@ Delete a StandbyContainerGroupPoolResource ### Delete (Default) ``` Remove-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzStandbyContainerGroupPool -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -140,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/StandbyPool/StandbyPool/help/Remove-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool/help/Remove-AzStandbyVMPool.md index 5d1034753dbe..00c82e761f97 100644 --- a/src/StandbyPool/StandbyPool/help/Remove-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool/help/Remove-AzStandbyVMPool.md @@ -15,14 +15,14 @@ Delete a StandbyVirtualMachinePoolResource ### Delete (Default) ``` Remove-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzStandbyVMPool -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -140,6 +140,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/StandbyPool/StandbyPool/help/Update-AzStandbyContainerGroupPool.md b/src/StandbyPool/StandbyPool/help/Update-AzStandbyContainerGroupPool.md index c6b547c7d8fc..b8355587902b 100644 --- a/src/StandbyPool/StandbyPool/help/Update-AzStandbyContainerGroupPool.md +++ b/src/StandbyPool/StandbyPool/help/Update-AzStandbyContainerGroupPool.md @@ -16,21 +16,21 @@ Update a StandbyContainerGroupPoolResource ``` Update-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] [-ContainerProfileId ] [-MaxReadyCapacity ] [-ProfileRevision ] [-RefillPolicy ] - [-SubnetId ] [-Tag ] [-DefaultProfile ] + [-SubnetId ] [-Tag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Update-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] + -JsonString [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzStandbyContainerGroupPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] + -JsonFilePath [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ Update-AzStandbyContainerGroupPool -Name -ResourceGroupName [- ``` Update-AzStandbyContainerGroupPool -InputObject [-ContainerProfileId ] [-MaxReadyCapacity ] [-ProfileRevision ] [-RefillPolicy ] [-SubnetId ] - [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-Tag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -205,6 +205,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RefillPolicy Specifies refill policy of the pool. diff --git a/src/StandbyPool/StandbyPool/help/Update-AzStandbyVMPool.md b/src/StandbyPool/StandbyPool/help/Update-AzStandbyVMPool.md index 09b151822115..5cb11bfc44a8 100644 --- a/src/StandbyPool/StandbyPool/help/Update-AzStandbyVMPool.md +++ b/src/StandbyPool/StandbyPool/help/Update-AzStandbyVMPool.md @@ -15,29 +15,30 @@ Update a StandbyVirtualMachinePoolResource ### UpdateExpanded (Default) ``` Update-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - [-MaxReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-MaxReadyCapacity ] [-MinReadyCapacity ] [-Tag ] [-VMSSId ] + [-VMState ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaJsonString ``` Update-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] + -JsonString [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzStandbyVMPool -Name -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] + -JsonFilePath [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` -Update-AzStandbyVMPool -InputObject [-MaxReadyCapacity ] [-Tag ] - [-VMSSId ] [-VMState ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] +Update-AzStandbyVMPool -InputObject [-MaxReadyCapacity ] + [-MinReadyCapacity ] [-Tag ] [-VMSSId ] [-VMState ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,6 +58,7 @@ Update-AzStandbyVMPool ` ```output AttachedVirtualMachineScaleSetId : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Compute/virtualMachineScaleSets/test-vmss ElasticityProfileMaxReadyCapacity : 2 +ElasticityProfileMinReadyCapacity : 2 Id : /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/testPool Location : eastus Name : testPool @@ -140,7 +142,23 @@ Accept wildcard characters: False ``` ### -MaxReadyCapacity -Specifies maximum number of virtual machines in the standby virtual machine pool. +Specifies the maximum number of virtual machines in the standby virtual machine pool. + +```yaml +Type: System.Int64 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinReadyCapacity +Specifies the desired minimum number of virtual machines in the standby virtual machine pool. +MinReadyCapacity cannot exceed MaxReadyCapacity. ```yaml Type: System.Int64 @@ -169,6 +187,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/tools/StaticAnalysis/Exceptions/Az.StandByPool/UXMetadataIssues.csv b/tools/StaticAnalysis/Exceptions/Az.StandByPool/UXMetadataIssues.csv new file mode 100644 index 000000000000..26c883bdb234 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.StandByPool/UXMetadataIssues.csv @@ -0,0 +1,3 @@ + "Module","Severity","ResourceType","SubResourceType","Command","Description" + "Az.StandbyPool","1","Microsoft.StandbyPool","standbyContainerGroupPools-runtimeViews","Get-AzStandbyContainerGroupPoolStatus","runtimeView is defined in path but cannot find in example" + "Az.StandbyPool","1","Microsoft.StandbyPool","standbyVirtualMachinePools-runtimeViews","Get-AzStandbyVMPoolStatus","runtimeView is defined in path but cannot find in example" \ No newline at end of file