Skip to content

Commit bb597ae

Browse files
authored
[PS] migrate GraphServices module to autorest v4 (Azure#27606)
1 parent c149b23 commit bb597ae

17 files changed

+339
-67
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 - GraphServices")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]

src/GraphServices/GraphServices.Autorest/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,15 @@ module-version: 0.1.0
4545
title: GraphServices
4646
subject-prefix: $(service-name)
4747

48-
# If there are post APIs for some kinds of actions in the RP, you may need to
49-
# uncomment following line to support viaIdentity for these post APIs
50-
# identity-correction-for-post: true
51-
resourcegroup-append: true
52-
nested-object-to-string: true
53-
54-
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
55-
use-extension:
56-
"@autorest/powershell": "3.x"
57-
5848
directive:
5949
# Following is two common directive which are normally required in all the RPs
6050
# 1. Remove the unexpanded parameter set
6151
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
6252
- where:
63-
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
53+
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
54+
remove: true
55+
- where:
56+
variant: ^CreateViaIdentityExpanded$
6457
remove: true
6558
- where:
6659
subject: AccountAndUpdate

src/GraphServices/GraphServices.Autorest/docs/Az.GraphServices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.GraphServices
3-
Module Guid: fc20d450-3067-4fe9-8c8b-09f3eb48055a
3+
Module Guid: 48f1f0e6-4d7a-456b-8027-82676bc09900
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.graphservices
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -15,11 +15,11 @@ Microsoft Azure PowerShell: GraphServices cmdlets
1515
Returns account resource for a given name.
1616

1717
### [New-AzGraphServicesAccount](New-AzGraphServicesAccount.md)
18-
Create or update account resource.
18+
create account resource.
1919

2020
### [Remove-AzGraphServicesAccount](Remove-AzGraphServicesAccount.md)
2121
Deletes a account resource.
2222

2323
### [Update-AzGraphServicesAccount](Update-AzGraphServicesAccount.md)
24-
Update account details.
24+
update account details.
2525

src/GraphServices/GraphServices.Autorest/docs/Get-AzGraphServicesAccount.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ Accept wildcard characters: False
8787
8888
### -InputObject
8989
Identity Parameter
90-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
9190
9291
```yaml
9392
Type: Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IGraphServicesIdentity
@@ -156,7 +155,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
156155
157156
## OUTPUTS
158157
159-
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.Api20230413.IAccountResource
158+
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IAccountResource
160159
161160
## NOTES
162161

src/GraphServices/GraphServices.Autorest/docs/New-AzGraphServicesAccount.md

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,33 @@ schema: 2.0.0
88
# New-AzGraphServicesAccount
99

1010
## SYNOPSIS
11-
Create or update account resource.
11+
create account resource.
1212

1313
## SYNTAX
1414

15+
### CreateExpanded (Default)
1516
```
1617
New-AzGraphServicesAccount -Name <String> -ResourceGroupName <String> -AppId <String>
1718
[-SubscriptionId <String>] [-Location <String>] [-Tag <Hashtable>] [-DefaultProfile <PSObject>] [-AsJob]
1819
[-NoWait] [-Confirm] [-WhatIf] [<CommonParameters>]
1920
```
2021

22+
### CreateViaJsonFilePath
23+
```
24+
New-AzGraphServicesAccount -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
25+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
26+
[<CommonParameters>]
27+
```
28+
29+
### CreateViaJsonString
30+
```
31+
New-AzGraphServicesAccount -Name <String> -ResourceGroupName <String> -JsonString <String>
32+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
33+
[<CommonParameters>]
34+
```
35+
2136
## DESCRIPTION
22-
Create or update account resource.
37+
create account resource.
2338

2439
## EXAMPLES
2540

@@ -43,7 +58,7 @@ Customer owned application ID
4358

4459
```yaml
4560
Type: System.String
46-
Parameter Sets: (All)
61+
Parameter Sets: CreateExpanded
4762
Aliases:
4863

4964
Required: True
@@ -84,12 +99,42 @@ Accept pipeline input: False
8499
Accept wildcard characters: False
85100
```
86101
102+
### -JsonFilePath
103+
Path of Json file supplied to the Create operation
104+
105+
```yaml
106+
Type: System.String
107+
Parameter Sets: CreateViaJsonFilePath
108+
Aliases:
109+
110+
Required: True
111+
Position: Named
112+
Default value: None
113+
Accept pipeline input: False
114+
Accept wildcard characters: False
115+
```
116+
117+
### -JsonString
118+
Json string supplied to the Create operation
119+
120+
```yaml
121+
Type: System.String
122+
Parameter Sets: CreateViaJsonString
123+
Aliases:
124+
125+
Required: True
126+
Position: Named
127+
Default value: None
128+
Accept pipeline input: False
129+
Accept wildcard characters: False
130+
```
131+
87132
### -Location
88133
Location of the resource.
89134
90135
```yaml
91136
Type: System.String
92-
Parameter Sets: (All)
137+
Parameter Sets: CreateExpanded
93138
Aliases:
94139

95140
Required: False
@@ -165,7 +210,7 @@ resource tags.
165210
166211
```yaml
167212
Type: System.Collections.Hashtable
168-
Parameter Sets: (All)
213+
Parameter Sets: CreateExpanded
169214
Aliases:
170215

171216
Required: False
@@ -213,7 +258,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
213258
214259
## OUTPUTS
215260
216-
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.Api20230413.IAccountResource
261+
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IAccountResource
217262
218263
## NOTES
219264

src/GraphServices/GraphServices.Autorest/docs/Remove-AzGraphServicesAccount.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Accept wildcard characters: False
5656
5757
### -InputObject
5858
Identity Parameter
59-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
6059
6160
```yaml
6261
Type: Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IGraphServicesIdentity

src/GraphServices/GraphServices.Autorest/docs/Update-AzGraphServicesAccount.md

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Update-AzGraphServicesAccount
99

1010
## SYNOPSIS
11-
Update account details.
11+
update account details.
1212

1313
## SYNTAX
1414

@@ -24,8 +24,20 @@ Update-AzGraphServicesAccount -InputObject <IGraphServicesIdentity> [-Tag <Hasht
2424
[-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
2525
```
2626

27+
### UpdateViaJsonFilePath
28+
```
29+
Update-AzGraphServicesAccount -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
30+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
31+
```
32+
33+
### UpdateViaJsonString
34+
```
35+
Update-AzGraphServicesAccount -Name <String> -ResourceGroupName <String> -JsonString <String>
36+
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-Confirm] [-WhatIf] [<CommonParameters>]
37+
```
38+
2739
## DESCRIPTION
28-
Update account details.
40+
update account details.
2941

3042
## EXAMPLES
3143

@@ -62,7 +74,6 @@ Accept wildcard characters: False
6274
6375
### -InputObject
6476
Identity Parameter
65-
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
6677
6778
```yaml
6879
Type: Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IGraphServicesIdentity
@@ -76,12 +87,42 @@ Accept pipeline input: True (ByValue)
7687
Accept wildcard characters: False
7788
```
7889
90+
### -JsonFilePath
91+
Path of Json file supplied to the Update operation
92+
93+
```yaml
94+
Type: System.String
95+
Parameter Sets: UpdateViaJsonFilePath
96+
Aliases:
97+
98+
Required: True
99+
Position: Named
100+
Default value: None
101+
Accept pipeline input: False
102+
Accept wildcard characters: False
103+
```
104+
105+
### -JsonString
106+
Json string supplied to the Update operation
107+
108+
```yaml
109+
Type: System.String
110+
Parameter Sets: UpdateViaJsonString
111+
Aliases:
112+
113+
Required: True
114+
Position: Named
115+
Default value: None
116+
Accept pipeline input: False
117+
Accept wildcard characters: False
118+
```
119+
79120
### -Name
80121
The name of the resource.
81122
82123
```yaml
83124
Type: System.String
84-
Parameter Sets: UpdateExpanded
125+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
85126
Aliases:
86127

87128
Required: True
@@ -97,7 +138,7 @@ The name is case insensitive.
97138
98139
```yaml
99140
Type: System.String
100-
Parameter Sets: UpdateExpanded
141+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
101142
Aliases:
102143

103144
Required: True
@@ -112,7 +153,7 @@ The ID of the target subscription.
112153
113154
```yaml
114155
Type: System.String
115-
Parameter Sets: UpdateExpanded
156+
Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString
116157
Aliases:
117158

118159
Required: False
@@ -128,7 +169,7 @@ This will overwrite the existing tags.
128169
129170
```yaml
130171
Type: System.Collections.Hashtable
131-
Parameter Sets: (All)
172+
Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded
132173
Aliases:
133174

134175
Required: False
@@ -178,7 +219,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
178219
179220
## OUTPUTS
180221
181-
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.Api20230413.IAccountResource
222+
### Microsoft.Azure.PowerShell.Cmdlets.GraphServices.Models.IAccountResource
182223
183224
## NOTES
184225
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "343866ca-7f55-4a27-a35a-060a45182b45"
2+
"generate_Id": "1f1360b3-1041-4f4b-98ed-90b16ac1849a"
33
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Resources
2+
This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder.
3+
4+
## Info
5+
- Modifiable: yes
6+
- Generated: no
7+
- Committed: yes
8+
- Packaged: no
9+
10+
## Purpose
11+
Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact.

0 commit comments

Comments
 (0)