Skip to content

Commit 5db48fb

Browse files
azure-pipelines[bot]azure-powershell-botLei jin
authored
Migrate RedisEnterpriseCache from generation to main (#26144)
* Move RedisEnterpriseCache to main * Add change log for RedisEnterpriseCache --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Lei jin <[email protected]>
1 parent 7c138b4 commit 5db48fb

File tree

383 files changed

+24242
-9334
lines changed

Some content is hidden

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

383 files changed

+24242
-9334
lines changed

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Az.RedisEnterpriseCache.format.ps1xml

Lines changed: 270 additions & 312 deletions
Large diffs are not rendered by default.

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/Az.RedisEnterpriseCache.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.RedisEnterpriseCache.private.dll'
1313
FormatsToProcess = './Az.RedisEnterpriseCache.format.ps1xml'
14-
FunctionsToExport = 'Export-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheKey', 'Get-AzRedisEnterpriseCacheOperationStatus', 'Import-AzRedisEnterpriseCache', 'Invoke-AzRedisEnterpriseCacheDatabaseFlush', 'Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink', 'New-AzRedisEnterpriseCache', 'New-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheKey', 'Remove-AzRedisEnterpriseCache', 'Remove-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCache', 'Update-AzRedisEnterpriseCacheDatabase', '*'
14+
FunctionsToExport = 'Export-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Get-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheKey', 'Get-AzRedisEnterpriseCacheOperationStatus', 'Import-AzRedisEnterpriseCache', 'Invoke-AzRedisEnterpriseCacheDatabaseFlush', 'Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup', 'Invoke-AzRedisEnterpriseCacheForceDatabaseUnlink', 'New-AzRedisEnterpriseCache', 'New-AzRedisEnterpriseCacheAccessPolicyAssignment', 'New-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheKey', 'Remove-AzRedisEnterpriseCache', 'Remove-AzRedisEnterpriseCacheAccessPolicyAssignment', 'Remove-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCache', 'Update-AzRedisEnterpriseCacheDatabase', 'Update-AzRedisEnterpriseCacheDatabaseDbRedisVersion', '*'
1515
AliasesToExport = 'Export-AzRedisEnterpriseCacheDatabase', 'Get-AzRedisEnterpriseCacheDatabaseKey', 'Get-AzRedisEnterpriseCacheAccessKey', 'Import-AzRedisEnterpriseCacheDatabase', 'New-AzRedisEnterpriseCacheDatabaseKey', 'New-AzRedisEnterpriseCacheAccessKey', '*'
1616
PrivateData = @{
1717
PSData = @{

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ In this directory, run AutoRest:
3232
> see https://aka.ms/autorest
3333
3434
``` yaml
35-
commit: aef78a6d0f0bc49b42327621fc670200d7545816
35+
commit: 40923289b489ac3f2a96d274ca5fbf0e4457e5d4
3636
require:
3737
- $(this-folder)/../../readme.azure.noprofile.md
3838
# lock the commit
3939
input-file:
40-
- $(repo)/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2023-03-01-preview/redisenterprise.json
40+
- $(repo)/specification/redisenterprise/resource-manager/Microsoft.Cache/preview/2024-09-01-preview/redisenterprise.json
4141

4242
module-version: 1.0.0
4343
title: RedisEnterpriseCache
@@ -80,6 +80,11 @@ directive:
8080
alias:
8181
- Get-AzRedisEnterpriseCacheDatabaseKey
8282
- Get-AzRedisEnterpriseCacheAccessKey
83+
- where:
84+
verb: New
85+
subject: AccessPolicyAssignmentUpdate
86+
set:
87+
subject: AccessPolicyAssignment
8388
- where:
8489
verb: Import|Export
8590
subject: (^Database)(.*)
@@ -217,6 +222,13 @@ directive:
217222
default:
218223
script: '"default"'
219224

225+
- from: swagger-document
226+
where: $.definitions.AccessPolicyAssignment
227+
transform: $['required'] = ['properties']
228+
- from: swagger-document
229+
where: $.definitions.AccessPolicyAssignmentProperties.properties.user
230+
transform: $['required'] = ['objectId']
231+
220232
# DatabaseName parameter to have value 'default'
221233
- where:
222234
verb: Invoke
@@ -226,7 +238,6 @@ directive:
226238
set:
227239
default:
228240
script: '"default"'
229-
230241
# Fix bugs in generated code from namespace conflict
231242
- from: source-file-csharp
232243
where: $

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169169
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170170
}
171171

172+
if (-not $DisableAfterBuildTasks){
173+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
174+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
175+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
176+
Write-Host -ForegroundColor Green 'Running after build tasks...'
177+
. $afterBuildTasksPath @afterBuildTasksArgs
178+
}
179+
}
180+
181+
172182
Write-Host -ForegroundColor Green '-------------Done-------------'

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Cluster.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

4-
namespace Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview
4+
namespace Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview
55
{
66
public partial class Cluster
77
{

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Get-AzRedisEnterpriseCache.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ West US MyCache3 Microsoft.Cache/redisEnterprise {default}
4444
Central US MyCache4 Microsoft.Cache/redisEnterprise {1, 2, 3} {default}
4545
4646
.Outputs
47-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ICluster
47+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster
4848
.Link
4949
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecache
5050
#>
5151

5252
function Get-AzRedisEnterpriseCache {
53-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ICluster])]
53+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster])]
5454
[CmdletBinding(DefaultParameterSetName='ListBySubscriptionId', PositionalBinding=$false)]
5555
param(
5656
[Parameter(ParameterSetName='Get', Mandatory)]

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Get-AzRedisEnterpriseCacheDatabase.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ Name Type
2626
default Microsoft.Cache/redisEnterprise/databases
2727
2828
.Outputs
29-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IDatabase
29+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase
3030
.Link
3131
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecachedatabase
3232
#>
3333
function Get-AzRedisEnterpriseCacheDatabase {
34-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IDatabase])]
34+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase])]
3535
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
3636
param(
3737
[Parameter(Mandatory)]

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/Get-AzRedisEnterpriseCacheKey.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ PrimaryKey SecondaryKey
2626
primary-key secondary-key
2727
2828
.Outputs
29-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IAccessKeys
29+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessKeys
3030
.Link
3131
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/get-azredisenterprisecachekey
3232
#>
3333
function Get-AzRedisEnterpriseCacheKey {
3434
[Alias('Get-AzRedisEnterpriseCacheDatabaseKey', 'Get-AzRedisEnterpriseCacheAccessKey')]
35-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IAccessKeys])]
35+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IAccessKeys])]
3636
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3737
param(
3838
[Parameter(Mandatory)]

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/New-AzRedisEnterpriseCache.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Location Name Type Zone Database
4040
East US MyCache Microsoft.Cache/redisEnterprise {}
4141
4242
.Outputs
43-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ICluster
43+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster
4444
.Notes
4545
COMPLEX PARAMETER PROPERTIES
4646
@@ -54,7 +54,7 @@ MODULE <IModule[]>: Optional set of redis modules to enable in this database - m
5454
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/new-azredisenterprisecache
5555
#>
5656
function New-AzRedisEnterpriseCache {
57-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ICluster])]
57+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ICluster])]
5858
[CmdletBinding(DefaultParameterSetName='CreateClusterWithDatabase', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5959
param(
6060
[Parameter(Mandatory)]
@@ -83,7 +83,7 @@ function New-AzRedisEnterpriseCache {
8383
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
8484
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.SkuName]
8585
# The type of Redis Enterprise cluster to deploy.
86-
# Allowed values: Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500
86+
# Allowed values: Enterprise_E1, Enterprise_E5, Enterprise_E10, Enterprise_E20, Enterprise_E50, Enterprise_E100, Enterprise_E200, Enterprise_E400,EnterpriseFlash_F300, EnterpriseFlash_F700, EnterpriseFlash_F1500
8787
${Sku},
8888

8989
[Parameter()]
@@ -110,14 +110,14 @@ function New-AzRedisEnterpriseCache {
110110

111111
[Parameter()]
112112
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
113-
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api30.ITrackedResourceTags]))]
113+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20.ITrackedResourceTags]))]
114114
[System.Collections.Hashtable]
115115
# Cluster resource tags.
116116
${Tag},
117117

118118
[Parameter(ParameterSetName='CreateClusterWithDatabase')]
119119
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
120-
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IModule[]]
120+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IModule[]]
121121
# Optional set of redis modules to enable in this database - modules can only be added at create time.
122122
# To construct, see NOTES section for MODULE properties and create a hash table.
123123
${Module},
@@ -154,7 +154,7 @@ function New-AzRedisEnterpriseCache {
154154
[Parameter(ParameterSetName='CreateClusterWithDatabase')]
155155
[AllowEmptyCollection()]
156156
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
157-
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ILinkedDatabase[]]
157+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ILinkedDatabase[]]
158158
# List of database resources to link with this database
159159
# To construct, see NOTES section for GEOREPLICATIONLINKEDDATABASE properties and create a hash table.
160160
${LinkedDatabase},

src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/custom/New-AzRedisEnterpriseCacheDatabase.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ default Microsoft.Cache/redisEnterprise/databases
3636
PS C:\> New-AzRedisEnterpriseCacheDatabase -Name "MyCache2" -ResourceGroupName "MyGroup" -ClientProtocol "Encrypted" -EvictionPolicy "NoEviction" -ClusteringPolicy "EnterpriseCluster" -GroupNickname "GroupNickname" -LinkedDatabase '{id:"/subscriptions/6b9ac7d2-7f6d-4de4-962c-43fda44bc3f2/resourceGroups/MyGroup/providers/Microsoft.Cache/redisEnterprise/MyCache/databases/default"}','{id:"/subscriptions/sub1/resourceGroups/MyGroup/providers/Microsoft.Cache/redisEnterprise/MyCache2/databases/default"}'
3737
3838
.Outputs
39-
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IDatabase
39+
Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase
4040
.Notes
4141
COMPLEX PARAMETER PROPERTIES
4242
@@ -53,7 +53,7 @@ MODULE <IModule[]>: Optional set of redis modules to enable in this database - m
5353
https://learn.microsoft.com/powershell/module/az.redisenterprisecache/new-azredisenterprisecachedatabase
5454
#>
5555
function New-AzRedisEnterpriseCacheDatabase {
56-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IDatabase])]
56+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IDatabase])]
5757
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5858
param(
5959
[Parameter(Mandatory)]
@@ -72,7 +72,7 @@ function New-AzRedisEnterpriseCacheDatabase {
7272

7373
[Parameter()]
7474
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
75-
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.IModule[]]
75+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.IModule[]]
7676
# Optional set of redis modules to enable in this database - modules can only be added at create time.
7777
# To construct, see NOTES section for MODULE properties and create a hash table.
7878
${Module},
@@ -109,7 +109,7 @@ function New-AzRedisEnterpriseCacheDatabase {
109109
[Parameter()]
110110
[AllowEmptyCollection()]
111111
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')]
112-
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20230301Preview.ILinkedDatabase[]]
112+
[Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20240901Preview.ILinkedDatabase[]]
113113
# List of database resources to link with this database
114114
# To construct, see NOTES section for GEOREPLICATIONLINKEDDATABASE properties and create a hash table.
115115
${LinkedDatabase},

0 commit comments

Comments
 (0)