Skip to content

Az.CloudService update generation tool version: autorest.powershell v3->v4#28572

Open
lijinpei2008 wants to merge 18 commits intomainfrom
jinpei/main/CloudService-updatev4
Open

Az.CloudService update generation tool version: autorest.powershell v3->v4#28572
lijinpei2008 wants to merge 18 commits intomainfrom
jinpei/main/CloudService-updatev4

Conversation

@lijinpei2008
Copy link
Copy Markdown
Contributor

@lijinpei2008 lijinpei2008 commented Sep 17, 2025

Description

Preannouncement PR:

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@github-actions
Copy link
Copy Markdown

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

@lijinpei2008 lijinpei2008 marked this pull request as ready for review October 15, 2025 03:21
Copilot AI review requested due to automatic review settings October 15, 2025 03:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Az.CloudService module from AutoRest PowerShell v3 to v4, involving a complete regeneration of the code structure and significant changes to model types, cmdlet APIs, and documentation.

Key Changes:

  • Migration from AutoRest.PowerShell v3 to v4 generation tool
  • Type system changes from API-specific models to generic models (e.g., Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.* to Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.*)
  • Addition of new cmdlet parameter sets and JSON-based input options

Reviewed Changes

Copilot reviewed 87 out of 87 changed files in this pull request and generated 2 comments.

File Description
tools/StaticAnalysis/Exceptions/ Static analysis exception files with duplicate entries for example and breaking change issues
src/CloudService/CloudService/help/ Updated help documentation with corrected descriptions, parameter types, and new parameter sets
src/CloudService/CloudService.sln Updated project GUID reference
src/CloudService/CloudService.Autorest/ Complete regeneration with v4 tool including new autogen model cmdlets, updated custom files, and revised configuration

Comment on lines +6 to +9
"Az.CloudService","New-AzCloudService","3","6","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudService","3","7","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName ContosKeyVault -Name ContosCert","Check the spell of Get-AzKeyVaultCertificate."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","1","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -VaultName 'ContosoKeyVault'","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","2","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName 'ContosoKeyVault' -Name 'ContosoCert'","Check the spell of Get-AzKeyVaultCertificate."
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

This file contains duplicate entries (lines 2-5 and 6-9 are identical). Remove the duplicate entries to avoid confusion and maintain a cleaner exception file.

Suggested change
"Az.CloudService","New-AzCloudService","3","6","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudService","3","7","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName ContosKeyVault -Name ContosCert","Check the spell of Get-AzKeyVaultCertificate."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","1","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -VaultName 'ContosoKeyVault'","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","2","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName 'ContosoKeyVault' -Name 'ContosoCert'","Check the spell of Get-AzKeyVaultCertificate."

Copilot uses AI. Check for mistakes.
Comment on lines +118 to +120
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'Zone' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Zone' back to 'System.String[]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'UpgradeMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]' to 'System.String'.","Change the type of property 'UpgradeMode' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3010","The property 'ResourceGroupName' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has been removed.","Add the property 'ResourceGroupName' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService'."
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Lines 119-121 are exact duplicates of lines 116-118. Remove the duplicate entries to maintain file integrity and prevent confusion.

Suggested change
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'Zone' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Zone' back to 'System.String[]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'UpgradeMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]' to 'System.String'.","Change the type of property 'UpgradeMode' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3010","The property 'ResourceGroupName' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has been removed.","Add the property 'ResourceGroupName' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService'."

Copilot uses AI. Check for mistakes.
@isra-fel isra-fel added the autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 label Oct 20, 2025
Comment thread src/CloudService/CloudService.Autorest/docs/Invoke-AzCloudServiceRebuild.md Outdated
@VeryEarly
Copy link
Copy Markdown
Collaborator

-Roleinstance should not be optional in general because it's path parameter

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@isra-fel isra-fel added this to the Az 16.0.0 (TBD) milestone Jan 28, 2026
@Pan-Qi Pan-Qi requested a review from VeryEarly January 29, 2026 03:59
Pan-Qi
Pan-Qi previously approved these changes Jan 29, 2026
Copilot AI review requested due to automatic review settings February 5, 2026 10:29
@isra-fel
Copy link
Copy Markdown
Member

