-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Az.CloudService update generation tool version: autorest.powershell v3->v4 #28572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lijinpei2008
wants to merge
18
commits into
main
Choose a base branch
from
jinpei/main/CloudService-updatev4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a95101f
Az.CloudService update generation tool version: autorest.powershell v…
lijinpei2008 c651b06
update examples
lijinpei2008 350f640
update examples
lijinpei2008 683dbaf
Merge branch 'main' into jinpei/main/CloudService-updatev4
lijinpei2008 41b89cd
Merge branch 'main' of https://github.com/Azure/azure-powershell into…
lijinpei2008 b59dea5
re-generation
lijinpei2008 be68ba1
Update changelog
lijinpei2008 a933fe0
update
lijinpei2008 61354bb
rebuild with Autorest 4.0.752
JunKai-v 9252678
update example issues csv
JunKai-v 71f978a
update example issues
JunKai-v 20ed53c
update example issues csv
JunKai-v a210f9b
Merge remote-tracking branch 'upstream/main' into jinpei/main/CloudSe…
JunKai-v dc24ae4
rebuild
JunKai-v 6854a2b
add model cmdlet attribute
JunKai-v b71988f
fix No Azure login detected
JunKai-v 1fe5ab1
Merge remote-tracking branch 'upstream/main' into jinpei/main/CloudSe…
JunKai-v f9c9667
rebuild
JunKai-v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 183 additions & 0 deletions
183
src/CloudService/CloudService.Autorest/custom/Invoke-AzCloudServiceRebuild.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,183 @@ | ||
|
|
||
| # ---------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code | ||
| # is regenerated. | ||
| # ---------------------------------------------------------------------------------- | ||
|
|
||
| <# | ||
| .Synopsis | ||
| Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. | ||
| If you do not want to initialize storage resources, you can use Reimage Role Instances. | ||
| .Description | ||
| Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. | ||
| If you do not want to initialize storage resources, you can use Reimage Role Instances. | ||
| .Example | ||
| $roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1") | ||
| Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances | ||
| .Example | ||
| Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*" | ||
|
|
||
| .Inputs | ||
| Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity | ||
| .Outputs | ||
| System.Boolean | ||
| .Notes | ||
| COMPLEX PARAMETER PROPERTIES | ||
|
|
||
| To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. | ||
|
|
||
| INPUTOBJECT <ICloudServiceIdentity>: Identity Parameter | ||
| [CloudServiceName <String>]: Name of the cloud service. | ||
| [IPConfigurationName <String>]: The IP configuration name. | ||
| [Id <String>]: Resource identity path | ||
| [Location <String>]: Name of the location that the OS version pertains to. | ||
| [NetworkInterfaceName <String>]: The name of the network interface. | ||
| [OSFamilyName <String>]: Name of the OS family. | ||
| [OSVersionName <String>]: Name of the OS version. | ||
| [PublicIPAddressName <String>]: The name of the public IP Address. | ||
| [ResourceGroupName <String>]: Name of the resource group. | ||
| [RoleInstanceName <String>]: Name of the role instance. | ||
| [RoleName <String>]: Name of the role. | ||
| [SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. | ||
| [UpdateDomain <Int32?>]: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. | ||
| .Link | ||
| https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicerebuild | ||
| #> | ||
| function Invoke-AzCloudServiceRebuild { | ||
| [OutputType([System.Boolean])] | ||
| [CmdletBinding(DefaultParameterSetName = 'RebuildExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] | ||
| param( | ||
| [Parameter(ParameterSetName = 'RebuildExpanded', Mandatory)] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonFilePath', Mandatory)] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonString', Mandatory)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Path')] | ||
| [System.String] | ||
| # Name of the cloud service. | ||
| ${CloudServiceName}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildExpanded', Mandatory)] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonFilePath', Mandatory)] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonString', Mandatory)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Path')] | ||
| [System.String] | ||
| # Name of the resource group. | ||
| ${ResourceGroupName}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildExpanded')] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonFilePath')] | ||
| [Parameter(ParameterSetName = 'RebuildViaJsonString')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] | ||
| [System.String] | ||
| # Subscription credentials which uniquely identify Microsoft Azure subscription. | ||
| # The subscription ID forms part of the URI for every service call. | ||
| ${SubscriptionId}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildViaIdentityExpanded', Mandatory, ValueFromPipeline)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Path')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity] | ||
| # Identity Parameter | ||
| ${InputObject}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildExpanded', Mandatory)] | ||
| [Parameter(ParameterSetName = 'RebuildViaIdentityExpanded', Mandatory)] | ||
| [AllowEmptyCollection()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')] | ||
| [System.String[]] | ||
| # List of cloud service role instance names. | ||
| # Value of '*' will signify all role instances of the cloud service. | ||
| ${RoleInstance}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildViaJsonFilePath', Mandatory)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')] | ||
| [System.String] | ||
| # Path of Json file supplied to the Rebuild operation | ||
| ${JsonFilePath}, | ||
|
|
||
| [Parameter(ParameterSetName = 'RebuildViaJsonString', Mandatory)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')] | ||
| [System.String] | ||
| # Json string supplied to the Rebuild operation | ||
| ${JsonString}, | ||
|
|
||
| [Parameter()] | ||
| [Alias('AzureRMContext', 'AzureCredential')] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Azure')] | ||
| [System.Management.Automation.PSObject] | ||
| # The DefaultProfile parameter is not functional. | ||
| # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. | ||
| ${DefaultProfile}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Run the command as a job | ||
| ${AsJob}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Wait for .NET debugger to attach | ||
| ${Break}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.SendAsyncStep[]] | ||
| # SendAsync Pipeline Steps to be appended to the front of the pipeline | ||
| ${HttpPipelineAppend}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.SendAsyncStep[]] | ||
| # SendAsync Pipeline Steps to be prepended to the front of the pipeline | ||
| ${HttpPipelinePrepend}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Run the command asynchronously | ||
| ${NoWait}, | ||
|
|
||
| [Parameter()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Returns true when the command succeeds | ||
| ${PassThru}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Uri] | ||
| # The URI for the proxy server to use | ||
| ${Proxy}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [ValidateNotNull()] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.PSCredential] | ||
| # Credentials for a proxy server to use for the remote call | ||
| ${ProxyCredential}, | ||
|
|
||
| [Parameter(DontShow)] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Runtime')] | ||
| [System.Management.Automation.SwitchParameter] | ||
| # Use the default credentials for the proxy | ||
| ${ProxyUseDefaultCredentials} | ||
| ) | ||
|
|
||
| process { | ||
| Az.CloudService.internal\Invoke-AzCloudServiceRebuild @PSBoundParameters | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.