Skip to content

Commit 4d5d02f

Browse files
mumoryanRyan Ren
andauthored
Update Microsoft.Authorization api version for Get-RoleDefinition 2 (#23263)
* Update Microsoft.Authorization api version for Get-RoleDefinition 2 * update --------- Co-authored-by: Ryan Ren <[email protected]>
1 parent 1420f68 commit 4d5d02f

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

+5103
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<PsModuleName>Resources</PsModuleName>
4+
</PropertyGroup>
5+
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
6+
<PropertyGroup>
7+
<TargetFramework>netstandard2.0</TargetFramework>
8+
<AssemblyName>Microsoft.Azure.PowerShell.Authorization.Management.Sdk</AssemblyName>
9+
<RootNamespace>Microsoft.Azure.Management.Authorization</RootNamespace>
10+
<NoWarn>$(NoWarn);CS0108;CS1573</NoWarn>
11+
</PropertyGroup>
12+
<Import
13+
Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
14+
</Project>
Lines changed: 372 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,372 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft Corporation. All rights reserved.
3+
// Licensed under the MIT License. See License.txt in the project root for
4+
// license information.
5+
//
6+
// Code generated by Microsoft (R) AutoRest Code Generator.
7+
// Changes may cause incorrect behavior and will be lost if the code is
8+
// regenerated.
9+
// </auto-generated>
10+
11+
namespace Microsoft.Authorization
12+
{
13+
using Microsoft.Rest;
14+
using Microsoft.Rest.Azure;
15+
using Microsoft.Rest.Serialization;
16+
using Models;
17+
using Newtonsoft.Json;
18+
using System.Collections;
19+
using System.Collections.Generic;
20+
using System.Linq;
21+
using System.Net;
22+
using System.Net.Http;
23+
24+
/// <summary>
25+
/// Role based access control provides you a way to apply granular level
26+
/// policy administration down to individual resources or resource groups.
27+
/// These operations allow you to manage role definitions. A role
28+
/// definition describes the set of actions that can be performed on
29+
/// resources.
30+
/// </summary>
31+
public partial class AuthorizationManagementClient : ServiceClient<AuthorizationManagementClient>, IAuthorizationManagementClient, IAzureClient
32+
{
33+
/// <summary>
34+
/// The base URI of the service.
35+
/// </summary>
36+
public System.Uri BaseUri { get; set; }
37+
38+
/// <summary>
39+
/// Gets or sets json serialization settings.
40+
/// </summary>
41+
public JsonSerializerSettings SerializationSettings { get; private set; }
42+
43+
/// <summary>
44+
/// Gets or sets json deserialization settings.
45+
/// </summary>
46+
public JsonSerializerSettings DeserializationSettings { get; private set; }
47+
48+
/// <summary>
49+
/// Credentials needed for the client to connect to Azure.
50+
/// </summary>
51+
public ServiceClientCredentials Credentials { get; private set; }
52+
53+
/// <summary>
54+
/// The API version to use for this operation.
55+
/// </summary>
56+
public string ApiVersion { get; private set; }
57+
58+
/// <summary>
59+
/// The ID of the target subscription.
60+
/// </summary>
61+
public string SubscriptionId { get; set; }
62+
63+
/// <summary>
64+
/// The preferred language for the response.
65+
/// </summary>
66+
public string AcceptLanguage { get; set; }
67+
68+
/// <summary>
69+
/// The retry timeout in seconds for Long Running Operations. Default value is
70+
/// 30.
71+
/// </summary>
72+
public int? LongRunningOperationRetryTimeout { get; set; }
73+
74+
/// <summary>
75+
/// Whether a unique x-ms-client-request-id should be generated. When set to
76+
/// true a unique x-ms-client-request-id value is generated and included in
77+
/// each request. Default is true.
78+
/// </summary>
79+
public bool? GenerateClientRequestId { get; set; }
80+
81+
/// <summary>
82+
/// Gets the IPermissionsOperations.
83+
/// </summary>
84+
public virtual IPermissionsOperations Permissions { get; private set; }
85+
86+
/// <summary>
87+
/// Gets the IRoleDefinitionsOperations.
88+
/// </summary>
89+
public virtual IRoleDefinitionsOperations RoleDefinitions { get; private set; }
90+
91+
/// <summary>
92+
/// Initializes a new instance of the AuthorizationManagementClient class.
93+
/// </summary>
94+
/// <param name='httpClient'>
95+
/// HttpClient to be used
96+
/// </param>
97+
/// <param name='disposeHttpClient'>
98+
/// True: will dispose the provided httpClient on calling AuthorizationManagementClient.Dispose(). False: will not dispose provided httpClient</param>
99+
protected AuthorizationManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
100+
{
101+
Initialize();
102+
}
103+
104+
/// <summary>
105+
/// Initializes a new instance of the AuthorizationManagementClient class.
106+
/// </summary>
107+
/// <param name='handlers'>
108+
/// Optional. The delegating handlers to add to the http client pipeline.
109+
/// </param>
110+
protected AuthorizationManagementClient(params DelegatingHandler[] handlers) : base(handlers)
111+
{
112+
Initialize();
113+
}
114+
115+
/// <summary>
116+
/// Initializes a new instance of the AuthorizationManagementClient class.
117+
/// </summary>
118+
/// <param name='rootHandler'>
119+
/// Optional. The http client handler used to handle http transport.
120+
/// </param>
121+
/// <param name='handlers'>
122+
/// Optional. The delegating handlers to add to the http client pipeline.
123+
/// </param>
124+
protected AuthorizationManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
125+
{
126+
Initialize();
127+
}
128+
129+
/// <summary>
130+
/// Initializes a new instance of the AuthorizationManagementClient class.
131+
/// </summary>
132+
/// <param name='baseUri'>
133+
/// Optional. The base URI of the service.
134+
/// </param>
135+
/// <param name='handlers'>
136+
/// Optional. The delegating handlers to add to the http client pipeline.
137+
/// </param>
138+
/// <exception cref="System.ArgumentNullException">
139+
/// Thrown when a required parameter is null
140+
/// </exception>
141+
protected AuthorizationManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
142+
{
143+
if (baseUri == null)
144+
{
145+
throw new System.ArgumentNullException("baseUri");
146+
}
147+
BaseUri = baseUri;
148+
}
149+
150+
/// <summary>
151+
/// Initializes a new instance of the AuthorizationManagementClient class.
152+
/// </summary>
153+
/// <param name='baseUri'>
154+
/// Optional. The base URI of the service.
155+
/// </param>
156+
/// <param name='rootHandler'>
157+
/// Optional. The http client handler used to handle http transport.
158+
/// </param>
159+
/// <param name='handlers'>
160+
/// Optional. The delegating handlers to add to the http client pipeline.
161+
/// </param>
162+
/// <exception cref="System.ArgumentNullException">
163+
/// Thrown when a required parameter is null
164+
/// </exception>
165+
protected AuthorizationManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
166+
{
167+
if (baseUri == null)
168+
{
169+
throw new System.ArgumentNullException("baseUri");
170+
}
171+
BaseUri = baseUri;
172+
}
173+
174+
/// <summary>
175+
/// Initializes a new instance of the AuthorizationManagementClient class.
176+
/// </summary>
177+
/// <param name='credentials'>
178+
/// Required. Credentials needed for the client to connect to Azure.
179+
/// </param>
180+
/// <param name='handlers'>
181+
/// Optional. The delegating handlers to add to the http client pipeline.
182+
/// </param>
183+
/// <exception cref="System.ArgumentNullException">
184+
/// Thrown when a required parameter is null
185+
/// </exception>
186+
public AuthorizationManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
187+
{
188+
if (credentials == null)
189+
{
190+
throw new System.ArgumentNullException("credentials");
191+
}
192+
Credentials = credentials;
193+
if (Credentials != null)
194+
{
195+
Credentials.InitializeServiceClient(this);
196+
}
197+
}
198+
199+
/// <summary>
200+
/// Initializes a new instance of the AuthorizationManagementClient class.
201+
/// </summary>
202+
/// <param name='credentials'>
203+
/// Required. Credentials needed for the client to connect to Azure.
204+
/// </param>
205+
/// <param name='httpClient'>
206+
/// HttpClient to be used
207+
/// </param>
208+
/// <param name='disposeHttpClient'>
209+
/// True: will dispose the provided httpClient on calling AuthorizationManagementClient.Dispose(). False: will not dispose provided httpClient</param>
210+
/// <exception cref="System.ArgumentNullException">
211+
/// Thrown when a required parameter is null
212+
/// </exception>
213+
public AuthorizationManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
214+
{
215+
if (credentials == null)
216+
{
217+
throw new System.ArgumentNullException("credentials");
218+
}
219+
Credentials = credentials;
220+
if (Credentials != null)
221+
{
222+
Credentials.InitializeServiceClient(this);
223+
}
224+
}
225+
226+
/// <summary>
227+
/// Initializes a new instance of the AuthorizationManagementClient class.
228+
/// </summary>
229+
/// <param name='credentials'>
230+
/// Required. Credentials needed for the client to connect to Azure.
231+
/// </param>
232+
/// <param name='rootHandler'>
233+
/// Optional. The http client handler used to handle http transport.
234+
/// </param>
235+
/// <param name='handlers'>
236+
/// Optional. The delegating handlers to add to the http client pipeline.
237+
/// </param>
238+
/// <exception cref="System.ArgumentNullException">
239+
/// Thrown when a required parameter is null
240+
/// </exception>
241+
public AuthorizationManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
242+
{
243+
if (credentials == null)
244+
{
245+
throw new System.ArgumentNullException("credentials");
246+
}
247+
Credentials = credentials;
248+
if (Credentials != null)
249+
{
250+
Credentials.InitializeServiceClient(this);
251+
}
252+
}
253+
254+
/// <summary>
255+
/// Initializes a new instance of the AuthorizationManagementClient class.
256+
/// </summary>
257+
/// <param name='baseUri'>
258+
/// Optional. The base URI of the service.
259+
/// </param>
260+
/// <param name='credentials'>
261+
/// Required. Credentials needed for the client to connect to Azure.
262+
/// </param>
263+
/// <param name='handlers'>
264+
/// Optional. The delegating handlers to add to the http client pipeline.
265+
/// </param>
266+
/// <exception cref="System.ArgumentNullException">
267+
/// Thrown when a required parameter is null
268+
/// </exception>
269+
public AuthorizationManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
270+
{
271+
if (baseUri == null)
272+
{
273+
throw new System.ArgumentNullException("baseUri");
274+
}
275+
if (credentials == null)
276+
{
277+
throw new System.ArgumentNullException("credentials");
278+
}
279+
BaseUri = baseUri;
280+
Credentials = credentials;
281+
if (Credentials != null)
282+
{
283+
Credentials.InitializeServiceClient(this);
284+
}
285+
}
286+
287+
/// <summary>
288+
/// Initializes a new instance of the AuthorizationManagementClient class.
289+
/// </summary>
290+
/// <param name='baseUri'>
291+
/// Optional. The base URI of the service.
292+
/// </param>
293+
/// <param name='credentials'>
294+
/// Required. Credentials needed for the client to connect to Azure.
295+
/// </param>
296+
/// <param name='rootHandler'>
297+
/// Optional. The http client handler used to handle http transport.
298+
/// </param>
299+
/// <param name='handlers'>
300+
/// Optional. The delegating handlers to add to the http client pipeline.
301+
/// </param>
302+
/// <exception cref="System.ArgumentNullException">
303+
/// Thrown when a required parameter is null
304+
/// </exception>
305+
public AuthorizationManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
306+
{
307+
if (baseUri == null)
308+
{
309+
throw new System.ArgumentNullException("baseUri");
310+
}
311+
if (credentials == null)
312+
{
313+
throw new System.ArgumentNullException("credentials");
314+
}
315+
BaseUri = baseUri;
316+
Credentials = credentials;
317+
if (Credentials != null)
318+
{
319+
Credentials.InitializeServiceClient(this);
320+
}
321+
}
322+
323+
/// <summary>
324+
/// An optional partial-method to perform custom initialization.
325+
/// </summary>
326+
partial void CustomInitialize();
327+
/// <summary>
328+
/// Initializes client properties.
329+
/// </summary>
330+
private void Initialize()
331+
{
332+
Permissions = new PermissionsOperations(this);
333+
RoleDefinitions = new RoleDefinitionsOperations(this);
334+
BaseUri = new System.Uri("https://management.azure.com");
335+
ApiVersion = "2022-05-01-preview";
336+
AcceptLanguage = "en-US";
337+
LongRunningOperationRetryTimeout = 30;
338+
GenerateClientRequestId = true;
339+
SerializationSettings = new JsonSerializerSettings
340+
{
341+
Formatting = Newtonsoft.Json.Formatting.Indented,
342+
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
343+
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
344+
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
345+
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
346+
ContractResolver = new ReadOnlyJsonContractResolver(),
347+
Converters = new List<JsonConverter>
348+
{
349+
new Iso8601TimeSpanConverter()
350+
}
351+
};
352+
SerializationSettings.Converters.Add(new TransformationJsonConverter());
353+
DeserializationSettings = new JsonSerializerSettings
354+
{
355+
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
356+
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
357+
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
358+
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
359+
ContractResolver = new ReadOnlyJsonContractResolver(),
360+
Converters = new List<JsonConverter>
361+
{
362+
new Iso8601TimeSpanConverter()
363+
}
364+
};
365+
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<RoleManagementPolicyRule>("ruleType"));
366+
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<RoleManagementPolicyRule>("ruleType"));
367+
CustomInitialize();
368+
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
369+
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
370+
}
371+
}
372+
}

0 commit comments

Comments
 (0)