isra-fel commented Feb 5, 2026

/azp run

Copilot AI review requested due to automatic review settings February 6, 2026 06:34
@JunKai-v
Copy link
Copy Markdown
Contributor

JunKai-v commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 90 out of 90 changed files in this pull request and generated no new comments.

@JunKai-v
Copy link
Copy Markdown
Contributor

JunKai-v commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@NoriZC
Copy link
Copy Markdown
Contributor

NoriZC commented Mar 27, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings March 27, 2026 03:08
@NoriZC
Copy link
Copy Markdown
Contributor

NoriZC commented Mar 27, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 89 out of 89 changed files in this pull request and generated 12 comments.

@@ -0,0 +1,20 @@
"Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation"
"Az.CloudService","New-AzCloudService","3","6","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault","Check the spell of Get-AzKeyVault."
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The remediation text says "Check the spell of ..."; this should be "Check the spelling of ..." for correct grammar.

Copilot uses AI. Check for mistakes.
Comment on lines +116 to +121
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'UpgradeMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]' to 'System.String'.","Change the type of property 'UpgradeMode' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3010","The property 'ResourceGroupName' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has been removed.","Add the property 'ResourceGroupName' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'Zone' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Zone' back to 'System.String[]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'UpgradeMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]' to 'System.String'.","Change the type of property 'UpgradeMode' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3010","The property 'ResourceGroupName' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has been removed.","Add the property 'ResourceGroupName' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService'."
"Az.CloudService","Update-AzCloudService","Update-AzCloudService","0","3000","The type of property 'Zone' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService' has changed from 'System.String[]' to 'System.Collections.Generic.List`1[System.String]'.","Change the type of property 'Zone' back to 'System.String[]'." No newline at end of file
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

BreakingChangeIssues.csv includes duplicated entries at the end (the Update-AzCloudService ResourceGroupName/Zone/type-change rows appear twice). Please de-duplicate identical rows to keep the exception list maintainable.

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 12
## SYNOPSIS
Updates the role instances in the specified update domain.
Walk the role instances in the specified walk domain.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Set-AzCloudServiceUpdateDomain help text uses "Walk" and "walk domain" in synopsis/description. Since the public cmdlet is still "Set-...UpdateDomain", the synopsis/description should describe updating role instances in an update domain (avoid exposing internal operation naming like "Walk"/"walk domain").

Copilot uses AI. Check for mistakes.
Comment on lines 9 to 12

## SYNOPSIS
Updates the role instances in the specified update domain.
Walk the role instances in the specified walk domain.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Set-AzCloudServiceUpdateDomain help text uses "Walk" and "walk domain" in synopsis/description. Please update wording to describe update domain behavior consistent with the cmdlet name.

Copilot uses AI. Check for mistakes.
subject: ^WalkCloudServiceUpdateDomain$
variant: ^Walk$
subject: ^WalkCloudServicesUpdateDomain$
variant: ^Walk$|^WalkViaIdentity$|^WalkViaIdentityCloudService$|^WalkViaIdentityCloudServiceExpanded$|^WalkViaIdentityExpanded$|^WalkViaJsonFilePathViaJsonFilePath$|^WalkViaJsonStringViaJsonString$
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

AutoRest README directive regex patterns include what look like duplicated parameter-set suffixes (e.g., RebuildViaJsonFilePathViaJsonFilePath, WalkViaJsonStringViaJsonString). These likely won't match the actual generated variant names (e.g., RebuildViaJsonFilePath, WalkViaJsonString), so the directives may not apply. Please verify/update the variant regexes to match the real parameter set names produced by the generator.

