Skip to content

Commit 3883509

Browse files
iliu816YanaXu
andauthored
[Az.ServiceFabric] Add-AzServiceFabricNodeType: Add -Location parameter (#28238)
Co-authored-by: Yan Xu <[email protected]>
1 parent 633dded commit 3883509

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

src/ServiceFabric/ServiceFabric/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added parameter `Location` to allow users to specify a different node type location than the resource group location in cmdlet `Add-AzServiceFabricNodeType`.
2122
* Added parameter `VmSize` to allow for in-place sku swap for cmdlet `Set-AzServiceFabricManagedNodeType`.
2223
* Updated SFMC to latest api preview version `2025-03-01-preview`
2324

src/ServiceFabric/ServiceFabric/Commands/AddAzureRmServiceFabricNodeType.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ public string Tier
133133
[ValidateNotNullOrEmpty()]
134134
public string VMImageVersion { get; set; }
135135

136+
[Parameter(Mandatory = false, ValueFromPipeline = false, HelpMessage = "The location of the node type and its associated storage, networking, and OS resources. If not specified, the location of the resource group will be used.")]
137+
public string Location { get; set; }
138+
136139
public override void ExecuteCmdlet()
137140
{
138141
if (this.DurabilityLevel == DurabilityLevel.Gold && !skusSupportGoldDurability.Contains(this.VmSku))
@@ -235,6 +238,10 @@ private void CreateVmss(string clusterId)
235238

236239
private string GetLocation()
237240
{
241+
if (!string.IsNullOrEmpty(this.Location))
242+
{
243+
return this.Location;
244+
}
238245
return GetCurrentCluster().Location;
239246
}
240247

src/ServiceFabric/ServiceFabric/help/Add-AzServiceFabricNodeType.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Add a new node type to the existing cluster.
1616
Add-AzServiceFabricNodeType [-ResourceGroupName] <String> [-Name] <String> -Capacity <Int32>
1717
-VmUserName <String> -VmPassword <SecureString> [-VmSku <String>] [-Tier <String>]
1818
[-DurabilityLevel <DurabilityLevel>] [-IsPrimaryNodeType <Boolean>] [-VMImagePublisher <String>]
19-
[-VMImageOffer <String>] [-VMImageSku <String>] [-VMImageVersion <String>] -NodeType <String>
20-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
19+
[-VMImageOffer <String>] [-VMImageSku <String>] [-VMImageVersion <String>] [-Location <String>]
20+
-NodeType <String> [-DefaultProfile <IAzureContextContainer>] [-ProgressAction <ActionPreference>] [-WhatIf]
21+
[-Confirm] [<CommonParameters>]
2122
```
2223

2324
## DESCRIPTION
@@ -113,6 +114,21 @@ Accept pipeline input: True (ByValue)
113114
Accept wildcard characters: False
114115
```
115116
117+
### -Location
118+
The location of the VMSS and its associated storage, networking, and OS resources. If not specified, the location of the resource group will be used.
119+
120+
```yaml
121+
Type: System.String
122+
Parameter Sets: (All)
123+
Aliases:
124+
125+
Required: False
126+
Position: Named
127+
Default value: None
128+
Accept pipeline input: False
129+
Accept wildcard characters: False
130+
```
131+
116132
### -Name
117133
Specify the name of the cluster
118134
@@ -143,6 +159,21 @@ Accept pipeline input: True (ByValue)
143159
Accept wildcard characters: False
144160
```
145161
162+
### -ProgressAction
163+
{{ Fill ProgressAction Description }}
164+
165+
```yaml
166+
Type: System.Management.Automation.ActionPreference
167+
Parameter Sets: (All)
168+
Aliases: proga
169+
170+
Required: False
171+
Position: Named
172+
Default value: None
173+
Accept pipeline input: False
174+
Accept wildcard characters: False
175+
```
176+
146177
### -ResourceGroupName
147178
Specify the name of the resource group.
148179

0 commit comments

Comments
 (0)