Skip to content
Open
Show file tree
Hide file tree
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
44 changes: 33 additions & 11 deletions src/StackHCI/StackHCI.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ subject-prefix: $(service-name)

inlining-threshold: 50

resourcegroup-append: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
# Rename function
- where:
Expand All @@ -80,14 +74,24 @@ directive:
set:
subject: ConsentAndInstallDefaultExtension
# Remove the unexpanded parameter set
# Generate Create variant for "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity"
- where:
subject: ArcSetting$|Cluster|DeploymentSetting|EdgeDevice|Extension|SecuritySetting|Update$|UpdateRun|UpdateSummary
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
remove: true
- where:
Comment on lines 76 to 82
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "Generate Create variant" but the directive is removing variants (remove: true). Please adjust the comment to accurately describe why these variants are being removed/kept (Expanded/Json*), so future maintainers understand the intent.

Copilot uses AI. Check for mistakes.
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
subject: ExtendClusterSoftwareAssuranceBenefit
variant: ^(Extend)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
Comment on lines 76 to +85
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment above this directive says it “Generate[s] Create variant for … createArcIdentity”, but the directive itself is removing variants for many subjects. Consider updating the comment(s) to accurately describe what’s being removed/kept (and why), so future maintainers don’t misinterpret the intent of this regex.

Copilot uses AI. Check for mistakes.
- where:
subject: EdgeDevice
variant: ^(Validate)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
verb: Set
subject: Workspace
remove: true
# Remove Update-AzStackHciExtension
# Remove Update-AzStackHciExtension
- where:
verb: Update
subject: Extension
Expand All @@ -112,11 +116,11 @@ directive:
verb: New
subject: ArcSettingPassword
remove: true
# Remove Update-AzStackHciArcSetting
# Remove Update (Get-Put) commands and use set cmdlets.
- where:
verb: Update
subject: ArcSetting
remove: true
subject: ArcSetting|DeploymentSetting|EdgeDevice|SecuritySetting|Update$|UpdateRun|UpdateSummary
remove: true
# Hide aadClientId from Update-AzStackHCICluster
- where:
verb: Update
Expand Down Expand Up @@ -208,6 +212,24 @@ directive:
- ResourceGroupName
labels:
ResourceGroupName: Resource Group
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"');
Comment on lines 214 to +229
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The source-file-csharp transform directives were added without any explanatory comments. In this repo’s AutoRest README.md files, each directive/transform should be annotated with a short “why” so future maintainers know what strings are being corrected and under what conditions it’s safe to change/remove them.

Suggested change
ResourceGroupName: Resource Group
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"');
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"');
ResourceGroupName: Resource Group
# Correct a duplicated verb in the generated operation description for update runs.
# Safe to remove when the upstream spec or generator no longer emits "Get the get run for a specified update".
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get the get run for a specified update"/g, '"Get the Update run for a specified update"');
# Correct a duplicated verb in the generated operation description for update summaries.
# Safe to remove when the upstream spec or generator no longer emits "Get all get summaries under the HCI cluster".
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Get all get summaries under the HCI cluster"/g, '"Get all Update summaries under the HCI cluster"');
# Correct a duplicated verb in the generated delete description for update runs.
# Safe to remove when the upstream spec or generator no longer emits "Delete specified delete Run".
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete specified delete Run"/g, '"Delete specified Update Run"');
# Correct a duplicated verb in the generated delete description for update summaries.
# Safe to remove when the upstream spec or generator no longer emits "Delete delete Summaries".
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Delete delete Summaries"/g, '"Delete Update Summaries"');
# Correct a duplicated verb in the generated create/update description for update runs.
# Safe to remove when the upstream spec or generator no longer emits "Put put runs for a specified update".
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Put put runs for a specified update"/g, '"Put Update runs for a specified update"');
# Correct a duplicated verb in the generated create/update description for update summaries.
# Safe to remove when the upstream spec or generator no longer emits "Put put summaries under the HCI cluster".

Copilot uses AI. Check for mistakes.
- from: source-file-csharp
where: $
transform: $ = $.replace(/"Put put summaries under the HCI cluster"/g, '"Put Update summaries under the HCI cluster"');
- where:
verb: Get|New
subject: ArcSetting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,44 +81,6 @@
}
]
},
{
"name": "Invoke-AzStackHciExtendClusterSoftwareAssuranceBenefit",
"description": "Extends Software Assurance Benefit to a cluster",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/extendSoftwareAssuranceBenefit",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhci/invoke-azstackhciextendclustersoftwareassurancebenefit"
},
"parameterSets": [
{
"parameters": [
"-ClusterName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Extends Software Assurance Benefit to a cluster",
"parameters": [
{
"name": "-ClusterName",
"value": "[Path.clusterName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzStackHciCluster",
"description": "Delete an HCI cluster.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,39 +70,6 @@
]
}
]
},
{
"name": "Test-AzStackHciEdgeDevice",
"description": "A long-running resource action.",
"path": "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/validate",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhci/test-azstackhciedgedevice"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceUri <String>"
]
}
]
},
"examples": [
{
"description": "A long-running resource action.",
"parameters": [
{
"name": "-Name",
"value": "[Path.edgeDeviceName]"
},
{
"name": "-ResourceUri",
"value": "[Path.resourceUri]"
}
]
}
]
}
]
}
11 changes: 7 additions & 4 deletions src/StackHCI/StackHCI.Autorest/docs/Az.StackHCI.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.StackHCI
Module Guid: ed069c15-afdb-4020-9677-d3db308109f7
Module Guid: a5fe8ba1-f96d-48b0-b683-2c52599b2b00
Download Help Link: https://learn.microsoft.com/powershell/module/az.stackhci
Help Version: 1.0.0.0
Locale: en-US
Expand Down Expand Up @@ -80,6 +80,9 @@ Apply Update
### [New-AzStackHciArcSetting](New-AzStackHciArcSetting.md)
Create ArcSetting for HCI cluster.