Suggested change
variant: ^Walk$|^WalkViaIdentity$|^WalkViaIdentityCloudService$|^WalkViaIdentityCloudServiceExpanded$|^WalkViaIdentityExpanded$|^WalkViaJsonFilePathViaJsonFilePath$|^WalkViaJsonStringViaJsonString$
variant: ^Walk$|^WalkViaIdentity$|^WalkViaIdentityCloudService$|^WalkViaIdentityCloudServiceExpanded$|^WalkViaIdentityExpanded$|^WalkViaJsonFilePath$|^WalkViaJsonString$

Copilot uses AI. Check for mistakes.

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.2'; })
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.3'; })
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Az.CloudService now requires Az.Accounts 5.3.3 (was 5.3.2). Raising the minimum dependency can be a breaking change for users/environments; please confirm this bump is required for the AutoRest v4 output and that release notes/documentation reflect the new minimum.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +7
"Az.CloudService","New-AzCloudService","3","6","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudService","3","7","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName ContosKeyVault -Name ContosCert","Check the spell of Get-AzKeyVaultCertificate."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","1","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -VaultName 'ContosoKeyVault'","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudServiceVaultSecretGroupObject","1","2","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName 'ContosoKeyVault' -Name 'ContosoCert'","Check the spell of Get-AzKeyVaultCertificate."
"Az.CloudService","New-AzCloudService","3","6","Invalid_Cmdlet","5000","1","Get-AzKeyVault is not a valid command name.","Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault","Check the spell of Get-AzKeyVault."
"Az.CloudService","New-AzCloudService","3","7","Invalid_Cmdlet","5000","1","Get-AzKeyVaultCertificate is not a valid command name.","Get-AzKeyVaultCertificate -VaultName ContosKeyVault -Name ContosCert","Check the spell of Get-AzKeyVaultCertificate."
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

ExampleIssues.csv contains duplicate exception records (e.g., the Invalid_Cmdlet entries for New-AzCloudService example 3/lines 6-7 are repeated). Duplicates add noise and slow down exception matching; please de-duplicate identical rows.

Copilot uses AI. Check for mistakes.
"Az.CloudService","Update-AzCloudService","1","2","Unassigned_Variable","5110","2","New-AzCloudServiceRemoteDesktopExtensionObject -Expiration $expiration is a null-valued parameter value.","-Expiration","Assign value for $expiration."
"Az.CloudService","New-AzCloudService","5","2","Invalid_Cmdlet","5000","1","New-AzStorageAccount is not a valid command name.","New-AzStorageAccount -ResourceGroupName ContosoOrg -Name ContosoStorAcc -Location 'East US' -SkuName 'Standard_RAGRS' -Kind 'StorageV2'","Check the spell of New-AzStorageAccount."
"Az.CloudService","New-AzCloudService","2","6","Invalid_Cmdlet","5000","1","Get-AzPublicIpAddress is not a valid command name.","Get-AzPublicIpAddress -ResourceGroupName ContosoOrg -Name ContosIp","Check the spell of Get-AzPublicIpAddress."
"Az.CloudService","New-AzCloudService","1","6","ParameterNameAndValue\Measure-ParameterNameAndValue","5200","1","Exception calling 'FindAll' with '2' argument(s): 'Cannot index into a null array.'","ContosIp","Unexpected Error. Please check [Trouble Shotting for Unexpected Errors in Example Issues](https://github.com/Azure/azure-powershell/blob/main/documentation/Debugging-StaticAnalysis-Errors.md#Troubleshotting-Example-Issues) for more details." No newline at end of file
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Remediation text contains a typo ("Trouble Shotting"). Consider changing to "Troubleshooting" to match standard wording.

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 12
## SYNOPSIS
Create or update a cloud service.
Create a cloud service.
Please note some properties can be set only during cloud service creation.
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Update-AzCloudService help synopsis now says "Create a cloud service", which is misleading for an Update cmdlet (and contradicts the cmdlet name). Please adjust synopsis/description to reflect that this cmdlet updates (and/or creates-or-updates) a cloud service.

Copilot uses AI. Check for mistakes.
Comment on lines 9 to 13

