Skip to content

Commit ca59c68

Browse files
committed
Migrate Resource module Authorization part to autorest v4
1 parent 8eb01bb commit ca59c68

File tree

57 files changed

+2870
-253
lines changed

Some content is hidden

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

57 files changed

+2870
-253
lines changed

src/Resources/Authorization.Autorest/Az.Authorization.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<copyright>Microsoft Corporation. All rights reserved.</copyright>
1414
<tags>Azure ResourceManager ARM PSModule $(service-name)</tags>
1515
<dependencies>
16-
<dependency id="Az.Accounts" version="2.2.3" />
16+
<dependency id="Az.Accounts" version="2.7.5" />
1717
</dependencies>
1818
</metadata>
1919
<files>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
// http://www.apache.org/licenses/LICENSE-2.0
6+
// Unless required by applicable law or agreed to in writing, software
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
8+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
// See the License for the specific language governing permissions and
10+
// limitations under the License.
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
13+
14+
using System;
15+
using System.Reflection;
16+
using System.Runtime.CompilerServices;
17+
using System.Runtime.InteropServices;
18+
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Authorization")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.0.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+

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
# Swaager bug: The scope should be readonly according to the server response.
6256
- from: swagger-document
@@ -78,19 +72,11 @@ directive:
7872
}
7973
8074
# Remove "Create", "CreateViaIdentity", "CreateViaIdentityExpanded" syntax variant of the cmdlets. Because of new cmdlet does unsupport.
81-
- where:
82-
verb: New
83-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$
84-
# subject: RoleEligibilityScheduleRequest$|RoleManagementPolicyAssignment$
85-
remove: true
86-
8775
# Remove "Update", "UpdateViaIdentity", syntax variant of the cmdlets. Because of update cmdlet does unsupport.
8876
- where:
89-
verb: Update
90-
variant: ^Update$|^UpdateViaIdentity$
91-
subject: RoleManagementPolicy$
77+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
9278
remove: true
93-
79+
9480
# The parameter is not friendly and needs to be renamed.
9581
- where:
9682
parameter-name: ^TicketInfoTicketNumber$
@@ -104,8 +90,9 @@ directive:
10490
# Generate cmdlet for RoleManagementPolicyRule memory object and copy to the custom folder for rename cmdlet(New-AzAuthorizationRoleManagementPolicyRuleObject --> New-AzRoleManagementPolicyRuleObject).
10591
# Then cancel configuration of it.
10692
# - model-cmdlet:
107-
# - RoleManagementPolicyRule
108-
93+
# - model-name: RoleManagementPolicyRule
94+
# cmdlet-name: New-AzRoleManagementPolicyRuleObject
95+
10996
- where:
11097
model-name: EligibleChildResource
11198
set:

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Authorization
3-
Module Guid: 5e804a75-47b7-4aac-9e3b-4bbc49a1abca
3+
Module Guid: 29b38940-f692-455e-8683-880403f4bf65
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.authorization
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -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)