### [New-AzStackHciArcSettingIdentity](New-AzStackHciArcSettingIdentity.md)
Create Aad identity for arc settings.

### [New-AzStackHciCluster](New-AzStackHciCluster.md)
Create an HCI cluster.

Expand Down Expand Up @@ -135,13 +138,13 @@ Remove-AzStackHCIVMAttestation removes guests from AzureStack HCI IMDS Attestati
Set-AzStackHCI modifies resource properties of the Microsoft.AzureStackHCI cloud resource representing the on-premises cluster to enable or disable features.

### [Set-AzStackHciDeploymentSetting](Set-AzStackHciDeploymentSetting.md)
Create a DeploymentSetting
Update a DeploymentSetting

### [Set-AzStackHciEdgeDevice](Set-AzStackHciEdgeDevice.md)
Create a EdgeDevice
Update a EdgeDevice
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: this entry inherits the “Update a EdgeDevice” phrasing from the cmdlet help. Consider updating it to “Update an edge device” (or similar) for correct English.

Suggested change
Update a EdgeDevice
Update an edge device

Copilot uses AI. Check for mistakes.

### [Set-AzStackHciSecuritySetting](Set-AzStackHciSecuritySetting.md)
Create a security setting
Update a security setting

### [Set-AzStackHciUpdate](Set-AzStackHciUpdate.md)
Put specified Update
Expand Down
26 changes: 23 additions & 3 deletions src/StackHCI/StackHCI.Autorest/docs/Get-AzStackHciArcSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Get-AzStackHciArcSetting -ClusterName <String> -Name <String> -ResourceGroupName
Get-AzStackHciArcSetting -InputObject <IStackHciIdentity> [-DefaultProfile <PSObject>] [<CommonParameters>]
```

### GetViaIdentityCluster
```
Get-AzStackHciArcSetting -ClusterInputObject <IStackHciIdentity> -Name <String> [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

## DESCRIPTION
Get ArcSetting resource details of HCI Cluster.

Expand All @@ -50,6 +56,21 @@ To see the details use : "Write-Host( $arcSettings | Format-List | Out-String)"

## PARAMETERS

### -ClusterInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Parameter Sets: GetViaIdentityCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -ClusterName
The name of the cluster.

Expand Down Expand Up @@ -83,7 +104,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Expand All @@ -102,7 +122,7 @@ The name of the proxy resource holding details of HCI ArcSetting information.

```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityCluster
Aliases: ArcSettingName

Required: True
Expand Down Expand Up @@ -153,7 +173,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.Api20240401.IArcSetting
### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IArcSetting

## NOTES

Expand Down
3 changes: 1 addition & 2 deletions src/StackHCI/StackHCI.Autorest/docs/Get-AzStackHciCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Expand Down Expand Up @@ -158,7 +157,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.Api20240401.ICluster
### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.ICluster

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Get-AzStackHciDeploymentSetting -InputObject <IStackHciIdentity> [-DefaultProfil
[<CommonParameters>]
```

### GetViaIdentityCluster
```
Get-AzStackHciDeploymentSetting -ClusterInputObject <IStackHciIdentity> -SName <String>
[-DefaultProfile <PSObject>] [<CommonParameters>]
```

## DESCRIPTION
Get a DeploymentSetting

Expand All @@ -50,6 +56,21 @@ Gets the deployment setting in the cluster

## PARAMETERS

### -ClusterInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Parameter Sets: GetViaIdentityCluster
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -ClusterName
The name of the cluster.

Expand Down Expand Up @@ -83,7 +104,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Expand Down Expand Up @@ -118,7 +138,7 @@ Name of Deployment Setting

```yaml
Type: System.String
Parameter Sets: Get
Parameter Sets: Get, GetViaIdentityCluster
Aliases: DeploymentSettingsName

Required: True
Expand Down Expand Up @@ -153,7 +173,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.Api20240401.IDeploymentSetting
### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IDeploymentSetting

## NOTES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Accept wildcard characters: False

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IStackHciIdentity
Expand Down Expand Up @@ -119,7 +118,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.Api20240401.IEdgeDevice
### Microsoft.Azure.PowerShell.Cmdlets.StackHCI.Models.IEdgeDevice

## NOTES

Expand Down
Loading