## SYNOPSIS
Create or update a cloud service.
Create a cloud service.
Please note some properties can be set only during cloud service creation.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Update-AzCloudService help synopsis now says "Create a cloud service", which is misleading for an Update cmdlet. Please adjust synopsis/description to reflect update (or create-or-update) behavior.

Copilot uses AI. Check for mistakes.
@NoriZC
Copy link
Copy Markdown
Contributor

NoriZC commented Mar 27, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings March 27, 2026 07:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 89 out of 89 changed files in this pull request and generated 15 comments.

Comments suppressed due to low confidence (1)

src/CloudService/CloudService.Autorest/custom/New-AzCloudServiceExtensionObject.ps1:62

  • New-AzCloudServiceExtensionObject now instantiates Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension, but the generated type is Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension. If the model namespace was not regenerated, this will cause runtime failures. Please use the correct generated type namespace (or ensure the generator output includes the non-versioned model types).
function New-AzCloudServiceExtensionObject {
    [Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
    [OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension')]
    [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension", "16.0.0", "9.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension", DeprecatedOutputProperties = ("RolesAppliedTo System.String[]"), NewOutputProperties = ("RolesAppliedTo System.Collections.Generic.List`1[System.String]"))]
    [CmdletBinding(PositionalBinding=$false)]
    Param(

        [Parameter(HelpMessage="Explicitly specify whether CRP can automatically upgrade typeHandlerVersion to higher minor versions when they become available.")]
        [bool]
        $AutoUpgradeMinorVersion,
        [Parameter(HelpMessage="Name.")]
        [string]
        $Name,
        [Parameter(HelpMessage="Protected settings for the extension which are encrypted before sent to the VM.")]
        [string]
        $ProtectedSetting,
        [Parameter(HelpMessage="Publisher.")]
        [string]
        $Publisher,
        [Parameter(HelpMessage="RolesAppliedTo.")]
        [string[]]
        $RolesAppliedTo,
        [Parameter(HelpMessage="Public settings for the extension.")]
        [string]
        $Setting,
        [Parameter(HelpMessage="Type.")]
        [string]
        $Type,
        [Parameter(HelpMessage="TypeHandlerVersion.")]
        [string]
        $TypeHandlerVersion
    )

    process {
        $Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension]::New()

        $Object.AutoUpgradeMinorVersion = $AutoUpgradeMinorVersion
        $Object.Name = $Name
        $Object.ProtectedSetting = $ProtectedSetting
        $Object.Publisher = $Publisher
        $Object.RolesAppliedTo = $RolesAppliedTo

Comment on lines 33 to 37
## PARAMETERS

### -Name
Name of role profile.
Resource name.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The parameter description for -Name was changed to the very generic "Resource name." For this cmdlet it represents the role profile name (as shown in the example), so this description is likely too vague and may confuse users. Please update it to a more specific description (e.g., role profile name / role name).

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +22
## Upcoming Release
* Improved user experience and consistency. This may introduce breaking changes. Please refer to [here](https://go.microsoft.com/fwlink/?linkid=2340249).

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The new changelog entry is very broad ("Improved user experience and consistency") and doesn’t reference the related issues mentioned in the PR description. Since this is user-facing release notes, please make the entry more specific about what changed and include the relevant issue references (e.g., [#28470], [#29145]) if applicable.

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +75
function New-AzCloudServiceExtensionObject {
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.")]
[bool]
$AutoUpgradeMinorVersion,
[Parameter(HelpMessage="Tag to force apply the provided public and protected settings.
Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
it is up to handler implementation whether to re-run it or not.")]
[string]
$ForceUpdateTag,
[Parameter(HelpMessage="The name of the extension.")]
[string]
$Name,
[Parameter(HelpMessage="Protected settings for the extension which are encrypted before sent to the role instance.")]
[string]
$ProtectedSetting,
[Parameter(HelpMessage="Secret URL which contains the protected settings of the extension.")]
[string]
$ProtectedSettingFromKeyVaultSecretUrl,
[Parameter(HelpMessage="The name of the extension handler publisher.")]
[string]
$Publisher,
[Parameter(HelpMessage="Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.")]
[string[]]
$RolesAppliedTo,
[Parameter(HelpMessage="Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.")]
[string]
$Setting,
[Parameter(HelpMessage="Resource Id.")]
[string]
$SourceVaultId,
[Parameter(HelpMessage="Specifies the type of the extension.")]
[string]
$Type,
[Parameter(HelpMessage="Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.")]
[string]
$TypeHandlerVersion
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension]::New()

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This new model-cmdlet implementation references Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension, but the generated model is currently Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension. If non-versioned models aren’t generated, this cmdlet will fail when invoked/imported. Please use the correct generated model namespace or include the regenerated types.

Copilot uses AI. Check for mistakes.
Comment on lines 2 to 5
external help file: Az.CloudService-help.xml
Module Name: Az.CloudService
online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservicevaultsecretgroupobject
online version: https://learn.microsoft.com/powershell/module/Az.CloudService/new-azcloudservicevaultsecretgroupobject
schema: 2.0.0
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The online version link was changed to use .../module/Az.CloudService/..., but the rest of this module’s help files (and existing Learn links in this repo) use the lowercase .../module/az.cloudservice/... form. Please keep the link format consistent across the module to avoid broken/duplicate URLs.

Copilot uses AI. Check for mistakes.
Comment on lines 87 to 119

[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', HelpMessage="Describes a cloud service extension profile.")]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage', HelpMessage="Describes a cloud service extension profile.")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceExtensionProfile]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceExtensionProfile]
# Describes a cloud service extension profile.
# To construct, see NOTES section for EXTENSIONPROFILE properties and create a hash table.
${ExtensionProfile},

[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', HelpMessage="Indicates whether to start the cloud service immediately after it is created.")]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage', HelpMessage="Indicates whether to start the cloud service immediately after it is created.")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[System.Management.Automation.SwitchParameter]
# (Optional) Indicates whether to start the cloud service immediately after it is created.
# The default value is `true`.If false, the service model is still deployed, but the code is not run immediately.
# Instead, the service is PoweredOff until you call Start, at which time the service will be started.
# A deployed service still incurs charges, even if it is poweredoff.
${StartCloudService},

[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage')]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},

[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', HelpMessage="Update mode for the cloud service.")]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage', HelpMessage="Update mode for the cloud service.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode])]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.PSArgumentCompleterAttribute("Auto", "Manual", "Simultaneous")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]
[System.String]
# Update mode for the cloud service.
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Several parameter/type annotations were switched from Models.Api20220904.* to Models.* (e.g., ICloudServiceExtensionProfile, ICloudServiceTags, and ICloudServiceUpgradeMode). In the current generated code, these non-versioned types do not exist (only identities are in Models, while service models remain under Models.Api20220904), so the cmdlet will fail to load/bind types. Please keep the versioned model namespaces (or include the corresponding regenerated model types in the module output).

Copilot uses AI. Check for mistakes.
Comment on lines 22 to 41
function New-AzCloudServiceLoadBalancerConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerConfiguration", "16.0.0", "9.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerConfiguration", DeprecatedOutputProperties = ("FrontendIPConfiguration Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration"), NewOutputProperties = ("FrontendIPConfiguration System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration]"))]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerConfiguration", "16.0.0", "9.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerConfiguration", DeprecatedOutputProperties = ("FrontendIPConfiguration Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration"), NewOutputProperties = ("FrontendIPConfiguration System.Collections.Generic.List`1[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration]"))]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="FrontendIPConfiguration.")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ILoadBalancerFrontendIPConfiguration[]]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration[]]
$FrontendIPConfiguration,
[Parameter(HelpMessage="Name of LoadBalancerConfiguration.")]
[string]
$Name
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerConfiguration]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerConfiguration]::New()

$Object.FrontendIPConfiguration = $FrontendIPConfiguration
$Object.Name = $Name
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The model type for FrontendIPConfiguration was changed to Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ILoadBalancerFrontendIPConfiguration[], but the generated interface currently lives under Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ILoadBalancerFrontendIPConfiguration. If the non-versioned interface is not generated, this will break parameter binding/import. Please keep the type in the correct generated namespace (or regenerate models so the non-versioned interface exists).

Copilot uses AI. Check for mistakes.
Comment on lines 28 to +53
function New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="Name of FrontendIpConfiguration.")]
[Parameter(Mandatory, HelpMessage="The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.")]
[string]
$Name,
[Parameter(ParameterSetName="DefaultParameterSet", HelpMessage="Resource Id.")]
[string]
$PublicIPAddressId,
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Private IP Address")]
[Parameter(ParameterSetName="PrivateIP", HelpMessage="The virtual network private IP address of the IP configuration.")]
[string]
$PrivateIPAddress,
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Subnet ID")]
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Resource Id.")]
[string]
$SubnetId
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration]::New()

