Skip to content

StandbyPool 2025-03-01 SDK release #27616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/StandbyPool/StandbyPool.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - StandbyPool")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.2.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
4 changes: 2 additions & 2 deletions src/StandbyPool/StandbyPool.Autorest/README.md
Original file line number Diff line number Diff line change
@@ -28,8 +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: 1866fc3609f55fad6a5e74a9b206ae4ca144c03a
tag: package-2024-03
commit: 88735540206d3393d194f4e1cc1aa2daac65af8a
# tag: package-2024-03
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "standbyContainerGroupPools/runtimeViews",
"apiVersion": "2024-03-01",
"apiVersion": "2025-03-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
},
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "standbyContainerGroupPools",
"apiVersion": "2024-03-01",
"apiVersion": "2025-03-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
},
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "standbyVirtualMachinePools/runtimeViews",
"apiVersion": "2024-03-01",
"apiVersion": "2025-03-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
},
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "standbyVirtualMachinePools",
"apiVersion": "2024-03-01",
"apiVersion": "2025-03-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
},
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.StandbyPool.private.dll')
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.StandbyPool.private.dll')

# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.StandbyPool.internal.psm1'
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.StandbyPool.internal.psm1'
if(Test-Path $internalModulePath) {
$null = Import-Module -Name $internalModulePath
}
8 changes: 4 additions & 4 deletions src/StandbyPool/StandbyPool.Autorest/custom/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Custom
This directory contains custom implementation for non-generated cmdlets for the `Az.StandbyPool` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.StandbyPool.custom.psm1`. This file should not be modified.
This directory contains custom implementation for non-generated cmdlets for the `Az.StandbyPool` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.StandbyPool.custom.psm1`. This file should not be modified.

## Info
- Modifiable: yes
@@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
For script cmdlets, these are loaded via the `Az.StandbyPool.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.

## Purpose
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.

## Usage
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
- Break
- DefaultProfile
- HttpPipelineAppend
@@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
- `Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.DoNotExportAttribute`
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.StandbyPool`.
- `Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.InternalExportAttribute`
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.StandbyPool`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.StandbyPool`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
- `Microsoft.Azure.PowerShell.Cmdlets.StandbyPool.ProfileAttribute`
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
10 changes: 5 additions & 5 deletions src/StandbyPool/StandbyPool.Autorest/docs/Az.StandbyPool.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.StandbyPool
Module Guid: bb1182ed-2a39-47be-8b39-46b13e973cea
Module Guid: 906124f0-0d0b-43ea-a3f8-27a8a5ed0afa
Download Help Link: https://learn.microsoft.com/powershell/module/az.standbypool
Help Version: 1.0.0.0
Locale: en-US
@@ -24,10 +24,10 @@ Get a StandbyVirtualMachinePoolResource
Get a StandbyVirtualMachinePoolRuntimeViewResource

### [New-AzStandbyContainerGroupPool](New-AzStandbyContainerGroupPool.md)
Create a StandbyContainerGroupPoolResource
create a StandbyContainerGroupPoolResource

### [New-AzStandbyVMPool](New-AzStandbyVMPool.md)
Create a StandbyVirtualMachinePoolResource
create a StandbyVirtualMachinePoolResource

### [Remove-AzStandbyContainerGroupPool](Remove-AzStandbyContainerGroupPool.md)
Delete a StandbyContainerGroupPoolResource
@@ -36,8 +36,8 @@ Delete a StandbyContainerGroupPoolResource
Delete a StandbyVirtualMachinePoolResource

### [Update-AzStandbyContainerGroupPool](Update-AzStandbyContainerGroupPool.md)
Update a StandbyContainerGroupPoolResource
update a StandbyContainerGroupPoolResource

