Skip to content

Commit b559816

Browse files
LingyunSuTheOnlyWei
authored andcommitted
[2301] update Azs.Update.Admin to 1.1.0
1 parent a0fb995 commit b559816

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2754
-5490
lines changed

src/Azs.Update.Admin/custom/Get-AzsUpdate.ps1

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.6, generator: @autorest/powershell@3.0.478)
4+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
# ----------------------------------------------------------------------------------
6+
17
<#
28
.Synopsis
39
Get a specific update at an update location.
410
.Description
511
Get a specific update at an update location.
612
.Example
7-
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdate
13+
PS C:\> {{ Add code here }}
14+
15+
{{ Add output here }}
16+
.Example
17+
PS C:\> {{ Add code here }}
18+
19+
{{ Add output here }}
20+
821
.Inputs
922
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity
1023
.Outputs
11-
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20160501.IUpdate
24+
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdate
1225
.Notes
1326
COMPLEX PARAMETER PROPERTIES
27+
1428
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.
1529
1630
INPUTOBJECT <IUpdateAdminIdentity>: Identity Parameter
1731
[Id <String>]: Resource identity path
18-
[ResourceGroupName <String>]: Resource group name.
32+
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
1933
[RunName <String>]: Update run identifier.
20-
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
34+
[SubscriptionId <String>]: The ID of the target subscription.
2135
[UpdateLocation <String>]: The name of the update location.
2236
[UpdateName <String>]: Name of the update.
2337
.Link
2438
https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdate
2539
#>
2640
function Get-AzsUpdate {
27-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20160501.IUpdate])]
41+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdate])]
2842
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
2943
param(
3044
[Parameter(ParameterSetName='Get')]
@@ -46,16 +60,16 @@ param(
4660
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
4761
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
4862
[System.String]
49-
# Resource group name.
63+
# The name of the resource group.
64+
# The name is case insensitive.
5065
${ResourceGroupName},
5166

5267
[Parameter(ParameterSetName='Get')]
5368
[Parameter(ParameterSetName='List')]
5469
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
5570
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
5671
[System.String[]]
57-
# Subscription credentials which uniquely identify Microsoft Azure subscription.
58-
# The subscription ID forms part of the URI for every service call.
72+
# The ID of the target subscription.
5973
${SubscriptionId},
6074

6175
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
@@ -113,18 +127,17 @@ param(
113127
${ProxyUseDefaultCredentials}
114128
)
115129

116-
process
117-
{
118-
# Generated SDK does not support {location}/{name} for nested resource name, so extract the {name} part here
130+
process {
131+
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
132+
119133
if ($PSBoundParameters.ContainsKey(('Name')))
120134
{
121-
$Name = $PSBoundParameters['Name']
122135
if ($null -ne $Name -and $Name.Contains('/'))
123136
{
124137
$PSBoundParameters['Name'] = $Name.Split("/")[-1]
125138
}
126139
}
140+
127141
Azs.Update.Admin.internal\Get-AzsUpdate @PSBoundParameters
128142
}
129-
130143
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.6, generator: @autorest/powershell@3.0.478)
4+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
# ----------------------------------------------------------------------------------
6+
7+
<#
8+
.Synopsis
9+
Get an update location based on name.
10+
.Description
11+
Get an update location based on name.
12+
.Example
13+
PS C:\> {{ Add code here }}
14+
15+
{{ Add output here }}
16+
.Example
17+
PS C:\> {{ Add code here }}
18+
19+
{{ Add output here }}
20+
21+
.Inputs
22+
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity
23+
.Outputs
24+
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateLocation
25+
.Notes
26+
COMPLEX PARAMETER PROPERTIES
27+
28+
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.
29+
30+
INPUTOBJECT <IUpdateAdminIdentity>: Identity Parameter
31+
[Id <String>]: Resource identity path
32+
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
33+
[RunName <String>]: Update run identifier.
34+
[SubscriptionId <String>]: The ID of the target subscription.
35+
[UpdateLocation <String>]: The name of the update location.
36+
[UpdateName <String>]: Name of the update.
37+
.Link
38+
https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdatelocation
39+
#>
40+
function Get-AzsUpdateLocation {
41+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateLocation])]
42+
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
43+
param(
44+
[Parameter(ParameterSetName='Get')]
45+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
46+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzLocation)[0].Location')]
47+
[System.String]
48+
# The name of the update location.
49+
${Name},
50+
51+
[Parameter(ParameterSetName='Get')]
52+
[Parameter(ParameterSetName='List')]
53+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
54+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
55+
[System.String]
56+
# The name of the resource group.
57+
# The name is case insensitive.
58+
${ResourceGroupName},
59+
60+
[Parameter(ParameterSetName='Get')]
61+
[Parameter(ParameterSetName='List')]
62+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
63+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
64+
[System.String[]]
65+
# The ID of the target subscription.
66+
${SubscriptionId},
67+
68+
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
69+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
70+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity]
71+
# Identity Parameter
72+
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
73+
${InputObject},
74+
75+
[Parameter()]
76+
[Alias('AzureRMContext', 'AzureCredential')]
77+
[ValidateNotNull()]
78+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Azure')]
79+
[System.Management.Automation.PSObject]
80+
# The credentials, account, tenant, and subscription used for communication with Azure.
81+
${DefaultProfile},
82+
83+
[Parameter(DontShow)]
84+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
85+
[System.Management.Automation.SwitchParameter]
86+
# Wait for .NET debugger to attach
87+
${Break},
88+
89+
[Parameter(DontShow)]
90+
[ValidateNotNull()]
91+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
92+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.SendAsyncStep[]]
93+
# SendAsync Pipeline Steps to be appended to the front of the pipeline
94+
${HttpPipelineAppend},
95+
96+
[Parameter(DontShow)]
97+
[ValidateNotNull()]
98+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
99+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.SendAsyncStep[]]
100+
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
101+
${HttpPipelinePrepend},
102+
103+
[Parameter(DontShow)]
104+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
105+
[System.Uri]
106+
# The URI for the proxy server to use
107+
${Proxy},
108+
109+
[Parameter(DontShow)]
110+
[ValidateNotNull()]
111+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
112+
[System.Management.Automation.PSCredential]
113+
# Credentials for a proxy server to use for the remote call
114+
${ProxyCredential},
115+
116+
[Parameter(DontShow)]
117+
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Runtime')]
118+
[System.Management.Automation.SwitchParameter]
119+
# Use the default credentials for the proxy
120+
${ProxyUseDefaultCredentials}
121+
)
122+
123+
process {
124+
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
125+
126+
if ($PSBoundParameters.ContainsKey(('Name')))
127+
{
128+
if ($null -ne $Name -and $Name.Contains('/'))
129+
{
130+
$PSBoundParameters['Name'] = $Name.Split("/")[-1]
131+
}
132+
}
133+
134+
Azs.Update.Admin.internal\Get-AzsUpdateLocation @PSBoundParameters
135+
}
136+
}