$Object.Name = $Name
if ($PSBoundParameters.ContainsKey("PublicIPAddressId")) {
if ($PSBoundParameters.ContainsKey('Name')) {
$Object.Name = $Name
}
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This function was updated to instantiate Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration, but the generated model type is Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration. Creating the non-versioned type will fail if it is not generated. Please align the instantiated type/namespace with the generated model, or include the regenerated model that provides the new namespace.

Copilot uses AI. Check for mistakes.
Comment on lines 6 to +23
@@ -31,4 +20,4 @@ public partial interface ICloudService
PossibleTypes = new [] { typeof(string) })]
string ResourceGroupName { get; }
}
}
} No newline at end of file
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This file changed from extending Models.Api20220904.CloudService/Models.Api20220904.ICloudService to defining a new Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudService interface. In the current generated code, the ICloudService interface is in the Models.Api20220904 namespace, so this customization will not add ResourceGroupName to the actual output type used by cmdlets. Please apply the partial interface/property to the correct generated interface namespace/type so cmdlet output includes ResourceGroupName.

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 24
@@ -20,7 +20,7 @@ Update-AzCloudService -InputObject <ICloudServiceIdentity> -Parameter <ICloudSer
```

## DESCRIPTION
Create or update a cloud service.
Create a cloud service.
Please note some properties can be set only during cloud service creation.
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The SYNOPSIS/DESCRIPTION for Update-AzCloudService was changed to "Create a cloud service." This is misleading for an Update-* cmdlet (and previously stated "Create or update"). Please update the synopsis/description to accurately reflect that the cmdlet updates an existing cloud service (and whether it can also create).

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 38
## SYNOPSIS
Updates the role instances in the specified update domain.
Walk the role instances in the specified walk domain.

## SYNTAX

### WalkExpanded (Default)
```
Set-AzCloudServiceUpdateDomain -CloudServiceName <String> -ResourceGroupName <String> -UpdateDomain <Int32>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

### WalkViaJsonFilePath
```
Set-AzCloudServiceUpdateDomain -CloudServiceName <String> -ResourceGroupName <String> -UpdateDomain <Int32>
[-SubscriptionId <String>] -JsonFilePath <String> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

### WalkViaJsonString
```
Set-AzCloudServiceUpdateDomain -CloudServiceName <String> -ResourceGroupName <String> -UpdateDomain <Int32>
[-SubscriptionId <String>] -JsonString <String> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Updates the role instances in the specified update domain.
Walk the role instances in the specified walk domain.

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The SYNOPSIS/DESCRIPTION says "Walk the role instances in the specified walk domain." This looks like a generation typo (walk vs update) and doesn’t match the cmdlet name Set-AzCloudServiceUpdateDomain. Please correct the text to refer to the update domain operation (and use consistent terminology).

Copilot uses AI. Check for mistakes.
@NoriZC
Copy link
Copy Markdown
Contributor

NoriZC commented Mar 27, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@JunKai-v
Copy link
Copy Markdown
Contributor

JunKai-v commented Apr 7, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 Contains Breaking Change This PR contains breaking change needs-revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants