Skip to content

Conversation

@lijinpei2008
Copy link
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

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

@github-actions
Copy link

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
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
Invoke-AzCloudServiceRebuild -CloudServiceName <String> -ResourceGroupName <String> -RoleInstance <String[]>
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf]
Invoke-AzCloudServiceRebuild -CloudServiceName <String> -ResourceGroupName <String> [-SubscriptionId <String>]
[-RoleInstance <String[]>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@VeryEarly
Copy link
Collaborator

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

@github-actions
Copy link

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
Member

isra-fel commented Feb 5, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
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 1 comment.

Comment on lines 58 to 338
@@ -71,8 +65,23 @@ directive:
set:
subject: CloudServiceOSVersion
- where:
variant: ^Restart$|^RestartViaIdentity$|^Reimage$|^ReimageViaIdentity$|^Rebuild$|^RebuildViaIdentity$
subject: ^CloudService$|^RebuildCloudService$
variant: ^Rebuild$|^RebuildViaIdentity$|^RebuildViaJsonFilePathViaJsonFilePath$|^RebuildViaJsonStringViaJsonString$
subject: RebuildCloudService
remove: true
- where:
subject: ^RebuildCloudService$
set:
subject: Rebuild
- where:
subject: Rebuild
hide: true
- where:
variant: ^Restart$|^RestartViaIdentity$|^Reimage$|^ReimageViaIdentity$
subject: ^CloudService$
remove: true
- where:
variant: ^RebuildViaIdentityRoleInstance$
subject: ^RebuildCloudServiceRoleInstance$
remove: true

- where:
@@ -88,27 +97,22 @@ directive:
subject: CloudServiceRoleInstanceReimage
verb: Invoke

- where:
subject: ^RebuildCloudService$
variant: ^RebuildExpanded$|^RebuildViaIdentityExpanded$
set:
subject: Rebuild
- where:
subject: ^RebuildCloudServiceRoleInstance$
variant: ^Rebuild$|^RebuildViaIdentity$
set:
subject: RoleInstanceRebuild

- where:
subject: ^CloudServiceUpdateDomain$
verb: Get
subject: ^CloudServicesUpdateDomain$
verb: Get|Update
remove: true
- where:
subject: ^WalkCloudServiceUpdateDomain$
variant: ^Walk$
subject: ^WalkCloudServicesUpdateDomain$
variant: ^Walk$|^WalkViaIdentity$|^WalkViaIdentityCloudService$|^WalkViaIdentityCloudServiceExpanded$|^WalkViaIdentityExpanded$|^WalkViaJsonFilePathViaJsonFilePath$|^WalkViaJsonStringViaJsonString$
remove: true
- where:
subject: ^WalkCloudServiceUpdateDomain$
subject: ^WalkCloudServicesUpdateDomain$
set:
subject: UpdateDomain
verb: Set
@@ -119,7 +123,7 @@ directive:
remove: true
- where:
subject: ^CloudServiceRoleInstance$
verb: Remove
verb: Remove|Update
remove: true
- where:
variant: ^Delete$|^DeleteViaIdentity$
@@ -320,203 +324,15 @@ directive:
transform: >-
return "string"

- where:
verb: Get|Update
subject: CloudService
set:
breaking-change:
deprecated-output-properties:
- Extension
- LoadBalancerConfiguration
- Secret
- Role
- Zone
new-output-properties:
- Extension
- LoadBalancerConfiguration
- Secret
- Role
- Zone
change-description: The types of the properties 'Extension', 'LoadBalancerConfiguration', 'Secret', 'Role', and 'Zone' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: CloudServiceInstanceView
set:
breaking-change:
deprecated-output-properties:
- Statuses
- RoleInstanceStatusesSummary
- PrivateId
new-output-properties:
- Statuses
- RoleInstanceStatusesSummary
- PrivateId
change-description: The types of the properties 'Statuses', 'RoleInstanceStatusesSummary', and 'PrivateId' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: NetworkInterface
set:
breaking-change:
deprecated-output-properties:
- ApplicationSecurityGroup
- CustomDnsConfig
- FlowLog
- LoadBalancerFrontendIPConfiguration
- NetworkSecurityGroupPropertiesNetworkInterface
- PrivateEndpointPropertiesNetworkInterface
- PrivateLinkServicePropertiesNetworkInterface
- IPConfiguration
- TapConfiguration
- PrivateEndpointConnection
- PrivateEndpointPropertiesIPConfiguration
- PrivateLinkServiceConnection
- ManualPrivateLinkServiceConnection
- PrivateLinkServicePropertiesIPConfiguration
- SecurityRule
- DefaultSecurityRule
- ApplicationGatewayIPConfiguration
- Delegation
- FlowLog
- IPConfiguration
- IPConfigurationProfile
- NetworkInterface
- PrivateEndpoint
- ResourceNavigationLink
- Route
- DefaultSecurityRule
- SecurityRule
- ServiceAssociationLink
- ServiceEndpointPolicy
- ServiceEndpoint
- NetworkSecurityGroupPropertiesSubnet
- RouteTablePropertiesSubnet
- IPAllocation
- PropertiesAddressPrefixes
- PropertiesNetworkSecurityGroupPropertiesSubnets
- HostedWorkload
- VisibilitySubscription
- DnsSettingDnsServer
- DnsSettingAppliedDnsServer
- AutoApprovalSubscription
- Fqdn
new-output-properties:
- ApplicationSecurityGroup
- CustomDnsConfig
- FlowLog
- LoadBalancerFrontendIPConfiguration
- NetworkSecurityGroupPropertiesNetworkInterface
- PrivateEndpointPropertiesNetworkInterface
- PrivateLinkServicePropertiesNetworkInterface
- IPConfiguration
- TapConfiguration
- PrivateEndpointConnection
- PrivateEndpointPropertiesIPConfiguration
- PrivateLinkServiceConnection
- ManualPrivateLinkServiceConnection
- PrivateLinkServicePropertiesIPConfiguration
- SecurityRule
- DefaultSecurityRule
- ApplicationGatewayIPConfiguration
- Delegation
- FlowLog
- IPConfiguration
- IPConfigurationProfile
- NetworkInterface
- PrivateEndpoint
- ResourceNavigationLink
- Route
- DefaultSecurityRule
- SecurityRule
- ServiceAssociationLink
- ServiceEndpointPolicy
- ServiceEndpoint
- NetworkSecurityGroupPropertiesSubnet
- RouteTablePropertiesSubnet
- IPAllocation
- PropertiesAddressPrefixes
- PropertiesNetworkSecurityGroupPropertiesSubnets
- HostedWorkload
- VisibilitySubscription
- DnsSettingDnsServer
- DnsSettingAppliedDnsServer
- AutoApprovalSubscription
- Fqdn
change-description: The types of the properties 'ApplicationSecurityGroup', 'CustomDnsConfig', 'FlowLog', 'LoadBalancerFrontendIPConfiguration', 'NetworkSecurityGroupPropertiesNetworkInterface', 'PrivateEndpointPropertiesNetworkInterface', 'PrivateLinkServicePropertiesNetworkInterface', 'IPConfiguration', 'TapConfiguration', 'PrivateEndpointConnection', 'PrivateEndpointPropertiesIPConfiguration', 'PrivateLinkServiceConnection', 'ManualPrivateLinkServiceConnection', 'PrivateLinkServicePropertiesIPConfiguration', 'SecurityRule', 'DefaultSecurityRule', 'ApplicationGatewayIPConfiguration', 'Delegation', 'FlowLog', 'IPConfiguration', 'IPConfigurationProfile', 'NetworkInterface', 'PrivateEndpoint', 'ResourceNavigationLink', 'Route', 'DefaultSecurityRule', 'SecurityRule', 'ServiceAssociationLink', 'ServiceEndpointPolicy', 'ServiceEndpoint', 'NetworkSecurityGroupPropertiesSubnet', 'RouteTablePropertiesSubnet', 'IPAllocation', 'PropertiesAddressPrefixes', 'PropertiesNetworkSecurityGroupPropertiesSubnets', 'HostedWorkload', 'VisibilitySubscription', 'DnsSettingDnsServer', 'DnsSettingAppliedDnsServer', 'AutoApprovalSubscription', 'Fqdn' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: CloudServiceOSFamily
set:
breaking-change:
deprecated-output-properties:
- Version
new-output-properties:
- Version
change-description: The types of the properties 'Version' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: PublicIPAddress
set:
breaking-change:
deprecated-output-properties:
- Zone
- IPTag
- PublicIPAddress
- PublicIPPrefix
- Subnet
new-output-properties:
- Zone
- IPTag
- PublicIPAddress
- PublicIPPrefix
- Subnet
change-description: The types of the properties 'Zone', 'IPTag', 'PublicIPAddress', 'PublicIPPrefix', and 'Subnet' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: CloudServiceRoleInstance
set:
breaking-change:
deprecated-output-properties:
- NetworkProfileNetworkInterface
- InstanceViewStatuses
new-output-properties:
- NetworkProfileNetworkInterface
- InstanceViewStatuses
change-description: The types of the properties 'NetworkProfileNetworkInterface' and 'InstanceViewStatuses' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03

- where:
verb: Get
subject: CloudServiceRoleInstanceView
set:
breaking-change:
deprecated-output-properties:
- Statuses
new-output-properties:
- Statuses
change-description: The types of the properties 'Statuses' will be changed from object to 'List'.
deprecated-by-version: 9.0.0
deprecated-by-azversion: 15.0.0
change-effective-date: 2025/11/03
- model-cmdlet:
- model-name: Extension
cmdlet-name: New-AzCloudServiceExtensionObject
- model-name: LoadBalancerConfiguration
cmdlet-name: New-AzCloudServiceLoadBalancerConfigurationObject
# - model-name: LoadBalancerFrontendIPConfiguration
# cmdlet-name: New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject
- model-name: CloudServiceRoleProfileProperties
cmdlet-name: New-AzCloudServiceRoleProfilePropertiesObject
# - model-name: CloudServiceVaultSecretGroup
# cmdlet-name: New-AzCloudServiceVaultSecretGroupObject
```
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The README.md file is missing comments explaining the purpose of the directives. According to the coding guidelines, every directive should have a comment explaining its purpose and the "why" behind customizations. This helps future maintainers understand the intention behind these changes.

Copilot generated this review using guidance from repository custom instructions.
@isra-fel
Copy link
Member

isra-fel commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@JunKai-v
Copy link

JunKai-v commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

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

JunKai-v commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
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

JunKai-v commented Feb 6, 2026

/azp run

@azure-pipelines
Copy link
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.

5 participants