Skip to content

Commit

Permalink
[RedisEnterpriseCache]Init for RedisEnterpriseCache (Azure#14517)
Browse files Browse the repository at this point in the history
* Init for RedisEnterpriseCache

* Add GA info

* Update document

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>
  • Loading branch information
wyunchi-ms and wyunchi-ms authored Mar 12, 2021
1 parent 27c6da6 commit c753af6
Show file tree
Hide file tree
Showing 245 changed files with 9,966 additions and 8,186 deletions.
124 changes: 68 additions & 56 deletions src/RedisEnterpriseCache/Az.RedisEnterpriseCache.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,34 +245,6 @@
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20.ResourceAutoGenerated</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20.ResourceAutoGenerated</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Name</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>Type</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Type</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20.TrackedResource</Name>
<ViewSelectedBy>
Expand Down Expand Up @@ -504,9 +476,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Cluster</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Cluster</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Cluster</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Cluster</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -550,9 +522,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.AccessKeys</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.AccessKeys</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.AccessKeys</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.AccessKeys</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -578,9 +550,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterList</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterList</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterList</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterList</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -600,9 +572,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterProperties</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterProperties</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterProperties</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterProperties</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -646,9 +618,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterUpdateTags</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterUpdateTags</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ClusterUpdateTags</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ClusterUpdateTags</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -668,9 +640,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Database</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Database</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Database</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Database</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -696,9 +668,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.DatabaseList</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.DatabaseList</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.DatabaseList</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.DatabaseList</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -718,9 +690,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.DatabaseProperties</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.DatabaseProperties</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.DatabaseProperties</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.DatabaseProperties</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -770,9 +742,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ExportClusterParameters</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ExportClusterParameters</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ExportClusterParameters</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ExportClusterParameters</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -792,9 +764,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ImportClusterParameters</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ImportClusterParameters</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.ImportClusterParameters</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.ImportClusterParameters</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -814,9 +786,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Module</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Module</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Module</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Module</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -848,9 +820,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.OperationStatus</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.OperationStatus</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.OperationStatus</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.OperationStatus</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -888,9 +860,49 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.RegenerateKeyParameters</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Persistence</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Persistence</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>AofEnabled</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>AofFrequency</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>RdbEnabled</Label>
</TableColumnHeader>
<TableColumnHeader>
<Label>RdbFrequency</Label>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>AofEnabled</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>AofFrequency</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>RdbEnabled</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>RdbFrequency</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.RegenerateKeyParameters</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.RegenerateKeyParameters</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.RegenerateKeyParameters</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand All @@ -910,9 +922,9 @@
</TableControl>
</View>
<View>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Sku</Name>
<Name>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Sku</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview.Sku</TypeName>
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301.Sku</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down
28 changes: 17 additions & 11 deletions src/RedisEnterpriseCache/Az.RedisEnterpriseCache.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 12/14/2020
# Generated on: 2021-03-11
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = './Az.RedisEnterpriseCache.psm1'

# Version number of this module.
ModuleVersion = '0.1.0'
ModuleVersion = '1.0.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''
Expand All @@ -69,14 +69,15 @@ FormatsToProcess = './Az.RedisEnterpriseCache.format.ps1xml'
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Export-AzRedisEnterpriseCacheDatabase',
'Get-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCacheDatabase',
'Get-AzRedisEnterpriseCacheDatabaseKey',
FunctionsToExport = 'Export-AzRedisEnterpriseCache', 'Get-AzRedisEnterpriseCache',
'Get-AzRedisEnterpriseCacheDatabase',
'Get-AzRedisEnterpriseCacheKey',
'Get-AzRedisEnterpriseCacheOperationStatus',
'Import-AzRedisEnterpriseCacheDatabase',
'New-AzRedisEnterpriseCache',
'New-AzRedisEnterpriseCacheDatabaseKey',
'Remove-AzRedisEnterpriseCache', 'Update-AzRedisEnterpriseCache',
'Import-AzRedisEnterpriseCache', 'New-AzRedisEnterpriseCache',
'New-AzRedisEnterpriseCacheDatabase',
'New-AzRedisEnterpriseCacheKey', 'Remove-AzRedisEnterpriseCache',
'Remove-AzRedisEnterpriseCacheDatabase',
'Update-AzRedisEnterpriseCache',
'Update-AzRedisEnterpriseCacheDatabase'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
Expand All @@ -86,7 +87,12 @@ CmdletsToExport = @()
# VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
AliasesToExport = 'Export-AzRedisEnterpriseCacheDatabase',
'Get-AzRedisEnterpriseCacheDatabaseKey',
'Get-AzRedisEnterpriseCacheAccessKey',
'Import-AzRedisEnterpriseCacheDatabase',
'New-AzRedisEnterpriseCacheDatabaseKey',
'New-AzRedisEnterpriseCacheAccessKey', '*'

# DSC resources to export from this module
# DscResourcesToExport = @()
Expand Down
10 changes: 5 additions & 5 deletions src/RedisEnterpriseCache/Az.RedisEnterpriseCache.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
}
}
if(-not $accountsModule) {
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
if($hasAdequateVersion) {
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
}
}
}

if(-not $accountsModule) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
}
Write-Information "Loaded Module '$($accountsModule.Name)'"

Expand Down
1 change: 1 addition & 0 deletions src/RedisEnterpriseCache/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* GA version of Az.RedisEnterpriseCache

## Version 0.1.0
* First preview release for module Az.RedisEnterpriseCache
Expand Down
2 changes: 1 addition & 1 deletion src/RedisEnterpriseCache/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
} else {
Write-Host -ForegroundColor Green 'Creating exports and docs...'
$moduleDescription = 'Microsoft Azure PowerShell: RedisEnterpriseCache cmdlets'
Expand Down
4 changes: 2 additions & 2 deletions src/RedisEnterpriseCache/check-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
}

DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'

$tools = Join-Path $PSScriptRoot 'tools'
Expand All @@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
Set-Location $resourceDir
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
$null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
Set-Location $HOME/.PSSharedModules/Resources
$null = .\build-module.ps1
Expand Down
5 changes: 4 additions & 1 deletion src/RedisEnterpriseCache/custom/Cluster.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20201001Preview
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Models.Api20210301
{
public partial class Cluster
{
Expand Down
Loading

0 comments on commit c753af6

Please sign in to comment.