Skip to content

Commit 1a1314d

Browse files
koderjokerKanchan JoshiDarfeikusMECHANDRHiImOscarin
authored
Azure RedisCache New Api v2023.08.01 (#23823)
* Add generated files * Add microsoft entra authentication creat and update tests * Added updateChannel parameter for Get and Create Redis Cache * Add update channel patch operation Redis Cache * Revert changes to update parameters * Add cmdlets and recording for access policy and access policy assignments * Add help docs * Update date * Add help.md with update channel * Add flush cmdlet * Add tests * Update channel tests * Rename cmdlet to Clear-AzRedisCache * Revert changes to identation * Revert changes to identation * Revert changes to identation * Revert changes from code cleanup * Review * Add recordings * Correct assertions * Update help * Update tests and recordings * Update help docs * Add online version * Change Permissions to Permission * Update aad cmdlets * Update flush cmdlet * Update help text * Add default parameter for get --------- Co-authored-by: Kanchan Joshi <[email protected]> Co-authored-by: Darfeikus <[email protected]> Co-authored-by: Meghraj Chandrakanth <[email protected]> Co-authored-by: Oscar Barbosa <[email protected]> Co-authored-by: Lei jin <[email protected]>
1 parent bf3ae17 commit 1a1314d

File tree

115 files changed

+43985
-11526
lines changed

Some content is hidden

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

115 files changed

+43985
-11526
lines changed

src/RedisCache/RedisCache.Management.Sdk/Generated/AccessPolicyAssignmentOperations.cs

Lines changed: 1294 additions & 0 deletions
Large diffs are not rendered by default.

src/RedisCache/RedisCache.Management.Sdk/Generated/AccessPolicyAssignmentOperationsExtensions.cs

Lines changed: 313 additions & 0 deletions
Large diffs are not rendered by default.

src/RedisCache/RedisCache.Management.Sdk/Generated/AccessPolicyOperations.cs

Lines changed: 1291 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
namespace Microsoft.Azure.Management.RedisCache
6+
{
7+
using Microsoft.Rest.Azure;
8+
using Models;
9+
10+
/// <summary>
11+
/// Extension methods for AccessPolicyOperations
12+
/// </summary>
13+
public static partial class AccessPolicyOperationsExtensions
14+
{
15+
/// <summary>
16+
/// Adds an access policy to the redis cache
17+
/// </summary>
18+
/// <param name='operations'>
19+
/// The operations group for this extension method.
20+
/// </param>
21+
/// <param name='resourceGroupName'>
22+
/// The name of the resource group. The name is case insensitive.
23+
/// </param>
24+
/// <param name='cacheName'>
25+
/// The name of the Redis cache.
26+
/// </param>
27+
/// <param name='accessPolicyName'>
28+
/// The name of the access policy that is being added to the Redis cache.
29+
/// </param>
30+
public static RedisCacheAccessPolicy CreateUpdate(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, string permissions = default(string))
31+
{
32+
return ((IAccessPolicyOperations)operations).CreateUpdateAsync(resourceGroupName, cacheName, accessPolicyName, permissions).GetAwaiter().GetResult();
33+
}
34+
35+
/// <summary>
36+
/// Adds an access policy to the redis cache
37+
/// </summary>
38+
/// <param name='operations'>
39+
/// The operations group for this extension method.
40+
/// </param>
41+
/// <param name='resourceGroupName'>
42+
/// The name of the resource group. The name is case insensitive.
43+
/// </param>
44+
/// <param name='cacheName'>
45+
/// The name of the Redis cache.
46+
/// </param>
47+
/// <param name='accessPolicyName'>
48+
/// The name of the access policy that is being added to the Redis cache.
49+
/// </param>
50+
/// <param name='cancellationToken'>
51+
/// The cancellation token.
52+
/// </param>
53+
public static async System.Threading.Tasks.Task<RedisCacheAccessPolicy> CreateUpdateAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, string permissions = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
54+
{
55+
using (var _result = await operations.CreateUpdateWithHttpMessagesAsync(resourceGroupName, cacheName, accessPolicyName, permissions, null, cancellationToken).ConfigureAwait(false))
56+
{
57+
return _result.Body;
58+
}
59+
}
60+
/// <summary>
61+
/// Deletes the access policy from a redis cache
62+
/// </summary>
63+
/// <param name='operations'>
64+
/// The operations group for this extension method.
65+
/// </param>
66+
/// <param name='resourceGroupName'>
67+
/// The name of the resource group. The name is case insensitive.
68+
/// </param>
69+
/// <param name='cacheName'>
70+
/// The name of the Redis cache.
71+
/// </param>
72+
/// <param name='accessPolicyName'>
73+
/// The name of the access policy that is being added to the Redis cache.
74+
/// </param>
75+
public static AccessPolicyDeleteHeaders Delete(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName)
76+
{
77+
return ((IAccessPolicyOperations)operations).DeleteAsync(resourceGroupName, cacheName, accessPolicyName).GetAwaiter().GetResult();
78+
}
79+
80+
/// <summary>
81+
/// Deletes the access policy from a redis cache
82+
/// </summary>
83+
/// <param name='operations'>
84+
/// The operations group for this extension method.
85+
/// </param>
86+
/// <param name='resourceGroupName'>
87+
/// The name of the resource group. The name is case insensitive.
88+
/// </param>
89+
/// <param name='cacheName'>
90+
/// The name of the Redis cache.
91+
/// </param>
92+
/// <param name='accessPolicyName'>
93+
/// The name of the access policy that is being added to the Redis cache.
94+
/// </param>
95+
/// <param name='cancellationToken'>
96+
/// The cancellation token.
97+
/// </param>
98+
public static async System.Threading.Tasks.Task<AccessPolicyDeleteHeaders> DeleteAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
99+
{
100+
using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, cacheName, accessPolicyName, null, cancellationToken).ConfigureAwait(false))
101+
{
102+
return _result.Headers;
103+
}
104+
}
105+
/// <summary>
106+
/// Gets the detailed information about an access policy of a redis cache
107+
/// </summary>
108+
/// <param name='operations'>
109+
/// The operations group for this extension method.
110+
/// </param>
111+
/// <param name='resourceGroupName'>
112+
/// The name of the resource group. The name is case insensitive.
113+
/// </param>
114+
/// <param name='cacheName'>
115+
/// The name of the Redis cache.
116+
/// </param>
117+
/// <param name='accessPolicyName'>
118+
/// The name of the access policy that is being added to the Redis cache.
119+
/// </param>
120+
public static RedisCacheAccessPolicy Get(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName)
121+
{
122+
return ((IAccessPolicyOperations)operations).GetAsync(resourceGroupName, cacheName, accessPolicyName).GetAwaiter().GetResult();
123+
}
124+
125+
/// <summary>
126+
/// Gets the detailed information about an access policy of a redis cache
127+
/// </summary>
128+
/// <param name='operations'>
129+
/// The operations group for this extension method.
130+
/// </param>
131+
/// <param name='resourceGroupName'>
132+
/// The name of the resource group. The name is case insensitive.
133+
/// </param>
134+
/// <param name='cacheName'>
135+
/// The name of the Redis cache.
136+
/// </param>
137+
/// <param name='accessPolicyName'>
138+
/// The name of the access policy that is being added to the Redis cache.
139+
/// </param>
140+
/// <param name='cancellationToken'>
141+
/// The cancellation token.
142+
/// </param>
143+
public static async System.Threading.Tasks.Task<RedisCacheAccessPolicy> GetAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
144+
{
145+
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, cacheName, accessPolicyName, null, cancellationToken).ConfigureAwait(false))
146+
{
147+
return _result.Body;
148+
}
149+
}
150+
/// <summary>
151+
/// Gets the list of access policies associated with this redis cache
152+
/// </summary>
153+
/// <param name='operations'>
154+
/// The operations group for this extension method.
155+
/// </param>
156+
/// <param name='resourceGroupName'>
157+
/// The name of the resource group. The name is case insensitive.
158+
/// </param>
159+
/// <param name='cacheName'>
160+
/// The name of the Redis cache.
161+
/// </param>
162+
public static Microsoft.Rest.Azure.IPage<RedisCacheAccessPolicy> List(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName)
163+
{
164+
return ((IAccessPolicyOperations)operations).ListAsync(resourceGroupName, cacheName).GetAwaiter().GetResult();
165+
}
166+
167+
/// <summary>
168+
/// Gets the list of access policies associated with this redis cache
169+
/// </summary>
170+
/// <param name='operations'>
171+
/// The operations group for this extension method.
172+
/// </param>
173+
/// <param name='resourceGroupName'>
174+
/// The name of the resource group. The name is case insensitive.
175+
/// </param>
176+
/// <param name='cacheName'>
177+
/// The name of the Redis cache.
178+
/// </param>
179+
/// <param name='cancellationToken'>
180+
/// The cancellation token.
181+
/// </param>
182+
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<RedisCacheAccessPolicy>> ListAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
183+
{
184+
using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, cacheName, null, cancellationToken).ConfigureAwait(false))
185+
{
186+
return _result.Body;
187+
}
188+
}
189+
/// <summary>
190+
/// Adds an access policy to the redis cache
191+
/// </summary>
192+
/// <param name='operations'>
193+
/// The operations group for this extension method.
194+
/// </param>
195+
/// <param name='resourceGroupName'>
196+
/// The name of the resource group. The name is case insensitive.
197+
/// </param>
198+
/// <param name='cacheName'>
199+
/// The name of the Redis cache.
200+
/// </param>
201+
/// <param name='accessPolicyName'>
202+
/// The name of the access policy that is being added to the Redis cache.
203+
/// </param>
204+
public static RedisCacheAccessPolicy BeginCreateUpdate(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, string permissions = default(string))
205+
{
206+
return ((IAccessPolicyOperations)operations).BeginCreateUpdateAsync(resourceGroupName, cacheName, accessPolicyName, permissions).GetAwaiter().GetResult();
207+
}
208+
209+
/// <summary>
210+
/// Adds an access policy to the redis cache
211+
/// </summary>
212+
/// <param name='operations'>
213+
/// The operations group for this extension method.
214+
/// </param>
215+
/// <param name='resourceGroupName'>
216+
/// The name of the resource group. The name is case insensitive.
217+
/// </param>
218+
/// <param name='cacheName'>
219+
/// The name of the Redis cache.
220+
/// </param>
221+
/// <param name='accessPolicyName'>
222+
/// The name of the access policy that is being added to the Redis cache.
223+
/// </param>
224+
/// <param name='cancellationToken'>
225+
/// The cancellation token.
226+
/// </param>
227+
public static async System.Threading.Tasks.Task<RedisCacheAccessPolicy> BeginCreateUpdateAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, string permissions = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
228+
{
229+
using (var _result = await operations.BeginCreateUpdateWithHttpMessagesAsync(resourceGroupName, cacheName, accessPolicyName, permissions, null, cancellationToken).ConfigureAwait(false))
230+
{
231+
return _result.Body;
232+
}
233+
}
234+
/// <summary>
235+
/// Deletes the access policy from a redis cache
236+
/// </summary>
237+
/// <param name='operations'>
238+
/// The operations group for this extension method.
239+
/// </param>
240+
/// <param name='resourceGroupName'>
241+
/// The name of the resource group. The name is case insensitive.
242+
/// </param>
243+
/// <param name='cacheName'>
244+
/// The name of the Redis cache.
245+
/// </param>
246+
/// <param name='accessPolicyName'>
247+
/// The name of the access policy that is being added to the Redis cache.
248+
/// </param>
249+
public static AccessPolicyDeleteHeaders BeginDelete(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName)
250+
{
251+
return ((IAccessPolicyOperations)operations).BeginDeleteAsync(resourceGroupName, cacheName, accessPolicyName).GetAwaiter().GetResult();
252+
}
253+
254+
/// <summary>
255+
/// Deletes the access policy from a redis cache
256+
/// </summary>
257+
/// <param name='operations'>
258+
/// The operations group for this extension method.
259+
/// </param>
260+
/// <param name='resourceGroupName'>
261+
/// The name of the resource group. The name is case insensitive.
262+
/// </param>
263+
/// <param name='cacheName'>
264+
/// The name of the Redis cache.
265+
/// </param>
266+
/// <param name='accessPolicyName'>
267+
/// The name of the access policy that is being added to the Redis cache.
268+
/// </param>
269+
/// <param name='cancellationToken'>
270+
/// The cancellation token.
271+
/// </param>
272+
public static async System.Threading.Tasks.Task<AccessPolicyDeleteHeaders> BeginDeleteAsync(this IAccessPolicyOperations operations, string resourceGroupName, string cacheName, string accessPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
273+
{
274+
using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, cacheName, accessPolicyName, null, cancellationToken).ConfigureAwait(false))
275+
{
276+
return _result.Headers;
277+
}
278+
}
279+
/// <summary>
280+
/// Gets the list of access policies associated with this redis cache
281+
/// </summary>
282+
/// <param name='operations'>
283+
/// The operations group for this extension method.
284+
/// </param>
285+
/// <param name='nextPageLink'>
286+
/// The NextLink from the previous successful call to List operation.
287+
/// </param>
288+
public static Microsoft.Rest.Azure.IPage<RedisCacheAccessPolicy> ListNext(this IAccessPolicyOperations operations, string nextPageLink)
289+
{
290+
return ((IAccessPolicyOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult();
291+
}
292+
293+
/// <summary>
294+
/// Gets the list of access policies associated with this redis cache
295+
/// </summary>
296+
/// <param name='operations'>
297+
/// The operations group for this extension method.
298+
/// </param>
299+
/// <param name='nextPageLink'>
300+
/// The NextLink from the previous successful call to List operation.
301+
/// </param>
302+
/// <param name='cancellationToken'>
303+
/// The cancellation token.
304+
/// </param>
305+
public static async System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<RedisCacheAccessPolicy>> ListNextAsync(this IAccessPolicyOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
306+
{
307+
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
308+
{
309+
return _result.Body;
310+
}
311+
}
312+
}
313+
}

src/RedisCache/RedisCache.Management.Sdk/Generated/AsyncOperationStatusOperations.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,13 @@ internal AsyncOperationStatusOperations (RedisManagementClient client)
9393
{
9494
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
9595
}
96-
96+
if (this.Client.SubscriptionId != null)
97+
{
98+
if (this.Client.SubscriptionId.Length < 1)
99+
{
100+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1);
101+
}
102+
}
97103
// Tracing
98104
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
99105
string _invocationId = null;

0 commit comments

Comments
 (0)