GetCache

Use this data source to access information about an existing Redis Cache

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.redis.getCache({
    name: "myrediscache",
    resourceGroupName: "redis-cache",
});
export const primaryAccessKey = example.then(example => example.primaryAccessKey);
export const hostname = example.then(example => example.hostname);
import pulumi
import pulumi_azure as azure

example = azure.redis.get_cache(name="myrediscache",
    resource_group_name="redis-cache")
pulumi.export("primaryAccessKey", example.primary_access_key)
pulumi.export("hostname", example.hostname)
using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Redis.GetCache.InvokeAsync(new Azure.Redis.GetCacheArgs
        {
            Name = "myrediscache",
            ResourceGroupName = "redis-cache",
        }));
        this.PrimaryAccessKey = example.Apply(example => example.PrimaryAccessKey);
        this.Hostname = example.Apply(example => example.Hostname);
    }

    [Output("primaryAccessKey")]
    public Output<string> PrimaryAccessKey { get; set; }
    [Output("hostname")]
    public Output<string> Hostname { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/redis"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := redis.LookupCache(ctx, &redis.LookupCacheArgs{
			Name:              "myrediscache",
			ResourceGroupName: "redis-cache",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("primaryAccessKey", example.PrimaryAccessKey)
		ctx.Export("hostname", example.Hostname)
		return nil
	})
}

Using GetCache

function getCache(args: GetCacheArgs, opts?: InvokeOptions): Promise<GetCacheResult>
function  get_cache(name=None, resource_group_name=None, zones=None, opts=None)
func LookupCache(ctx *Context, args *LookupCacheArgs, opts ...InvokeOption) (*LookupCacheResult, error)

Note: This function is named LookupCache in the Go SDK.

