@@ -43,13 +43,24 @@ module-version: 1.0.0
4343title : RedisEnterpriseCache
4444subject-prefix : ' RedisEnterpriseCache'
4545
46- # This will remove the 'RedisEnterprise' prefix from the subject of every cmdlet
47- # beginning with 'RedisEnterprise', because we have already set the subject-prefix above
48- # For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
49- use-extension :
50- " @autorest/powershell " : " 3.x"
51-
5246directive :
47+ - from : swagger-document
48+ where : $.definitions.AccessPolicyAssignment
49+ transform : $['required'] = ['properties']
50+ - from : swagger-document
51+ where : $.definitions.AccessPolicyAssignmentProperties.properties.user
52+ transform : $['required'] = ['objectId']
53+ - from : swagger-document
54+ where : $.definitions.ForceLinkParameters.properties.geoReplication
55+ transform : $['required'] = ['linkedDatabases','groupNickname']
56+
57+ - from : swagger-document
58+ where : $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}"].put
59+ transform : $['operationId'] = 'AccessPolicyAssignment_CreateOrUpdate'
60+ - from : swagger-document
61+ where : $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}"].put
62+ transform : $['description'] = 'Create a particular access policy assignment for a database'
63+
5364 # This will remove the 'RedisEnterprise' prefix from the subject of every cmdlet
5465 # beginning with 'RedisEnterprise', because we have already set the subject-prefix above
5566 - where :
@@ -80,11 +91,6 @@ directive:
8091 alias :
8192 - Get-AzRedisEnterpriseCacheDatabaseKey
8293 - Get-AzRedisEnterpriseCacheAccessKey
83- - where :
84- verb : New
85- subject : AccessPolicyAssignmentUpdate
86- set :
87- subject : AccessPolicyAssignment
8894 - where :
8995 verb : Import|Export
9096 subject : (^Database)(.*)
@@ -208,15 +214,24 @@ directive:
208214 subject : Key
209215 variant : ^Regenerate$|ViaIdentity
210216 remove : true
217+
218+ # Remove unexpanded variant
211219 - where :
212- verb : New
213- subject : ^$|Database
214- variant : ^Create$|ViaIdentity
220+ verb : Invoke
221+ variant : ^(Flush|Force)(?!.*?(Expanded|JsonFilePath|JsonString))
215222 remove : true
216223 - where :
217- verb : Update
218224 subject : ^$|Database
219- variant : ^Update$|ViaIdentity$
225+ variant : ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
226+ remove : true
227+ - where :
228+ subject : AccessPolicyAssignment
229+ variant : ^(Create)(?!.*?(Expanded|JsonFilePath|JsonString))
230+ remove : true
231+ # Remove because cannot update
232+ - where :
233+ verb : Set|Update
234+ subject : AccessPolicyAssignment
220235 remove : true
221236
222237 # Hide cmdlets
@@ -244,17 +259,6 @@ directive:
244259 set :
245260 default :
246261 script : ' "default"'
247-
248- - from : swagger-document
249- where : $.definitions.AccessPolicyAssignment
250- transform : $['required'] = ['properties']
251- - from : swagger-document
252- where : $.definitions.AccessPolicyAssignmentProperties.properties.user
253- transform : $['required'] = ['objectId']
254- - from : swagger-document
255- where : $.definitions.ForceLinkParameters.properties.geoReplication
256- transform : $['required'] = ['linkedDatabases','groupNickname']
257-
258262 # DatabaseName parameter to have value 'default'
259263 - where :
260264 verb : Invoke
@@ -265,9 +269,9 @@ directive:
265269 default :
266270 script : ' "default"'
267271 # Fix bugs in generated code from namespace conflict
268- - from : source-file-csharp
269- where : $
270- transform : $ = $.replace(/Origin\(System.Convert.ToString\(/g, 'Origin(global::System.Convert.ToString(');
272+ # - from: source-file-csharp
273+ # where: $
274+ # transform: $ = $.replace(/Origin\(System.Convert.ToString\(/g, 'Origin(global::System.Convert.ToString(');
271275 - from : source-file-csharp
272276 where : $
273277 transform : $ = $.replace(/Module.Instance.SetProxyConfiguration\(/g, 'Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Module.Instance.SetProxyConfiguration(');
0 commit comments