Skip to content

Commit 37351f4

Browse files
JoyerJinisra-fel
andauthored
[PS] Migrate Resource module Authorization part to autorest v4 (#27902)
Co-authored-by: Yeming Liu <[email protected]>
1 parent e512e0a commit 37351f4

File tree

59 files changed

+2693
-270
lines changed

Some content is hidden

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

59 files changed

+2693
-270
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
3+
<metadata>
4+
<id>Az.Authorization</id>
5+
<version>0.1.0</version>
6+
<authors>Microsoft Corporation</authors>
7+
<owners>Microsoft Corporation</owners>
8+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
9+
<licenseUrl>https://aka.ms/azps-license</licenseUrl>
10+
<projectUrl>https://github.com/Azure/azure-powershell</projectUrl>
11+
<description>Microsoft Azure PowerShell: $(service-name) cmdlets</description>
12+
<releaseNotes></releaseNotes>
13+
<copyright>Microsoft Corporation. All rights reserved.</copyright>
14+
<tags>Azure ResourceManager ARM PSModule $(service-name)</tags>
15+
<dependencies>
16+
<dependency id="Az.Accounts" version="2.7.5" />
17+
</dependencies>
18+
</metadata>
19+
<files>
20+
<file src="Az.Authorization.format.ps1xml" />
21+
<file src="Az.Authorization.psd1" />
22+
<file src="Az.Authorization.psm1" />
23+
<!-- https://github.com/NuGet/Home/issues/3584 -->
24+
<file src="bin/Az.Authorization.private.dll" target="bin" />
25+
<file src="bin\Az.Authorization.private.deps.json" target="bin" />
26+
<file src="internal\**\*.*" exclude="internal\README.md" target="internal" />
27+
<file src="custom\**\*.*" exclude="custom\README.md;custom\**\*.cs" target="custom" />
28+
<file src="docs\**\*.md" exclude="docs\README.md" target="docs" />
29+
<file src="exports\**\ProxyCmdletDefinitions.ps1" target="exports" />
30+
<file src="utils\**\*.*" target="utils" />
31+
</files>
32+
</package>

src/Resources/Authorization.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Authorization")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.0.1")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("8.0.1")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.1.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("8.1.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Resources/Authorization.Autorest/README.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,8 @@ title: Authorization
4949
namespace: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization
5050
# remove subject-prefix for all generated cmdlets.
5151
subject-prefix: ''
52-
identity-correction-for-post: true
53-
resourcegroup-append: true
5452
default-exclude-tableview-properties: false
5553

56-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
57-
use-extension:
58-
"@autorest/powershell": "3.x"
59-
6054
directive:
6155
- where:
6256
verb: Get|Update
@@ -102,19 +96,11 @@ directive:
10296
}
10397
10498
# Remove "Create", "CreateViaIdentity", "CreateViaIdentityExpanded" syntax variant of the cmdlets. Because of new cmdlet does unsupport.
105-
- where:
106-
verb: New
107-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$
108-
# subject: RoleEligibilityScheduleRequest$|RoleManagementPolicyAssignment$
109-
remove: true
110-
11199
# Remove "Update", "UpdateViaIdentity", syntax variant of the cmdlets. Because of update cmdlet does unsupport.
112100
- where:
113-
verb: Update
114-
variant: ^Update$|^UpdateViaIdentity$
115-
subject: RoleManagementPolicy$
101+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
116102
remove: true
117-
103+
118104
# The parameter is not friendly and needs to be renamed.
119105
- where:
120106
parameter-name: ^TicketInfoTicketNumber$
@@ -128,8 +114,9 @@ directive:
128114
# Generate cmdlet for RoleManagementPolicyRule memory object and copy to the custom folder for rename cmdlet(New-AzAuthorizationRoleManagementPolicyRuleObject --> New-AzRoleManagementPolicyRuleObject).
129115
# Then cancel configuration of it.
130116
# - model-cmdlet:
131-
# - RoleManagementPolicyRule
132-
117+
# - model-name: RoleManagementPolicyRule
118+
# cmdlet-name: New-AzRoleManagementPolicyRuleObject
119+
133120
- where:
134121
model-name: EligibleChildResource
135122
set:

src/Resources/Authorization.Autorest/docs/Az.Authorization.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ Get the specified role management policy for a resource scope
3939
Get the specified role management policy assignment for a resource scope
4040

4141
### [New-AzRoleAssignmentScheduleRequest](New-AzRoleAssignmentScheduleRequest.md)
42-
Creates a role assignment schedule request.
42+
Create a role assignment schedule request.
4343

4444
### [New-AzRoleEligibilityScheduleRequest](New-AzRoleEligibilityScheduleRequest.md)
45-
Creates a role eligibility schedule request.
45+
Create a role eligibility schedule request.
4646

4747
### [New-AzRoleManagementPolicyAssignment](New-AzRoleManagementPolicyAssignment.md)
4848
Create a role management policy assignment
@@ -59,6 +59,15 @@ Cancels a pending role assignment schedule request.
5959
### [Stop-AzRoleEligibilityScheduleRequest](Stop-AzRoleEligibilityScheduleRequest.md)
6060
Cancels a pending role eligibility schedule request.
6161

62+
### [Update-AzRoleAssignmentScheduleRequest](Update-AzRoleAssignmentScheduleRequest.md)
63+
Update a role assignment schedule request.
64+
65+
### [Update-AzRoleEligibilityScheduleRequest](Update-AzRoleEligibilityScheduleRequest.md)
66+
Update a role eligibility schedule request.
67+
6268
### [Update-AzRoleManagementPolicy](Update-AzRoleManagementPolicy.md)
6369
Update a role management policy
6470

71+
### [Update-AzRoleManagementPolicyAssignment](Update-AzRoleManagementPolicyAssignment.md)
72+
Update a role management policy assignment
73+

src/Resources/Authorization.Autorest/docs/Get-AzRoleAssignmentSchedule.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ Accept wildcard characters: False
155155
156156
### -InputObject
157157
Identity Parameter
158-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
159158
160159
```yaml
161160
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -208,7 +207,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
208207
209208
## OUTPUTS
210209
211-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleAssignmentSchedule
210+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleAssignmentSchedule
212211
213212
## NOTES
214213

src/Resources/Authorization.Autorest/docs/Get-AzRoleAssignmentScheduleInstance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ Accept wildcard characters: False
156156
157157
### -InputObject
158158
Identity Parameter
159-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
160159
161160
```yaml
162161
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -209,7 +208,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
209208
210209
## OUTPUTS
211210
212-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleAssignmentScheduleInstance
211+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleAssignmentScheduleInstance
213212
214213
## NOTES
215214

src/Resources/Authorization.Autorest/docs/Get-AzRoleAssignmentScheduleRequest.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Accept wildcard characters: False
140140
141141
### -InputObject
142142
Identity Parameter
143-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
144143
145144
```yaml
146145
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -193,7 +192,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
193192
194193
## OUTPUTS
195194
196-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleAssignmentScheduleRequest
195+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleAssignmentScheduleRequest
197196
198197
## NOTES
199198

src/Resources/Authorization.Autorest/docs/Get-AzRoleEligibilitySchedule.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ Accept wildcard characters: False
155155
156156
### -InputObject
157157
Identity Parameter
158-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
159158
160159
```yaml
161160
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -208,7 +207,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
208207
209208
## OUTPUTS
210209
211-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleEligibilitySchedule
210+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleEligibilitySchedule
212211
213212
## NOTES
214213

src/Resources/Authorization.Autorest/docs/Get-AzRoleEligibilityScheduleInstance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ Accept wildcard characters: False
156156
157157
### -InputObject
158158
Identity Parameter
159-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
160159
161160
```yaml
162161
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -209,7 +208,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
209208
210209
## OUTPUTS
211210
212-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleEligibilityScheduleInstance
211+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleEligibilityScheduleInstance
213212
214213
## NOTES
215214

src/Resources/Authorization.Autorest/docs/Get-AzRoleEligibilityScheduleRequest.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Accept wildcard characters: False
140140
141141
### -InputObject
142142
Identity Parameter
143-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
144143
145144
```yaml
146145
Type: Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IAuthorizationIdentity
@@ -193,7 +192,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
193192
194193
## OUTPUTS
195194
196-
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.IRoleEligibilityScheduleRequest
195+
### Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.IRoleEligibilityScheduleRequest
197196
198197
## NOTES
199198

0 commit comments

Comments
 (0)