### [Update-AzStandbyVMPool](Update-AzStandbyVMPool.md)
Update a StandbyVirtualMachinePoolResource
update a StandbyVirtualMachinePoolResource

Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ SystemDataLastModifiedByType : User
Tag : {
}
Type : microsoft.standbypool/standbycontainergrouppools
Zone : {1}
```

Above command is getting a standby container group pool.
Original file line number Diff line number Diff line change
@@ -50,27 +50,33 @@ Get-AzStandbyContainerGroupPoolStatus `
```

```output
ForecastValueInstancesRequestedCount :
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
}
]
}}
"zone": 1,
"instanceCountsByState": [
{
"state": "Running",
"count": 0
},
{
"state": "Deleting",
"count": 1
},
{
"state": "Creating",
"count": 0
}
]
}}
Name : latest
PredictionForecastInfo :
PredictionForecastStartTime :
ProvisioningState : Succeeded
ResourceGroupName : test-standbypool
StatusCode : HealthState/degraded
StatusMessage :
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
Original file line number Diff line number Diff line change
@@ -50,39 +50,52 @@ Get-AzStandbyVMPoolStatus `
```

```output
ForecastValueInstancesRequestedCount :
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
}
]
}}
"instanceCountsByState": [
{
"state": "Creating",
"count": 0
},
{
"state": "Starting",
"count": 0
},
{
"state": "Running",
"count": 2
},
{
"state": "Deallocating",
"count": 0
},
{
"state": "Deallocated",
"count": 0
},
{
"state": "Hibernating",
"count": 0
},
{
"state": "Hibernated",
"count": 0
},
{
"state": "Deleting",
"count": 0
}
]
}}
Name : latest
PredictionForecastInfo :
PredictionForecastStartTime :
ProvisioningState : Succeeded
ResourceGroupName : test-standbypool
StatusCode : HealthState/healthy
StatusMessage :
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzStandbyContainerGroupPool

## SYNOPSIS
Create a StandbyContainerGroupPoolResource
create a StandbyContainerGroupPoolResource

## SYNTAX

@@ -17,7 +17,7 @@ Create a StandbyContainerGroupPoolResource
New-AzStandbyContainerGroupPool -Name <String> -ResourceGroupName <String> -Location <String>
[-SubscriptionId <String>] [-ContainerProfileId <String>] [-MaxReadyCapacity <Int64>]
[-ProfileRevision <Int64>] [-RefillPolicy <String>] [-SubnetId <ISubnet[]>] [-Tag <Hashtable>]
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
[-Zone <String[]>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### CreateViaJsonFilePath
@@ -35,7 +35,7 @@ New-AzStandbyContainerGroupPool -Name <String> -ResourceGroupName <String> -Json
```

## DESCRIPTION
Create a StandbyContainerGroupPoolResource
create a StandbyContainerGroupPoolResource

## EXAMPLES

@@ -51,6 +51,7 @@ New-AzStandbyContainerGroupPool `
-ContainerProfileId /subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourcegroups/test-standbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/testCG `
-ProfileRevision 1 `
-SubnetId @{id="/subscriptions/f8da6e30-a9d8-48ab-b05c-3f7fe482e13b/resourceGroups/test-standbypool/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"} `
-Zone @("1", "2", "3") `
```

```output
@@ -75,6 +76,7 @@ SystemDataLastModifiedByType : User
Tag : {
}
Type : microsoft.standbypool/standbycontainergrouppools
Zone : {1, 2, 3}
```

The above command created a standby container pool.
@@ -309,6 +311,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Zone
Specifies zones of standby container group pools.

```yaml
Type: System.String[]
Parameter Sets: CreateExpanded
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
# New-AzStandbyVMPool

## SYNOPSIS
Create a StandbyVirtualMachinePoolResource
create a StandbyVirtualMachinePoolResource

## SYNTAX

@@ -33,7 +33,7 @@ New-AzStandbyVMPool -Name <String> -ResourceGroupName <String> -JsonString <Stri
```

## DESCRIPTION
Create a StandbyVirtualMachinePoolResource
create a StandbyVirtualMachinePoolResource

## EXAMPLES

4 changes: 2 additions & 2 deletions src/StandbyPool/StandbyPool.Autorest/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Docs
This directory contains the documentation of the cmdlets for the `Az.StandbyPool` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder.
This directory contains the documentation of the cmdlets for the `Az.StandbyPool` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder.

## Info
- Modifiable: no
@@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.StandbyPool
- Packaged: yes

## Details
The process of documentation generation loads `Az.StandbyPool` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder.
The process of documentation generation loads `Az.StandbyPool` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder.
Loading