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
LookupCachein 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
- Resource
Group stringName The name of the resource group the Redis cache instance is located in.
- Zones List<string>
GetCache Result
The following output properties are available:
- Capacity int
The size of the Redis Cache deployed.
- Enable
Non boolSsl Port Whether the SSL port is enabled.
- Family string
The SKU family/pricing group used. Possible values are
C(for Basic/Standard SKU family) andP(forPremium)- 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.
- Minimum
Tls stringVersion The minimum TLS version.
- Name string
- Patch
Schedules List<GetCache Patch Schedule> A list of
patch_scheduleblocks as defined below - only available for Premium SKU’s.- Port int
The non-SSL Port of the Redis Instance
- Primary
Access stringKey The Primary Access Key for the Redis Instance
- Primary
Connection stringString The primary connection string of the Redis Instance.
- Private
Static stringIp Address - Redis
Configurations List<GetCache Redis Configuration> A
redis_configurationblock as defined below.- Resource
Group stringName - Secondary
Access stringKey The Secondary Access Key for the Redis Instance
- Secondary
Connection stringString The secondary connection string of the Redis Instance.
- int
- Sku
Name string The SKU of Redis used. Possible values are
Basic,StandardandPremium.- Ssl
Port int The SSL Port of the Redis Instance
- Subnet
Id string - Dictionary<string, string>
- Zones List<string>
- Capacity int
The size of the Redis Cache deployed.
- Enable
Non boolSsl Port Whether the SSL port is enabled.
- Family string
The SKU family/pricing group used. Possible values are
C(for Basic/Standard SKU family) andP(forPremium)- 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.
- Minimum
Tls stringVersion The minimum TLS version.
- Name string
- Patch
Schedules []GetCache Patch Schedule A list of
patch_scheduleblocks as defined below - only available for Premium SKU’s.- Port int
The non-SSL Port of the Redis Instance
- Primary
Access stringKey The Primary Access Key for the Redis Instance
- Primary
Connection stringString The primary connection string of the Redis Instance.
- Private
Static stringIp Address - Redis
Configurations []GetCache Redis Configuration A
redis_configurationblock as defined below.- Resource
Group stringName - Secondary
Access stringKey The Secondary Access Key for the Redis Instance
- Secondary
Connection stringString The secondary connection string of the Redis Instance.
- int
- Sku
Name string The SKU of Redis used. Possible values are
Basic,StandardandPremium.- Ssl
Port int The SSL Port of the Redis Instance
- Subnet
Id string - map[string]string
- Zones []string
- capacity number
The size of the Redis Cache deployed.
- enable
Non booleanSsl Port Whether the SSL port is enabled.
- family string
The SKU family/pricing group used. Possible values are
C(for Basic/Standard SKU family) andP(forPremium)- 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.
- minimum
Tls stringVersion The minimum TLS version.
- name string
- patch
Schedules GetCache Patch Schedule[] A list of
patch_scheduleblocks as defined below - only available for Premium SKU’s.- port number
The non-SSL Port of the Redis Instance
- primary
Access stringKey The Primary Access Key for the Redis Instance
- primary
Connection stringString The primary connection string of the Redis Instance.
- private
Static stringIp Address - redis
Configurations GetCache Redis Configuration[] A
redis_configurationblock as defined below.- resource
Group stringName - secondary
Access stringKey The Secondary Access Key for the Redis Instance
- secondary
Connection stringString The secondary connection string of the Redis Instance.
- number
- sku
Name string The SKU of Redis used. Possible values are
Basic,StandardandPremium.- ssl
Port number The SSL Port of the Redis Instance
- subnet
Id string - {[key: string]: string}
- zones string[]
- capacity float
The size of the Redis Cache deployed.
- enable_
non_ boolssl_ port Whether the SSL port is enabled.
- family str
The SKU family/pricing group used. Possible values are
C(for Basic/Standard SKU family) andP(forPremium)- 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_ strversion The minimum TLS version.
- name str
- patch_
schedules List[GetCache Patch Schedule] A list of
patch_scheduleblocks as defined below - only available for Premium SKU’s.- port float
The non-SSL Port of the Redis Instance
- primary_
access_ strkey The Primary Access Key for the Redis Instance
- primary_
connection_ strstring The primary connection string of the Redis Instance.
- private_
static_ strip_ address - redis_
configurations List[GetCache Redis Configuration] A
redis_configurationblock as defined below.- resource_
group_ strname - secondary_
access_ strkey The Secondary Access Key for the Redis Instance
- secondary_
connection_ strstring The secondary connection string of the Redis Instance.
- float
- sku_
name str The SKU of Redis used. Possible values are
Basic,StandardandPremium.- ssl_
port float The SSL Port of the Redis Instance
- subnet_
id str - 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.
- Day
Of stringWeek the Weekday name for the patch item
- Start
Hour intUtc The Start Hour for maintenance in UTC
- Day
Of stringWeek the Weekday name for the patch item
- Start
Hour intUtc The Start Hour for maintenance in UTC
- day
Of stringWeek the Weekday name for the patch item
- start
Hour numberUtc The Start Hour for maintenance in UTC
- day
Of strWeek the Weekday name for the patch item
- start
Hour floatUtc 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.
- Aof
Backup boolEnabled - Aof
Storage stringConnection String0 - Aof
Storage stringConnection String1 - Enable
Authentication bool Specifies if authentication is enabled
- Maxclients int
- Maxfragmentationmemory
Reserved int Value in megabytes reserved to accommodate for memory fragmentation.
- Maxmemory
Delta int The max-memory delta for this Redis instance.
- Maxmemory
Policy string How Redis will select what to remove when
maxmemoryis reached.- Maxmemory
Reserved int The value in megabytes reserved for non-cache usage e.g. failover
- Notify
Keyspace stringEvents - Rdb
Backup boolEnabled Is Backup Enabled? Only supported on Premium SKU’s.
- Rdb
Backup intFrequency The Backup Frequency in Minutes. Only supported on Premium SKU’s.
- Rdb
Backup intMax Snapshot Count The maximum number of snapshots that can be created as a backup.
- Rdb
Storage stringConnection String The Connection String to the Storage Account. Only supported for Premium SKU’s.
- Aof
Backup boolEnabled - Aof
Storage stringConnection String0 - Aof
Storage stringConnection String1 - Enable
Authentication bool Specifies if authentication is enabled
- Maxclients int
- Maxfragmentationmemory
Reserved int Value in megabytes reserved to accommodate for memory fragmentation.
- Maxmemory
Delta int The max-memory delta for this Redis instance.
- Maxmemory
Policy string How Redis will select what to remove when
maxmemoryis reached.- Maxmemory
Reserved int The value in megabytes reserved for non-cache usage e.g. failover
- Notify
Keyspace stringEvents - Rdb
Backup boolEnabled Is Backup Enabled? Only supported on Premium SKU’s.
- Rdb
Backup intFrequency The Backup Frequency in Minutes. Only supported on Premium SKU’s.
- Rdb
Backup intMax Snapshot Count The maximum number of snapshots that can be created as a backup.
- Rdb
Storage stringConnection String The Connection String to the Storage Account. Only supported for Premium SKU’s.
- aof
Backup booleanEnabled - aof
Storage stringConnection String0 - aof
Storage stringConnection String1 - enable
Authentication boolean Specifies if authentication is enabled
- maxclients number
- maxfragmentationmemory
Reserved number Value in megabytes reserved to accommodate for memory fragmentation.
- maxmemory
Delta number The max-memory delta for this Redis instance.
- maxmemory
Policy string How Redis will select what to remove when
maxmemoryis reached.- maxmemory
Reserved number The value in megabytes reserved for non-cache usage e.g. failover
- notify
Keyspace stringEvents - rdb
Backup booleanEnabled Is Backup Enabled? Only supported on Premium SKU’s.
- rdb
Backup numberFrequency The Backup Frequency in Minutes. Only supported on Premium SKU’s.
- rdb
Backup numberMax Snapshot Count The maximum number of snapshots that can be created as a backup.
- rdb
Storage stringConnection String The Connection String to the Storage Account. Only supported for Premium SKU’s.
- aof
Backup boolEnabled - aof
Storage strConnection String0 - aof
Storage strConnection String1 - enable
Authentication bool Specifies if authentication is enabled
- maxclients float
- maxfragmentationmemory
Reserved float Value in megabytes reserved to accommodate for memory fragmentation.
- maxmemory
Delta float The max-memory delta for this Redis instance.
- maxmemory
Policy str How Redis will select what to remove when
maxmemoryis reached.- maxmemory
Reserved float The value in megabytes reserved for non-cache usage e.g. failover
- notify
Keyspace strEvents - rdb
Backup boolEnabled Is Backup Enabled? Only supported on Premium SKU’s.
- rdb
Backup floatFrequency The Backup Frequency in Minutes. Only supported on Premium SKU’s.
- rdb
Backup floatMax Snapshot Count The maximum number of snapshots that can be created as a backup.
- rdb
Storage strConnection String 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
azurermTerraform Provider.