public static class GetCache {
    public static Task<GetCacheResult> InvokeAsync(GetCacheArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Redis cache

ResourceGroupName string

The name of the resource group the Redis cache instance is located in.

Zones List<string>
Name string

The name of the Redis cache

ResourceGroupName string

The name of the resource group the Redis cache instance is located in.

Zones []string
name string

The name of the Redis cache

resourceGroupName string

The name of the resource group the Redis cache instance is located in.

zones string[]
name str

The name of the Redis cache

resource_group_name str

The name of the resource group the Redis cache instance is located in.

zones List[str]

GetCache Result

The following output properties are available:

Capacity int

The size of the Redis Cache deployed.

EnableNonSslPort bool

Whether the SSL port is enabled.

Family string

The SKU family/pricing group used. Possible values are C (for Basic/Standard SKU family) and P (for Premium)

Hostname string

The Hostname of the Redis Instance

Id string

The provider-assigned unique ID for this managed resource.

Location string

The location of the Redis Cache.

MinimumTlsVersion string

The minimum TLS version.

Name string
PatchSchedules List<GetCachePatchSchedule>

A list of patch_schedule blocks as defined below - only available for Premium SKU’s.

Port int

The non-SSL Port of the Redis Instance

PrimaryAccessKey string

The Primary Access Key for the Redis Instance

PrimaryConnectionString string

The primary connection string of the Redis Instance.

PrivateStaticIpAddress string
RedisConfigurations List<GetCacheRedisConfiguration>

A redis_configuration block as defined below.

ResourceGroupName string
SecondaryAccessKey string

The Secondary Access Key for the Redis Instance

SecondaryConnectionString string

The secondary connection string of the Redis Instance.

ShardCount int
SkuName string

The SKU of Redis used. Possible values are Basic, Standard and Premium.

SslPort int

The SSL Port of the Redis Instance

SubnetId string
Tags Dictionary<string, string>
Zones List<string>
Capacity int

The size of the Redis Cache deployed.

EnableNonSslPort bool

Whether the SSL port is enabled.

Family string

The SKU family/pricing group used. Possible values are C (for Basic/Standard SKU family) and P (for Premium)

Hostname string

The Hostname of the Redis Instance

Id string

The provider-assigned unique ID for this managed resource.

Location string

The location of the Redis Cache.

MinimumTlsVersion string

The minimum TLS version.

Name string
PatchSchedules []GetCachePatchSchedule

A list of patch_schedule blocks as defined below - only available for Premium SKU’s.

Port int

The non-SSL Port of the Redis Instance

PrimaryAccessKey string

The Primary Access Key for the Redis Instance

PrimaryConnectionString string

The primary connection string of the Redis Instance.

PrivateStaticIpAddress string
RedisConfigurations []GetCacheRedisConfiguration

A redis_configuration block as defined below.

ResourceGroupName string
SecondaryAccessKey string

The Secondary Access Key for the Redis Instance

SecondaryConnectionString string

The secondary connection string of the Redis Instance.

ShardCount int
SkuName string

The SKU of Redis used. Possible values are Basic, Standard and Premium.

SslPort int

The SSL Port of the Redis Instance

SubnetId string
Tags map[string]string
Zones []string
capacity number

The size of the Redis Cache deployed.

enableNonSslPort boolean

Whether the SSL port is enabled.

family string

The SKU family/pricing group used. Possible values are C (for Basic/Standard SKU family) and P (for Premium)

hostname string

The Hostname of the Redis Instance

id string

The provider-assigned unique ID for this managed resource.

location string

The location of the Redis Cache.

minimumTlsVersion string

The minimum TLS version.

name string
patchSchedules GetCachePatchSchedule[]

A list of patch_schedule blocks as defined below - only available for Premium SKU’s.

port number

The non-SSL Port of the Redis Instance

primaryAccessKey string

The Primary Access Key for the Redis Instance

primaryConnectionString string

The primary connection string of the Redis Instance.

privateStaticIpAddress string
redisConfigurations GetCacheRedisConfiguration[]

A redis_configuration block as defined below.

resourceGroupName string
secondaryAccessKey string

The Secondary Access Key for the Redis Instance

secondaryConnectionString string

The secondary connection string of the Redis Instance.

shardCount number
skuName string

The SKU of Redis used. Possible values are Basic, Standard and Premium.

sslPort number

The SSL Port of the Redis Instance

subnetId string
tags {[key: string]: string}
zones string[]
capacity float

The size of the Redis Cache deployed.

enable_non_ssl_port bool

Whether the SSL port is enabled.

family str

The SKU family/pricing group used. Possible values are C (for Basic/Standard SKU family) and P (for Premium)

hostname str

The Hostname of the Redis Instance

id str

The provider-assigned unique ID for this managed resource.

location str

The location of the Redis Cache.

minimum_tls_version str

The minimum TLS version.

name str
patch_schedules List[GetCachePatchSchedule]

A list of patch_schedule blocks as defined below - only available for Premium SKU’s.

port float

The non-SSL Port of the Redis Instance

primary_access_key str

The Primary Access Key for the Redis Instance

primary_connection_string str

The primary connection string of the Redis Instance.

private_static_ip_address str
redis_configurations List[GetCacheRedisConfiguration]

A redis_configuration block as defined below.

resource_group_name str
secondary_access_key str

The Secondary Access Key for the Redis Instance

secondary_connection_string str

The secondary connection string of the Redis Instance.

shard_count float
sku_name str

The SKU of Redis used. Possible values are Basic, Standard and Premium.

ssl_port float

The SSL Port of the Redis Instance

subnet_id str
tags Dict[str, str]
zones List[str]

Supporting Types

GetCachePatchSchedule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

DayOfWeek string

the Weekday name for the patch item

StartHourUtc int

The Start Hour for maintenance in UTC

DayOfWeek string

the Weekday name for the patch item

StartHourUtc int

The Start Hour for maintenance in UTC

dayOfWeek string

the Weekday name for the patch item

startHourUtc number

The Start Hour for maintenance in UTC

dayOfWeek str

the Weekday name for the patch item

startHourUtc float

The Start Hour for maintenance in UTC

GetCacheRedisConfiguration

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AofBackupEnabled bool
AofStorageConnectionString0 string
AofStorageConnectionString1 string
EnableAuthentication bool

Specifies if authentication is enabled

Maxclients int
MaxfragmentationmemoryReserved int

Value in megabytes reserved to accommodate for memory fragmentation.

MaxmemoryDelta int

The max-memory delta for this Redis instance.

MaxmemoryPolicy string

How Redis will select what to remove when maxmemory is reached.

MaxmemoryReserved int

The value in megabytes reserved for non-cache usage e.g. failover

NotifyKeyspaceEvents string
RdbBackupEnabled bool

Is Backup Enabled? Only supported on Premium SKU’s.

RdbBackupFrequency int

The Backup Frequency in Minutes. Only supported on Premium SKU’s.

RdbBackupMaxSnapshotCount int

The maximum number of snapshots that can be created as a backup.

RdbStorageConnectionString string

The Connection String to the Storage Account. Only supported for Premium SKU’s.

AofBackupEnabled bool
AofStorageConnectionString0 string
AofStorageConnectionString1 string
EnableAuthentication bool

Specifies if authentication is enabled

Maxclients int
MaxfragmentationmemoryReserved int

Value in megabytes reserved to accommodate for memory fragmentation.

MaxmemoryDelta int

The max-memory delta for this Redis instance.

MaxmemoryPolicy string

How Redis will select what to remove when maxmemory is reached.

MaxmemoryReserved int

The value in megabytes reserved for non-cache usage e.g. failover

NotifyKeyspaceEvents string
RdbBackupEnabled bool

Is Backup Enabled? Only supported on Premium SKU’s.

RdbBackupFrequency int

The Backup Frequency in Minutes. Only supported on Premium SKU’s.

RdbBackupMaxSnapshotCount int

The maximum number of snapshots that can be created as a backup.

RdbStorageConnectionString string

The Connection String to the Storage Account. Only supported for Premium SKU’s.

aofBackupEnabled boolean
aofStorageConnectionString0 string
aofStorageConnectionString1 string
enableAuthentication boolean

Specifies if authentication is enabled

maxclients number
maxfragmentationmemoryReserved number

Value in megabytes reserved to accommodate for memory fragmentation.

maxmemoryDelta number

The max-memory delta for this Redis instance.

maxmemoryPolicy string

How Redis will select what to remove when maxmemory is reached.

maxmemoryReserved number

The value in megabytes reserved for non-cache usage e.g. failover

notifyKeyspaceEvents string
rdbBackupEnabled boolean

Is Backup Enabled? Only supported on Premium SKU’s.

rdbBackupFrequency number

The Backup Frequency in Minutes. Only supported on Premium SKU’s.

rdbBackupMaxSnapshotCount number

The maximum number of snapshots that can be created as a backup.

rdbStorageConnectionString string

The Connection String to the Storage Account. Only supported for Premium SKU’s.

aofBackupEnabled bool
aofStorageConnectionString0 str
aofStorageConnectionString1 str
enableAuthentication bool

Specifies if authentication is enabled

maxclients float
maxfragmentationmemoryReserved float

Value in megabytes reserved to accommodate for memory fragmentation.

maxmemoryDelta float

The max-memory delta for this Redis instance.

maxmemoryPolicy str

How Redis will select what to remove when maxmemory is reached.

maxmemoryReserved float

The value in megabytes reserved for non-cache usage e.g. failover

notifyKeyspaceEvents str
rdbBackupEnabled bool

Is Backup Enabled? Only supported on Premium SKU’s.

rdbBackupFrequency float

The Backup Frequency in Minutes. Only supported on Premium SKU’s.

rdbBackupMaxSnapshotCount float

The maximum number of snapshots that can be created as a backup.

rdbStorageConnectionString str

The Connection String to the Storage Account. Only supported for Premium SKU’s.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.