Skip to content

Commit fbe3792

Browse files
authored
Feature standbypool powershell init (#24604)
* new standby pool cmdlets. * change cmdlets and fix ci issue. * fix ci. * documentation.
1 parent efdfd0f commit fbe3792

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3988
-0
lines changed

documentation/azure-powershell-modules.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Service Bus | `Az.ServiceBus`
6363
Service Fabric | `Az.ServiceFabric` | [![ServiceFabric]][ServiceFabricGallery]
6464
SignalR | `Az.SignalR` | [![SignalR]][SignalRGallery]
6565
SQL | `Az.Sql` | [![Sql]][SqlGallery]
66+
Standby Pool | `Az.StandbyPool` | [![StandbyPool]][StandbyPoolGallery]
6667
Storage | `Az.Storage` | [![Storage]][StorageGallery]
6768
File Sync | `Az.StorageSync` | [![StorageSync]][StorageSyncGallery]
6869
Stream Analytics | `Az.StreamAnalytics` | [![StreamAnalytics]][StreamAnalyticsGallery]
@@ -127,6 +128,7 @@ Web App Service | `Az.Websites`
127128
[ServiceFabric]: https://img.shields.io/powershellgallery/v/Az.ServiceFabric.svg?style=flat-square&label=Az.ServiceFabric
128129
[SignalR]: https://img.shields.io/powershellgallery/v/Az.SignalR.svg?style=flat-square&label=Az.SignalR
129130
[Sql]: https://img.shields.io/powershellgallery/v/Az.Sql.svg?style=flat-square&label=Az.Sql
131+
[StandbyPool]: https://img.shields.io/powershellgallery/v/Az.StandbyPool.svg?style=flat-square&label=Az.StandbyPool
130132
[Storage]: https://img.shields.io/powershellgallery/v/Az.Storage.svg?style=flat-square&label=Az.Storage
131133
[StorageSync]: https://img.shields.io/powershellgallery/v/Az.StorageSync.svg?style=flat-square&label=Az.StorageSync
132134
[StreamAnalytics]: https://img.shields.io/powershellgallery/v/Az.StreamAnalytics.svg?style=flat-square&label=Az.StreamAnalytics
@@ -189,6 +191,7 @@ Web App Service | `Az.Websites`
189191
[ServiceFabricGallery]: https://www.powershellgallery.com/packages/Az.ServiceFabric/
190192
[SignalRGallery]: https://www.powershellgallery.com/packages/Az.SignalR/
191193
[SqlGallery]: https://www.powershellgallery.com/packages/Az.Sql/
194+
[StandbyPoolGallery]: https://www.powershellgallery.com/packages/Az.StandbyPool/
192195
[StorageGallery]: https://www.powershellgallery.com/packages/Az.Storage/
193196
[StorageSyncGallery]: https://www.powershellgallery.com/packages/Az.StorageSync/
194197
[StreamAnalyticsGallery]: https://www.powershellgallery.com/packages/Az.StreamAnalytics/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bin
2+
obj
3+
.vs
4+
generated
5+
internal
6+
exports
7+
tools
8+
custom/*.psm1
9+
custom/autogen-model-cmdlets
10+
test/*-TestResults.xml
11+
/*.ps1
12+
/*.ps1xml
13+
/*.psm1
14+
/*.snk
15+
/*.csproj
16+
/*.nuspec
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@{
2+
GUID = 'bb1182ed-2a39-47be-8b39-46b13e973cea'
3+
RootModule = './Az.StandbyPool.psm1'
4+
ModuleVersion = '0.1.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: StandbyPool cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.StandbyPool.private.dll'
13+
FormatsToProcess = './Az.StandbyPool.format.ps1xml'
14+
FunctionsToExport = 'Get-AzStandbyContainerGroupPool', 'Get-AzStandbyVMPool', 'Get-AzStandbyVMPoolVM', 'New-AzStandbyContainerGroupPool', 'New-AzStandbyVMPool', 'Remove-AzStandbyContainerGroupPool', 'Remove-AzStandbyVMPool', 'Update-AzStandbyContainerGroupPool', 'Update-AzStandbyVMPool'
15+
PrivateData = @{
16+
PSData = @{
17+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StandbyPool'
18+
LicenseUri = 'https://aka.ms/azps-license'
19+
ProjectUri = 'https://github.com/Azure/azure-powershell'
20+
ReleaseNotes = ''
21+
}
22+
}
23+
}
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<!-- region Generated -->
2+
# Az.StandbyPool
3+
This directory contains the PowerShell module for the StandbyPool service.
4+
5+
---
6+
## Info
7+
- Modifiable: yes
8+
- Generated: all
9+
- Committed: yes
10+
- Packaged: yes
11+
12+
---
13+
## Detail
14+
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
15+
16+
## Module Requirements
17+
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
18+
19+
## Authentication
20+
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
21+
22+
## Development
23+
For information on how to develop for `Az.StandbyPool`, see [how-to.md](how-to.md).
24+
<!-- endregion -->
25+
26+
### AutoRest Configuration
27+
> see https://aka.ms/autorest
28+
29+
```yaml
30+
# pin the swagger version by using the commit id instead of branch name
31+
commit: 5cbd7c23897da22f52da4f02534b2819abe9f761
32+
require:
33+
# readme.azure.noprofile.md is the common configuration file
34+
- $(this-folder)/../../readme.azure.noprofile.md
35+
- $(repo)/specification/standbypool/resource-manager/readme.md
36+
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
37+
# - (this-folder)/relative-path-to-your-local-readme.md
38+
39+
try-require:
40+
- $(repo)/specification/standbypool/resource-manager/readme.powershell.md
41+
42+
# For new RP, the version is 0.1.0
43+
module-version: 0.1.0
44+
# Normally, title is the service name
45+
title: StandbyPool
46+
subject-prefix: Standby
47+
48+
directive:
49+
# Following are common directives which are normally required in all the RPs
50+
# 1. Remove the unexpanded parameter set
51+
# 2. For New-* cmdlets, ViaIdentity is not required
52+
# Following two directives are v4 specific
53+
- where:
54+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
55+
remove: true
56+
- where:
57+
variant: ^CreateViaIdentity.*$
58+
remove: true
59+
60+
# Rename StandbyVirtualMachinePool to StandbyVMPool
61+
- where:
62+
verb: Get|New|Update|Remove
63+
subject: StandbyVirtualMachinePool
64+
set:
65+
subject: StandbyVMPool
66+
67+
# Rename StandbyVirtualMachine to StandbyVM
68+
- where:
69+
verb: Get
70+
subject: StandbyVirtualMachine
71+
set:
72+
subject: StandbyVMPoolVM
73+
74+
# Rename standby container group pool parameters
75+
- where:
76+
verb: New|Update
77+
subject: StandbyContainerGroupPool
78+
parameter-name: ContainerGroupProfileId
79+
set:
80+
parameter-name: ContainerProfileId
81+
82+
- where:
83+
verb: New|Update
84+
subject: StandbyContainerGroupPool
85+
parameter-name: ContainerGroupProfileRevision
86+
set:
87+
parameter-name: ProfileRevision
88+
89+
- where:
90+
verb: New|Update
91+
subject: StandbyContainerGroupPool
92+
parameter-name: ElasticityProfileMaxReadyCapacity
93+
set:
94+
parameter-name: MaxReadyCapacity
95+
96+
- where:
97+
verb: New|Update
98+
subject: StandbyContainerGroupPool
99+
parameter-name: ElasticityProfileRefillPolicy
100+
set:
101+
parameter-name: RefillPolicy
102+
103+
- where:
104+
verb: New|Update
105+
subject: StandbyContainerGroupPool
106+
parameter-name: ContainerGroupPropertySubnetId
107+
set:
108+
parameter-name: SubnetId
109+
110+
# Rename standby virtual machine pool parameters
111+
- where:
112+
verb: New|Update
113+
subject: StandbyVMPool
114+
parameter-name: AttachedVirtualMachineScaleSetId
115+
set:
116+
parameter-name: VMSSId
117+
118+
- where:
119+
verb: New|Update
120+
subject: StandbyVMPool
121+
parameter-name: ElasticityProfileMaxReadyCapacity
122+
set:
123+
parameter-name: MaxReadyCapacity
124+
125+
- where:
126+
verb: New|Update
127+
subject: StandbyVMPool
128+
parameter-name: VirtualMachineState
129+
set:
130+
parameter-name: VMState
131+
132+
# Rename standby virtual machine parameters
133+
- where:
134+
verb: Get
135+
subject: StandbyVMPoolVM
136+
parameter-name: Name
137+
set:
138+
parameter-name: VMName
139+
140+
- where:
141+
verb: Get
142+
subject: StandbyVMPoolVM
143+
parameter-name: PoolName
144+
set:
145+
parameter-name: Name
146+
147+
# Remove the set-* cmdlet
148+
- where:
149+
verb: Set
150+
remove: true
151+
```
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"resourceType": "standbyContainerGroupPools",
3+
"apiVersion": "2023-12-01-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzStandbyContainerGroupPool",
10+
"description": "Get a StandbyContainerGroupPoolResource",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbycontainergrouppool"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-Name <String>",
20+
"-ResourceGroupName <String>",
21+
"[-SubscriptionId <String[]>]"
22+
]
23+
}
24+
]
25+
},
26+
"examples": [
27+
{
28+
"description": "Get a StandbyContainerGroupPoolResource",
29+
"parameters": [
30+
{
31+
"name": "-Name",
32+
"value": "[Path.standbyContainerGroupPoolName]"
33+
},
34+
{
35+
"name": "-ResourceGroupName",
36+
"value": "[Path.resourceGroupName]"
37+
},
38+
{
39+
"name": "-SubscriptionId",
40+
"value": "[Path.subscriptionId]"
41+
}
42+
]
43+
}
44+
]
45+
},
46+
{
47+
"name": "Remove-AzStandbyContainerGroupPool",
48+
"description": "Delete a StandbyContainerGroupPoolResource",
49+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}",
50+
"help": {
51+
"learnMore": {
52+
"url": "https://learn.microsoft.com/powershell/module/az.standbypool/remove-azstandbycontainergrouppool"
53+
},
54+
"parameterSets": [
55+
{
56+
"parameters": [
57+
"-Name <String>",
58+
"-ResourceGroupName <String>",
59+
"[-SubscriptionId <String>]"
60+
]
61+
}
62+
]
63+
},
64+
"examples": [
65+
{
66+
"description": "Delete a StandbyContainerGroupPoolResource",
67+
"parameters": [
68+
{
69+
"name": "-Name",
70+
"value": "[Path.standbyContainerGroupPoolName]"
71+
},
72+
{
73+
"name": "-ResourceGroupName",
74+
"value": "[Path.resourceGroupName]"
75+
},
76+
{
77+
"name": "-SubscriptionId",
78+
"value": "[Path.subscriptionId]"
79+
}
80+
]
81+
}
82+
]
83+
}
84+
]
85+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"resourceType": "standbyVirtualMachinePools/standbyVirtualMachines",
3+
"apiVersion": "2023-12-01-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.standbypool"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzStandbyVMPoolVM",
10+
"description": "Get a StandbyVirtualMachineResource",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.standbypool/get-azstandbyvmpoolvm"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-Name <String>",
20+
"-ResourceGroupName <String>",
21+
"[-SubscriptionId <String[]>]",
22+
"-VMName <String>"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "Get a StandbyVirtualMachineResource",
30+
"parameters": [
31+
{
32+
"name": "-Name",
33+
"value": "[Path.standbyVirtualMachinePoolName]"
34+
},
35+
{
36+
"name": "-ResourceGroupName",
37+
"value": "[Path.resourceGroupName]"
38+
},
39+
{
40+
"name": "-SubscriptionId",
41+
"value": "[Path.subscriptionId]"
42+
},
43+
{
44+
"name": "-VMName",
45+
"value": "[Path.standbyVirtualMachineName]"
46+
}
47+
]
48+
}
49+
]
50+
}
51+
]
52+
}

0 commit comments

Comments
 (0)