Framework/Core/FixControl/Services/RedisCacheFix.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Set-StrictMode -Version Latest 

class RedisCacheFix: FixServicesBase
{
    [PSObject] $ResourceObject = $null;

    RedisCacheFix([string] $subscriptionId, [ResourceConfig] $resourceConfig, [string] $resourceGroupName): 
        Base($subscriptionId, $resourceConfig, $resourceGroupName) 
    { 
    }

    [MessageData[]] DisableNon_SSLport_RedisCache([PSObject] $parameters)
    {

        [MessageData[]] $detailedLogs = @();
        $detailedLogs += [MessageData]::new("Disabling Non SSL port on RedisCache : [$($this.ResourceName)]...");
        Set-AzureRmRedisCache -ResourceGroupName $this.ResourceGroupName -Name $this.ResourceName -EnableNonSslPort $false
        $detailedLogs += [MessageData]::new("Disabled Non SSL port on RedisCache : [$($this.ResourceName)]");
        return $detailedLogs;    
        
    }

}