src/Azs.Update.Admin/custom/Get-AzsUpdateRun.ps1

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
1+
2+
# ----------------------------------------------------------------------------------
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.6, generator: @autorest/powershell@3.0.478)
4+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
# ----------------------------------------------------------------------------------
6+
17
<#
28
.Synopsis
39
Get an instance of update run using the ID.
410
.Description
511
Get an instance of update run using the ID.
612
.Example
7-
To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdaterun
13+
PS C:\> {{ Add code here }}
14+
15+
{{ Add output here }}
16+
.Example
17+
PS C:\> {{ Add code here }}
18+
19+
{{ Add output here }}
20+
821
.Inputs
922
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.IUpdateAdminIdentity
1023
.Outputs
11-
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20160501.IUpdateRun
24+
Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateRun
1225
.Notes
1326
COMPLEX PARAMETER PROPERTIES
27+
1428
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.
1529
1630
INPUTOBJECT <IUpdateAdminIdentity>: Identity Parameter
1731
[Id <String>]: Resource identity path
18-
[ResourceGroupName <String>]: Resource group name.
32+
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
1933
[RunName <String>]: Update run identifier.
20-
[SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
34+
[SubscriptionId <String>]: The ID of the target subscription.
2135
[UpdateLocation <String>]: The name of the update location.
2236
[UpdateName <String>]: Name of the update.
2337
.Link
2438
https://docs.microsoft.com/en-us/powershell/module/azs.update.admin/get-azsupdaterun
2539
#>
2640
function Get-AzsUpdateRun {
27-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20160501.IUpdateRun])]
41+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Models.Api20210701.IUpdateRun])]
2842
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
2943
param(
3044
[Parameter(ParameterSetName='Get')]
@@ -46,16 +60,16 @@ param(
4660
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
4761
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='-join("System.",(Get-AzLocation)[0].Location)')]
4862
[System.String]
49-
# Resource group name.
63+
# The name of the resource group.
64+
# The name is case insensitive.
5065
${ResourceGroupName},
5166

5267
[Parameter(ParameterSetName='Get')]
5368
[Parameter(ParameterSetName='List')]
5469
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Category('Path')]
5570
[Microsoft.Azure.PowerShell.Cmdlets.UpdateAdmin.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
5671
[System.String[]]
57-
# Subscription credentials which uniquely identify Microsoft Azure subscription.
58-
# The subscription ID forms part of the URI for every service call.
72+
# The ID of the target subscription.
5973
${SubscriptionId},
6074

6175
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -121,27 +135,25 @@ param(
121135
)
122136

123137
process {
124-
# Generated SDK does not support {location}/{updateName} for nested resource updateName, so extract the {updateName} part here
125-
if ($PSBoundParameters.ContainsKey(('UpdateName')))
138+
# Generated cmdlet does not support {prefix}/{name} for Gateway name, so extract the {name} part here
139+
140+
if ($PSBoundParameters.ContainsKey(('Name')))
126141
{
127-
$UpdateName = $PSBoundParameters['UpdateName']
128-
if ($null -ne $UpdateName -and $UpdateName.Contains('/'))
142+
if ($null -ne $Name -and $Name.Contains('/'))
129143
{
130-
$PSBoundParameters['UpdateName'] = $UpdateName.Split("/")[-1]
144+
$PSBoundParameters['Name'] = $Name.Split("/")[-1]
131145
}
132146
}
133147

134-
# Generated SDK does not support {location}/{updateName}/{name} for nested resource name, so extract the {name} part here
135-
if ($PSBoundParameters.ContainsKey(('Name')))
148+
149+
if ($PSBoundParameters.ContainsKey(('UpdateName')))
150+
{
151+
if ($null -ne $UpdateName -and $UpdateName.Contains('/'))
136152
{
137-
$Name = $PSBoundParameters['Name']
138-
if ($null -ne $Name -and $Name.Contains('/'))
139-
{
140-
$PSBoundParameters['Name'] = $Name.Split("/")[-1]
141-
}
153+
$PSBoundParameters['UpdateName'] = $UpdateName.Split("/")[-1]
142154
}
155+
}
143156

144157
Azs.Update.Admin.internal\Get-AzsUpdateRun @PSBoundParameters
145158
}
146-
147159
}

0 commit comments

Comments
 (0)