redis

package
v3.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	pulumi.CustomResourceState

	// The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4`.
	Capacity pulumi.IntOutput `pulumi:"capacity"`
	// Enable the non-SSL port (6379) - disabled by default.
	EnableNonSslPort pulumi.BoolPtrOutput `pulumi:"enableNonSslPort"`
	// The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`)
	Family pulumi.StringOutput `pulumi:"family"`
	// The Hostname of the Redis Instance
	Hostname pulumi.StringOutput `pulumi:"hostname"`
	// The location of the resource group.
	Location pulumi.StringOutput `pulumi:"location"`
	// The minimum TLS version.  Defaults to `1.0`.
	MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"`
	// The name of the Redis instance. Changing this forces a
	// new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// A list of `patchSchedule` blocks as defined below - only available for Premium SKU's.
	PatchSchedules CachePatchScheduleArrayOutput `pulumi:"patchSchedules"`
	// The non-SSL Port of the Redis Instance
	Port pulumi.IntOutput `pulumi:"port"`
	// The Primary Access Key for the Redis Instance
	PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
	// The primary connection string of the Redis Instance.
	PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
	// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.
	PrivateStaticIpAddress pulumi.StringOutput `pulumi:"privateStaticIpAddress"`
	// A `redisConfiguration` as defined below - with some limitations by SKU - defaults/details are shown below.
	RedisConfiguration CacheRedisConfigurationOutput `pulumi:"redisConfiguration"`
	// The name of the resource group in which to
	// create the Redis instance.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The Secondary Access Key for the Redis Instance
	SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
	// The secondary connection string of the Redis Instance.
	SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
	// *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster.
	ShardCount pulumi.IntPtrOutput `pulumi:"shardCount"`
	// The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`.
	SkuName pulumi.StringOutput `pulumi:"skuName"`
	// The SSL Port of the Redis Instance
	SslPort pulumi.IntOutput `pulumi:"sslPort"`
	// *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created.
	SubnetId pulumi.StringPtrOutput `pulumi:"subnetId"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// A list of a single item of the Availability Zone which the Redis Cache should be allocated in.
	Zones pulumi.StringPtrOutput `pulumi:"zones"`
}

Manages a Redis Cache.

## Example Usage

This example provisions a Standard Redis Cache.

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = redis.NewCache(ctx, "exampleCache", &redis.CacheArgs{
			Location:           exampleResourceGroup.Location,
			ResourceGroupName:  exampleResourceGroup.Name,
			Capacity:           pulumi.Int(2),
			Family:             pulumi.String("C"),
			SkuName:            pulumi.String("Standard"),
			EnableNonSslPort:   pulumi.Bool(false),
			MinimumTlsVersion:  pulumi.String("1.2"),
			RedisConfiguration: nil,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Default Redis Configuration Values

| Redis Value | Basic | Standard | Premium | | ------------------------------- | ------------ | ------------ | ------------ | | enableAuthentication | true | true | true | | maxmemoryReserved | 2 | 50 | 200 | | maxfragmentationmemoryReserved | 2 | 50 | 200 | | maxmemoryDelta | 2 | 50 | 200 | | maxmemoryPolicy | volatile-lru | volatile-lru | volatile-lru |

> **NOTE:** The `maxmemoryReserved`, `maxmemoryDelta` and `maxfragmentationmemory-reserved` settings are only available for Standard and Premium caches. More details are available in the Relevant Links section below._

***

A `patchSchedule` block supports the following:

* `dayOfWeek` (Required) the Weekday name - possible values include `Monday`, `Tuesday`, `Wednesday` etc.

* `startHourUtc` - (Optional) the Start Hour for maintenance in UTC - possible values range from `0 - 23`.

> **Note:** The Patch Window lasts for `5` hours from the `startHourUtc`.

## Relevant Links

## Import

Redis Cache's can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:redis/cache:Cache cache1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/Redis/cache1

```

func GetCache

func GetCache(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *CacheState, opts ...pulumi.ResourceOption) (*Cache, error)

GetCache gets an existing Cache resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewCache

func NewCache(ctx *pulumi.Context,
	name string, args *CacheArgs, opts ...pulumi.ResourceOption) (*Cache, error)

NewCache registers a new resource with the given unique name, arguments, and options.

func (Cache) ElementType added in v3.31.1

func (Cache) ElementType() reflect.Type

func (Cache) ToCacheOutput added in v3.31.1

func (i Cache) ToCacheOutput() CacheOutput

func (Cache) ToCacheOutputWithContext added in v3.31.1

func (i Cache) ToCacheOutputWithContext(ctx context.Context) CacheOutput

type CacheArgs

type CacheArgs struct {
	// The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4`.
	Capacity pulumi.IntInput
	// Enable the non-SSL port (6379) - disabled by default.
	EnableNonSslPort pulumi.BoolPtrInput
	// The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`)
	Family pulumi.StringInput
	// The location of the resource group.
	Location pulumi.StringPtrInput
	// The minimum TLS version.  Defaults to `1.0`.
	MinimumTlsVersion pulumi.StringPtrInput
	// The name of the Redis instance. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// A list of `patchSchedule` blocks as defined below - only available for Premium SKU's.
	PatchSchedules CachePatchScheduleArrayInput
	// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.
	PrivateStaticIpAddress pulumi.StringPtrInput
	// A `redisConfiguration` as defined below - with some limitations by SKU - defaults/details are shown below.
	RedisConfiguration CacheRedisConfigurationPtrInput
	// The name of the resource group in which to
	// create the Redis instance.
	ResourceGroupName pulumi.StringInput
	// *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster.
	ShardCount pulumi.IntPtrInput
	// The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`.
	SkuName pulumi.StringInput
	// *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created.
	SubnetId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// A list of a single item of the Availability Zone which the Redis Cache should be allocated in.
	Zones pulumi.StringPtrInput
}

The set of arguments for constructing a Cache resource.

func (CacheArgs) ElementType

func (CacheArgs) ElementType() reflect.Type

type CacheInput added in v3.31.1

type CacheInput interface {
	pulumi.Input

	ToCacheOutput() CacheOutput
	ToCacheOutputWithContext(ctx context.Context) CacheOutput
}

type CacheOutput added in v3.31.1

type CacheOutput struct {
	*pulumi.OutputState
}

func (CacheOutput) ElementType added in v3.31.1

func (CacheOutput) ElementType() reflect.Type

func (CacheOutput) ToCacheOutput added in v3.31.1

func (o CacheOutput) ToCacheOutput() CacheOutput

func (CacheOutput) ToCacheOutputWithContext added in v3.31.1

func (o CacheOutput) ToCacheOutputWithContext(ctx context.Context) CacheOutput

type CachePatchSchedule

type CachePatchSchedule struct {
	DayOfWeek    string `pulumi:"dayOfWeek"`
	StartHourUtc *int   `pulumi:"startHourUtc"`
}

type CachePatchScheduleArgs

type CachePatchScheduleArgs struct {
	DayOfWeek    pulumi.StringInput `pulumi:"dayOfWeek"`
	StartHourUtc pulumi.IntPtrInput `pulumi:"startHourUtc"`
}

func (CachePatchScheduleArgs) ElementType

func (CachePatchScheduleArgs) ElementType() reflect.Type

func (CachePatchScheduleArgs) ToCachePatchScheduleOutput

func (i CachePatchScheduleArgs) ToCachePatchScheduleOutput() CachePatchScheduleOutput

func (CachePatchScheduleArgs) ToCachePatchScheduleOutputWithContext

func (i CachePatchScheduleArgs) ToCachePatchScheduleOutputWithContext(ctx context.Context) CachePatchScheduleOutput

type CachePatchScheduleArray

type CachePatchScheduleArray []CachePatchScheduleInput

func (CachePatchScheduleArray) ElementType

func (CachePatchScheduleArray) ElementType() reflect.Type

func (CachePatchScheduleArray) ToCachePatchScheduleArrayOutput

func (i CachePatchScheduleArray) ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput

func (CachePatchScheduleArray) ToCachePatchScheduleArrayOutputWithContext

func (i CachePatchScheduleArray) ToCachePatchScheduleArrayOutputWithContext(ctx context.Context) CachePatchScheduleArrayOutput

type CachePatchScheduleArrayInput

type CachePatchScheduleArrayInput interface {
	pulumi.Input

	ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput
	ToCachePatchScheduleArrayOutputWithContext(context.Context) CachePatchScheduleArrayOutput
}

CachePatchScheduleArrayInput is an input type that accepts CachePatchScheduleArray and CachePatchScheduleArrayOutput values. You can construct a concrete instance of `CachePatchScheduleArrayInput` via:

CachePatchScheduleArray{ CachePatchScheduleArgs{...} }

type CachePatchScheduleArrayOutput

type CachePatchScheduleArrayOutput struct{ *pulumi.OutputState }

func (CachePatchScheduleArrayOutput) ElementType

func (CachePatchScheduleArrayOutput) Index

func (CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutput

func (o CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutput() CachePatchScheduleArrayOutput

func (CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutputWithContext

func (o CachePatchScheduleArrayOutput) ToCachePatchScheduleArrayOutputWithContext(ctx context.Context) CachePatchScheduleArrayOutput

type CachePatchScheduleInput

type CachePatchScheduleInput interface {
	pulumi.Input

	ToCachePatchScheduleOutput() CachePatchScheduleOutput
	ToCachePatchScheduleOutputWithContext(context.Context) CachePatchScheduleOutput
}

CachePatchScheduleInput is an input type that accepts CachePatchScheduleArgs and CachePatchScheduleOutput values. You can construct a concrete instance of `CachePatchScheduleInput` via:

CachePatchScheduleArgs{...}

type CachePatchScheduleOutput

type CachePatchScheduleOutput struct{ *pulumi.OutputState }

func (CachePatchScheduleOutput) DayOfWeek

func (CachePatchScheduleOutput) ElementType

func (CachePatchScheduleOutput) ElementType() reflect.Type

func (CachePatchScheduleOutput) StartHourUtc

func (o CachePatchScheduleOutput) StartHourUtc() pulumi.IntPtrOutput

func (CachePatchScheduleOutput) ToCachePatchScheduleOutput

func (o CachePatchScheduleOutput) ToCachePatchScheduleOutput() CachePatchScheduleOutput

func (CachePatchScheduleOutput) ToCachePatchScheduleOutputWithContext

func (o CachePatchScheduleOutput) ToCachePatchScheduleOutputWithContext(ctx context.Context) CachePatchScheduleOutput

type CacheRedisConfiguration

type CacheRedisConfiguration struct {
	AofBackupEnabled            *bool   `pulumi:"aofBackupEnabled"`
	AofStorageConnectionString0 *string `pulumi:"aofStorageConnectionString0"`
	AofStorageConnectionString1 *string `pulumi:"aofStorageConnectionString1"`
	// If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.
	EnableAuthentication *bool `pulumi:"enableAuthentication"`
	// Returns the max number of connected clients at the same time.
	Maxclients *int `pulumi:"maxclients"`
	// Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.
	MaxfragmentationmemoryReserved *int `pulumi:"maxfragmentationmemoryReserved"`
	// The max-memory delta for this Redis instance. Defaults are shown below.
	MaxmemoryDelta *int `pulumi:"maxmemoryDelta"`
	// How Redis will select what to remove when `maxmemory` is reached. Defaults are shown below.
	MaxmemoryPolicy *string `pulumi:"maxmemoryPolicy"`
	// Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.
	MaxmemoryReserved *int `pulumi:"maxmemoryReserved"`
	// Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)
	NotifyKeyspaceEvents *string `pulumi:"notifyKeyspaceEvents"`
	// Is Backup Enabled? Only supported on Premium SKU's.
	RdbBackupEnabled *bool `pulumi:"rdbBackupEnabled"`
	// The Backup Frequency in Minutes. Only supported on Premium SKU's. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.
	RdbBackupFrequency *int `pulumi:"rdbBackupFrequency"`
	// The maximum number of snapshots to create as a backup. Only supported for Premium SKU's.
	RdbBackupMaxSnapshotCount *int `pulumi:"rdbBackupMaxSnapshotCount"`
	// The Connection String to the Storage Account. Only supported for Premium SKU's. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.
	RdbStorageConnectionString *string `pulumi:"rdbStorageConnectionString"`
}

type CacheRedisConfigurationArgs

type CacheRedisConfigurationArgs struct {
	AofBackupEnabled            pulumi.BoolPtrInput   `pulumi:"aofBackupEnabled"`
	AofStorageConnectionString0 pulumi.StringPtrInput `pulumi:"aofStorageConnectionString0"`
	AofStorageConnectionString1 pulumi.StringPtrInput `pulumi:"aofStorageConnectionString1"`
	// If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.
	EnableAuthentication pulumi.BoolPtrInput `pulumi:"enableAuthentication"`
	// Returns the max number of connected clients at the same time.
	Maxclients pulumi.IntPtrInput `pulumi:"maxclients"`
	// Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.
	MaxfragmentationmemoryReserved pulumi.IntPtrInput `pulumi:"maxfragmentationmemoryReserved"`
	// The max-memory delta for this Redis instance. Defaults are shown below.
	MaxmemoryDelta pulumi.IntPtrInput `pulumi:"maxmemoryDelta"`
	// How Redis will select what to remove when `maxmemory` is reached. Defaults are shown below.
	MaxmemoryPolicy pulumi.StringPtrInput `pulumi:"maxmemoryPolicy"`
	// Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.
	MaxmemoryReserved pulumi.IntPtrInput `pulumi:"maxmemoryReserved"`
	// Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)
	NotifyKeyspaceEvents pulumi.StringPtrInput `pulumi:"notifyKeyspaceEvents"`
	// Is Backup Enabled? Only supported on Premium SKU's.
	RdbBackupEnabled pulumi.BoolPtrInput `pulumi:"rdbBackupEnabled"`
	// The Backup Frequency in Minutes. Only supported on Premium SKU's. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.
	RdbBackupFrequency pulumi.IntPtrInput `pulumi:"rdbBackupFrequency"`
	// The maximum number of snapshots to create as a backup. Only supported for Premium SKU's.
	RdbBackupMaxSnapshotCount pulumi.IntPtrInput `pulumi:"rdbBackupMaxSnapshotCount"`
	// The Connection String to the Storage Account. Only supported for Premium SKU's. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.
	RdbStorageConnectionString pulumi.StringPtrInput `pulumi:"rdbStorageConnectionString"`
}

func (CacheRedisConfigurationArgs) ElementType

func (CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutput

func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput

func (CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutputWithContext

func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationOutputWithContext(ctx context.Context) CacheRedisConfigurationOutput

func (CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutput

func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput

func (CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutputWithContext

func (i CacheRedisConfigurationArgs) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput

type CacheRedisConfigurationInput

type CacheRedisConfigurationInput interface {
	pulumi.Input

	ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput
	ToCacheRedisConfigurationOutputWithContext(context.Context) CacheRedisConfigurationOutput
}

CacheRedisConfigurationInput is an input type that accepts CacheRedisConfigurationArgs and CacheRedisConfigurationOutput values. You can construct a concrete instance of `CacheRedisConfigurationInput` via:

CacheRedisConfigurationArgs{...}

type CacheRedisConfigurationOutput

type CacheRedisConfigurationOutput struct{ *pulumi.OutputState }

func (CacheRedisConfigurationOutput) AofBackupEnabled

func (o CacheRedisConfigurationOutput) AofBackupEnabled() pulumi.BoolPtrOutput

func (CacheRedisConfigurationOutput) AofStorageConnectionString0

func (o CacheRedisConfigurationOutput) AofStorageConnectionString0() pulumi.StringPtrOutput

func (CacheRedisConfigurationOutput) AofStorageConnectionString1

func (o CacheRedisConfigurationOutput) AofStorageConnectionString1() pulumi.StringPtrOutput

func (CacheRedisConfigurationOutput) ElementType

func (CacheRedisConfigurationOutput) EnableAuthentication

func (o CacheRedisConfigurationOutput) EnableAuthentication() pulumi.BoolPtrOutput

If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.

func (CacheRedisConfigurationOutput) Maxclients

Returns the max number of connected clients at the same time.

func (CacheRedisConfigurationOutput) MaxfragmentationmemoryReserved

func (o CacheRedisConfigurationOutput) MaxfragmentationmemoryReserved() pulumi.IntPtrOutput

Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.

func (CacheRedisConfigurationOutput) MaxmemoryDelta

The max-memory delta for this Redis instance. Defaults are shown below.

func (CacheRedisConfigurationOutput) MaxmemoryPolicy

How Redis will select what to remove when `maxmemory` is reached. Defaults are shown below.

func (CacheRedisConfigurationOutput) MaxmemoryReserved

func (o CacheRedisConfigurationOutput) MaxmemoryReserved() pulumi.IntPtrOutput

Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.

func (CacheRedisConfigurationOutput) NotifyKeyspaceEvents

func (o CacheRedisConfigurationOutput) NotifyKeyspaceEvents() pulumi.StringPtrOutput

Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)

func (CacheRedisConfigurationOutput) RdbBackupEnabled

func (o CacheRedisConfigurationOutput) RdbBackupEnabled() pulumi.BoolPtrOutput

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

func (CacheRedisConfigurationOutput) RdbBackupFrequency

func (o CacheRedisConfigurationOutput) RdbBackupFrequency() pulumi.IntPtrOutput

The Backup Frequency in Minutes. Only supported on Premium SKU's. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.

func (CacheRedisConfigurationOutput) RdbBackupMaxSnapshotCount

func (o CacheRedisConfigurationOutput) RdbBackupMaxSnapshotCount() pulumi.IntPtrOutput

The maximum number of snapshots to create as a backup. Only supported for Premium SKU's.

func (CacheRedisConfigurationOutput) RdbStorageConnectionString

func (o CacheRedisConfigurationOutput) RdbStorageConnectionString() pulumi.StringPtrOutput

The Connection String to the Storage Account. Only supported for Premium SKU's. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.

func (CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutput

func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutput() CacheRedisConfigurationOutput

func (CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutputWithContext

func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationOutputWithContext(ctx context.Context) CacheRedisConfigurationOutput

func (CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutput

func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput

func (CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutputWithContext

func (o CacheRedisConfigurationOutput) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput

type CacheRedisConfigurationPtrInput

type CacheRedisConfigurationPtrInput interface {
	pulumi.Input

	ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput
	ToCacheRedisConfigurationPtrOutputWithContext(context.Context) CacheRedisConfigurationPtrOutput
}

CacheRedisConfigurationPtrInput is an input type that accepts CacheRedisConfigurationArgs, CacheRedisConfigurationPtr and CacheRedisConfigurationPtrOutput values. You can construct a concrete instance of `CacheRedisConfigurationPtrInput` via:

        CacheRedisConfigurationArgs{...}

or:

        nil

type CacheRedisConfigurationPtrOutput

type CacheRedisConfigurationPtrOutput struct{ *pulumi.OutputState }

func (CacheRedisConfigurationPtrOutput) AofBackupEnabled

func (CacheRedisConfigurationPtrOutput) AofStorageConnectionString0

func (o CacheRedisConfigurationPtrOutput) AofStorageConnectionString0() pulumi.StringPtrOutput

func (CacheRedisConfigurationPtrOutput) AofStorageConnectionString1

func (o CacheRedisConfigurationPtrOutput) AofStorageConnectionString1() pulumi.StringPtrOutput

func (CacheRedisConfigurationPtrOutput) Elem

func (CacheRedisConfigurationPtrOutput) ElementType

func (CacheRedisConfigurationPtrOutput) EnableAuthentication

func (o CacheRedisConfigurationPtrOutput) EnableAuthentication() pulumi.BoolPtrOutput

If set to `false`, the Redis instance will be accessible without authentication. Defaults to `true`.

func (CacheRedisConfigurationPtrOutput) Maxclients

Returns the max number of connected clients at the same time.

func (CacheRedisConfigurationPtrOutput) MaxfragmentationmemoryReserved

func (o CacheRedisConfigurationPtrOutput) MaxfragmentationmemoryReserved() pulumi.IntPtrOutput

Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below.

func (CacheRedisConfigurationPtrOutput) MaxmemoryDelta

The max-memory delta for this Redis instance. Defaults are shown below.

func (CacheRedisConfigurationPtrOutput) MaxmemoryPolicy

How Redis will select what to remove when `maxmemory` is reached. Defaults are shown below.

func (CacheRedisConfigurationPtrOutput) MaxmemoryReserved

Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below.

func (CacheRedisConfigurationPtrOutput) NotifyKeyspaceEvents

func (o CacheRedisConfigurationPtrOutput) NotifyKeyspaceEvents() pulumi.StringPtrOutput

Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. [Reference](https://redis.io/topics/notifications#configuration)

func (CacheRedisConfigurationPtrOutput) RdbBackupEnabled

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

func (CacheRedisConfigurationPtrOutput) RdbBackupFrequency

func (o CacheRedisConfigurationPtrOutput) RdbBackupFrequency() pulumi.IntPtrOutput

The Backup Frequency in Minutes. Only supported on Premium SKU's. Possible values are: `15`, `30`, `60`, `360`, `720` and `1440`.

func (CacheRedisConfigurationPtrOutput) RdbBackupMaxSnapshotCount

func (o CacheRedisConfigurationPtrOutput) RdbBackupMaxSnapshotCount() pulumi.IntPtrOutput

The maximum number of snapshots to create as a backup. Only supported for Premium SKU's.

func (CacheRedisConfigurationPtrOutput) RdbStorageConnectionString

func (o CacheRedisConfigurationPtrOutput) RdbStorageConnectionString() pulumi.StringPtrOutput

The Connection String to the Storage Account. Only supported for Premium SKU's. In the format: `DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}`.

func (CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutput

func (o CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutput() CacheRedisConfigurationPtrOutput

func (CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutputWithContext

func (o CacheRedisConfigurationPtrOutput) ToCacheRedisConfigurationPtrOutputWithContext(ctx context.Context) CacheRedisConfigurationPtrOutput

type CacheState

type CacheState struct {
	// The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4`.
	Capacity pulumi.IntPtrInput
	// Enable the non-SSL port (6379) - disabled by default.
	EnableNonSslPort pulumi.BoolPtrInput
	// The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`)
	Family pulumi.StringPtrInput
	// The Hostname of the Redis Instance
	Hostname pulumi.StringPtrInput
	// The location of the resource group.
	Location pulumi.StringPtrInput
	// The minimum TLS version.  Defaults to `1.0`.
	MinimumTlsVersion pulumi.StringPtrInput
	// The name of the Redis instance. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// A list of `patchSchedule` blocks as defined below - only available for Premium SKU's.
	PatchSchedules CachePatchScheduleArrayInput
	// The non-SSL Port of the Redis Instance
	Port pulumi.IntPtrInput
	// The Primary Access Key for the Redis Instance
	PrimaryAccessKey pulumi.StringPtrInput
	// The primary connection string of the Redis Instance.
	PrimaryConnectionString pulumi.StringPtrInput
	// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. Changing this forces a new resource to be created.
	PrivateStaticIpAddress pulumi.StringPtrInput
	// A `redisConfiguration` as defined below - with some limitations by SKU - defaults/details are shown below.
	RedisConfiguration CacheRedisConfigurationPtrInput
	// The name of the resource group in which to
	// create the Redis instance.
	ResourceGroupName pulumi.StringPtrInput
	// The Secondary Access Key for the Redis Instance
	SecondaryAccessKey pulumi.StringPtrInput
	// The secondary connection string of the Redis Instance.
	SecondaryConnectionString pulumi.StringPtrInput
	// *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster.
	ShardCount pulumi.IntPtrInput
	// The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`.
	SkuName pulumi.StringPtrInput
	// The SSL Port of the Redis Instance
	SslPort pulumi.IntPtrInput
	// *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created.
	SubnetId pulumi.StringPtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// A list of a single item of the Availability Zone which the Redis Cache should be allocated in.
	Zones pulumi.StringPtrInput
}

func (CacheState) ElementType

func (CacheState) ElementType() reflect.Type

type FirewallRule

type FirewallRule struct {
	pulumi.CustomResourceState

	// The highest IP address included in the range.
	EndIp pulumi.StringOutput `pulumi:"endIp"`
	// The name of the Firewall Rule. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the Redis Cache. Changing this forces a new resource to be created.
	RedisCacheName pulumi.StringOutput `pulumi:"redisCacheName"`
	// The name of the resource group in which this Redis Cache exists.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The lowest IP address included in the range
	StartIp pulumi.StringOutput `pulumi:"startIp"`
}

Manages a Firewall Rule associated with a Redis Cache.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/redis"
"github.com/pulumi/pulumi-random/sdk/v2/go/random"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := random.NewRandomId(ctx, "server", &random.RandomIdArgs{
			Keepers: pulumi.Float64Map{
				"azi_id": pulumi.Float64(1),
			},
			ByteLength: pulumi.Int(8),
		})
		if err != nil {
			return err
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleCache, err := redis.NewCache(ctx, "exampleCache", &redis.CacheArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Capacity:          pulumi.Int(1),
			Family:            pulumi.String("P"),
			SkuName:           pulumi.String("Premium"),
			EnableNonSslPort:  pulumi.Bool(false),
			RedisConfiguration: &redis.CacheRedisConfigurationArgs{
				Maxclients:        pulumi.Int(256),
				MaxmemoryReserved: pulumi.Int(2),
				MaxmemoryDelta:    pulumi.Int(2),
				MaxmemoryPolicy:   pulumi.String("allkeys-lru"),
			},
		})
		if err != nil {
			return err
		}
		_, err = redis.NewFirewallRule(ctx, "exampleFirewallRule", &redis.FirewallRuleArgs{
			RedisCacheName:    exampleCache.Name,
			ResourceGroupName: exampleResourceGroup.Name,
			StartIp:           pulumi.String("1.2.3.4"),
			EndIp:             pulumi.String("2.3.4.5"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Redis Firewall Rules can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:redis/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/Redis/cache1/firewallRules/rule1

```

func GetFirewallRule

func GetFirewallRule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error)

GetFirewallRule gets an existing FirewallRule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewFirewallRule

func NewFirewallRule(ctx *pulumi.Context,
	name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error)

NewFirewallRule registers a new resource with the given unique name, arguments, and options.

func (FirewallRule) ElementType added in v3.31.1

func (FirewallRule) ElementType() reflect.Type

func (FirewallRule) ToFirewallRuleOutput added in v3.31.1

func (i FirewallRule) ToFirewallRuleOutput() FirewallRuleOutput

func (FirewallRule) ToFirewallRuleOutputWithContext added in v3.31.1

func (i FirewallRule) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput

type FirewallRuleArgs

type FirewallRuleArgs struct {
	// The highest IP address included in the range.
	EndIp pulumi.StringInput
	// The name of the Firewall Rule. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the Redis Cache. Changing this forces a new resource to be created.
	RedisCacheName pulumi.StringInput
	// The name of the resource group in which this Redis Cache exists.
	ResourceGroupName pulumi.StringInput
	// The lowest IP address included in the range
	StartIp pulumi.StringInput
}

The set of arguments for constructing a FirewallRule resource.

func (FirewallRuleArgs) ElementType

func (FirewallRuleArgs) ElementType() reflect.Type

type FirewallRuleInput added in v3.31.1

type FirewallRuleInput interface {
	pulumi.Input

	ToFirewallRuleOutput() FirewallRuleOutput
	ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput
}

type FirewallRuleOutput added in v3.31.1

type FirewallRuleOutput struct {
	*pulumi.OutputState
}

func (FirewallRuleOutput) ElementType added in v3.31.1

func (FirewallRuleOutput) ElementType() reflect.Type

func (FirewallRuleOutput) ToFirewallRuleOutput added in v3.31.1

func (o FirewallRuleOutput) ToFirewallRuleOutput() FirewallRuleOutput

func (FirewallRuleOutput) ToFirewallRuleOutputWithContext added in v3.31.1

func (o FirewallRuleOutput) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput

type FirewallRuleState

type FirewallRuleState struct {
	// The highest IP address included in the range.
	EndIp pulumi.StringPtrInput
	// The name of the Firewall Rule. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the Redis Cache. Changing this forces a new resource to be created.
	RedisCacheName pulumi.StringPtrInput
	// The name of the resource group in which this Redis Cache exists.
	ResourceGroupName pulumi.StringPtrInput
	// The lowest IP address included in the range
	StartIp pulumi.StringPtrInput
}

func (FirewallRuleState) ElementType

func (FirewallRuleState) ElementType() reflect.Type

type GetCachePatchSchedule

type GetCachePatchSchedule struct {
	// the Weekday name for the patch item
	DayOfWeek string `pulumi:"dayOfWeek"`
	// The Start Hour for maintenance in UTC
	StartHourUtc int `pulumi:"startHourUtc"`
}

type GetCachePatchScheduleArgs

type GetCachePatchScheduleArgs struct {
	// the Weekday name for the patch item
	DayOfWeek pulumi.StringInput `pulumi:"dayOfWeek"`
	// The Start Hour for maintenance in UTC
	StartHourUtc pulumi.IntInput `pulumi:"startHourUtc"`
}

func (GetCachePatchScheduleArgs) ElementType

func (GetCachePatchScheduleArgs) ElementType() reflect.Type

func (GetCachePatchScheduleArgs) ToGetCachePatchScheduleOutput

func (i GetCachePatchScheduleArgs) ToGetCachePatchScheduleOutput() GetCachePatchScheduleOutput

func (GetCachePatchScheduleArgs) ToGetCachePatchScheduleOutputWithContext

func (i GetCachePatchScheduleArgs) ToGetCachePatchScheduleOutputWithContext(ctx context.Context) GetCachePatchScheduleOutput

type GetCachePatchScheduleArray

type GetCachePatchScheduleArray []GetCachePatchScheduleInput

func (GetCachePatchScheduleArray) ElementType

func (GetCachePatchScheduleArray) ElementType() reflect.Type

func (GetCachePatchScheduleArray) ToGetCachePatchScheduleArrayOutput

func (i GetCachePatchScheduleArray) ToGetCachePatchScheduleArrayOutput() GetCachePatchScheduleArrayOutput

func (GetCachePatchScheduleArray) ToGetCachePatchScheduleArrayOutputWithContext

func (i GetCachePatchScheduleArray) ToGetCachePatchScheduleArrayOutputWithContext(ctx context.Context) GetCachePatchScheduleArrayOutput

type GetCachePatchScheduleArrayInput

type GetCachePatchScheduleArrayInput interface {
	pulumi.Input

	ToGetCachePatchScheduleArrayOutput() GetCachePatchScheduleArrayOutput
	ToGetCachePatchScheduleArrayOutputWithContext(context.Context) GetCachePatchScheduleArrayOutput
}

GetCachePatchScheduleArrayInput is an input type that accepts GetCachePatchScheduleArray and GetCachePatchScheduleArrayOutput values. You can construct a concrete instance of `GetCachePatchScheduleArrayInput` via:

GetCachePatchScheduleArray{ GetCachePatchScheduleArgs{...} }

type GetCachePatchScheduleArrayOutput

type GetCachePatchScheduleArrayOutput struct{ *pulumi.OutputState }

func (GetCachePatchScheduleArrayOutput) ElementType

func (GetCachePatchScheduleArrayOutput) Index

func (GetCachePatchScheduleArrayOutput) ToGetCachePatchScheduleArrayOutput

func (o GetCachePatchScheduleArrayOutput) ToGetCachePatchScheduleArrayOutput() GetCachePatchScheduleArrayOutput

func (GetCachePatchScheduleArrayOutput) ToGetCachePatchScheduleArrayOutputWithContext

func (o GetCachePatchScheduleArrayOutput) ToGetCachePatchScheduleArrayOutputWithContext(ctx context.Context) GetCachePatchScheduleArrayOutput

type GetCachePatchScheduleInput

type GetCachePatchScheduleInput interface {
	pulumi.Input

	ToGetCachePatchScheduleOutput() GetCachePatchScheduleOutput
	ToGetCachePatchScheduleOutputWithContext(context.Context) GetCachePatchScheduleOutput
}

GetCachePatchScheduleInput is an input type that accepts GetCachePatchScheduleArgs and GetCachePatchScheduleOutput values. You can construct a concrete instance of `GetCachePatchScheduleInput` via:

GetCachePatchScheduleArgs{...}

type GetCachePatchScheduleOutput

type GetCachePatchScheduleOutput struct{ *pulumi.OutputState }

func (GetCachePatchScheduleOutput) DayOfWeek

the Weekday name for the patch item

func (GetCachePatchScheduleOutput) ElementType

func (GetCachePatchScheduleOutput) StartHourUtc

func (o GetCachePatchScheduleOutput) StartHourUtc() pulumi.IntOutput

The Start Hour for maintenance in UTC

func (GetCachePatchScheduleOutput) ToGetCachePatchScheduleOutput

func (o GetCachePatchScheduleOutput) ToGetCachePatchScheduleOutput() GetCachePatchScheduleOutput

func (GetCachePatchScheduleOutput) ToGetCachePatchScheduleOutputWithContext

func (o GetCachePatchScheduleOutput) ToGetCachePatchScheduleOutputWithContext(ctx context.Context) GetCachePatchScheduleOutput

type GetCacheRedisConfiguration

type GetCacheRedisConfiguration struct {
	AofBackupEnabled            bool   `pulumi:"aofBackupEnabled"`
	AofStorageConnectionString0 string `pulumi:"aofStorageConnectionString0"`
	AofStorageConnectionString1 string `pulumi:"aofStorageConnectionString1"`
	// Specifies if authentication is enabled
	EnableAuthentication bool `pulumi:"enableAuthentication"`
	Maxclients           int  `pulumi:"maxclients"`
	// Value in megabytes reserved to accommodate for memory fragmentation.
	MaxfragmentationmemoryReserved int `pulumi:"maxfragmentationmemoryReserved"`
	// The max-memory delta for this Redis instance.
	MaxmemoryDelta int `pulumi:"maxmemoryDelta"`
	// How Redis will select what to remove when `maxmemory` is reached.
	MaxmemoryPolicy string `pulumi:"maxmemoryPolicy"`
	// The value in megabytes reserved for non-cache usage e.g. failover
	MaxmemoryReserved    int    `pulumi:"maxmemoryReserved"`
	NotifyKeyspaceEvents string `pulumi:"notifyKeyspaceEvents"`
	// Is Backup Enabled? Only supported on Premium SKU's.
	RdbBackupEnabled bool `pulumi:"rdbBackupEnabled"`
	// The Backup Frequency in Minutes. Only supported on Premium SKU's.
	RdbBackupFrequency int `pulumi:"rdbBackupFrequency"`
	// The maximum number of snapshots that can be created as a backup.
	RdbBackupMaxSnapshotCount int `pulumi:"rdbBackupMaxSnapshotCount"`
	// The Connection String to the Storage Account. Only supported for Premium SKU's.
	RdbStorageConnectionString string `pulumi:"rdbStorageConnectionString"`
}

type GetCacheRedisConfigurationArgs

type GetCacheRedisConfigurationArgs struct {
	AofBackupEnabled            pulumi.BoolInput   `pulumi:"aofBackupEnabled"`
	AofStorageConnectionString0 pulumi.StringInput `pulumi:"aofStorageConnectionString0"`
	AofStorageConnectionString1 pulumi.StringInput `pulumi:"aofStorageConnectionString1"`
	// Specifies if authentication is enabled
	EnableAuthentication pulumi.BoolInput `pulumi:"enableAuthentication"`
	Maxclients           pulumi.IntInput  `pulumi:"maxclients"`
	// Value in megabytes reserved to accommodate for memory fragmentation.
	MaxfragmentationmemoryReserved pulumi.IntInput `pulumi:"maxfragmentationmemoryReserved"`
	// The max-memory delta for this Redis instance.
	MaxmemoryDelta pulumi.IntInput `pulumi:"maxmemoryDelta"`
	// How Redis will select what to remove when `maxmemory` is reached.
	MaxmemoryPolicy pulumi.StringInput `pulumi:"maxmemoryPolicy"`
	// The value in megabytes reserved for non-cache usage e.g. failover
	MaxmemoryReserved    pulumi.IntInput    `pulumi:"maxmemoryReserved"`
	NotifyKeyspaceEvents pulumi.StringInput `pulumi:"notifyKeyspaceEvents"`
	// Is Backup Enabled? Only supported on Premium SKU's.
	RdbBackupEnabled pulumi.BoolInput `pulumi:"rdbBackupEnabled"`
	// The Backup Frequency in Minutes. Only supported on Premium SKU's.
	RdbBackupFrequency pulumi.IntInput `pulumi:"rdbBackupFrequency"`
	// The maximum number of snapshots that can be created as a backup.
	RdbBackupMaxSnapshotCount pulumi.IntInput `pulumi:"rdbBackupMaxSnapshotCount"`
	// The Connection String to the Storage Account. Only supported for Premium SKU's.
	RdbStorageConnectionString pulumi.StringInput `pulumi:"rdbStorageConnectionString"`
}

func (GetCacheRedisConfigurationArgs) ElementType

func (GetCacheRedisConfigurationArgs) ToGetCacheRedisConfigurationOutput

func (i GetCacheRedisConfigurationArgs) ToGetCacheRedisConfigurationOutput() GetCacheRedisConfigurationOutput

func (GetCacheRedisConfigurationArgs) ToGetCacheRedisConfigurationOutputWithContext

func (i GetCacheRedisConfigurationArgs) ToGetCacheRedisConfigurationOutputWithContext(ctx context.Context) GetCacheRedisConfigurationOutput

type GetCacheRedisConfigurationArray

type GetCacheRedisConfigurationArray []GetCacheRedisConfigurationInput

func (GetCacheRedisConfigurationArray) ElementType

func (GetCacheRedisConfigurationArray) ToGetCacheRedisConfigurationArrayOutput

func (i GetCacheRedisConfigurationArray) ToGetCacheRedisConfigurationArrayOutput() GetCacheRedisConfigurationArrayOutput

func (GetCacheRedisConfigurationArray) ToGetCacheRedisConfigurationArrayOutputWithContext

func (i GetCacheRedisConfigurationArray) ToGetCacheRedisConfigurationArrayOutputWithContext(ctx context.Context) GetCacheRedisConfigurationArrayOutput

type GetCacheRedisConfigurationArrayInput

type GetCacheRedisConfigurationArrayInput interface {
	pulumi.Input

	ToGetCacheRedisConfigurationArrayOutput() GetCacheRedisConfigurationArrayOutput
	ToGetCacheRedisConfigurationArrayOutputWithContext(context.Context) GetCacheRedisConfigurationArrayOutput
}

GetCacheRedisConfigurationArrayInput is an input type that accepts GetCacheRedisConfigurationArray and GetCacheRedisConfigurationArrayOutput values. You can construct a concrete instance of `GetCacheRedisConfigurationArrayInput` via:

GetCacheRedisConfigurationArray{ GetCacheRedisConfigurationArgs{...} }

type GetCacheRedisConfigurationArrayOutput

type GetCacheRedisConfigurationArrayOutput struct{ *pulumi.OutputState }

func (GetCacheRedisConfigurationArrayOutput) ElementType

func (GetCacheRedisConfigurationArrayOutput) Index

func (GetCacheRedisConfigurationArrayOutput) ToGetCacheRedisConfigurationArrayOutput

func (o GetCacheRedisConfigurationArrayOutput) ToGetCacheRedisConfigurationArrayOutput() GetCacheRedisConfigurationArrayOutput

func (GetCacheRedisConfigurationArrayOutput) ToGetCacheRedisConfigurationArrayOutputWithContext

func (o GetCacheRedisConfigurationArrayOutput) ToGetCacheRedisConfigurationArrayOutputWithContext(ctx context.Context) GetCacheRedisConfigurationArrayOutput

type GetCacheRedisConfigurationInput

type GetCacheRedisConfigurationInput interface {
	pulumi.Input

	ToGetCacheRedisConfigurationOutput() GetCacheRedisConfigurationOutput
	ToGetCacheRedisConfigurationOutputWithContext(context.Context) GetCacheRedisConfigurationOutput
}

GetCacheRedisConfigurationInput is an input type that accepts GetCacheRedisConfigurationArgs and GetCacheRedisConfigurationOutput values. You can construct a concrete instance of `GetCacheRedisConfigurationInput` via:

GetCacheRedisConfigurationArgs{...}

type GetCacheRedisConfigurationOutput

type GetCacheRedisConfigurationOutput struct{ *pulumi.OutputState }

func (GetCacheRedisConfigurationOutput) AofBackupEnabled

func (o GetCacheRedisConfigurationOutput) AofBackupEnabled() pulumi.BoolOutput

func (GetCacheRedisConfigurationOutput) AofStorageConnectionString0

func (o GetCacheRedisConfigurationOutput) AofStorageConnectionString0() pulumi.StringOutput

func (GetCacheRedisConfigurationOutput) AofStorageConnectionString1

func (o GetCacheRedisConfigurationOutput) AofStorageConnectionString1() pulumi.StringOutput

func (GetCacheRedisConfigurationOutput) ElementType

func (GetCacheRedisConfigurationOutput) EnableAuthentication

func (o GetCacheRedisConfigurationOutput) EnableAuthentication() pulumi.BoolOutput

Specifies if authentication is enabled

func (GetCacheRedisConfigurationOutput) Maxclients

func (GetCacheRedisConfigurationOutput) MaxfragmentationmemoryReserved

func (o GetCacheRedisConfigurationOutput) MaxfragmentationmemoryReserved() pulumi.IntOutput

Value in megabytes reserved to accommodate for memory fragmentation.

func (GetCacheRedisConfigurationOutput) MaxmemoryDelta

The max-memory delta for this Redis instance.

func (GetCacheRedisConfigurationOutput) MaxmemoryPolicy

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

func (GetCacheRedisConfigurationOutput) MaxmemoryReserved

func (o GetCacheRedisConfigurationOutput) MaxmemoryReserved() pulumi.IntOutput

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

func (GetCacheRedisConfigurationOutput) NotifyKeyspaceEvents

func (o GetCacheRedisConfigurationOutput) NotifyKeyspaceEvents() pulumi.StringOutput

func (GetCacheRedisConfigurationOutput) RdbBackupEnabled

func (o GetCacheRedisConfigurationOutput) RdbBackupEnabled() pulumi.BoolOutput

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

func (GetCacheRedisConfigurationOutput) RdbBackupFrequency

func (o GetCacheRedisConfigurationOutput) RdbBackupFrequency() pulumi.IntOutput

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

func (GetCacheRedisConfigurationOutput) RdbBackupMaxSnapshotCount

func (o GetCacheRedisConfigurationOutput) RdbBackupMaxSnapshotCount() pulumi.IntOutput

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

func (GetCacheRedisConfigurationOutput) RdbStorageConnectionString

func (o GetCacheRedisConfigurationOutput) RdbStorageConnectionString() pulumi.StringOutput

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

func (GetCacheRedisConfigurationOutput) ToGetCacheRedisConfigurationOutput

func (o GetCacheRedisConfigurationOutput) ToGetCacheRedisConfigurationOutput() GetCacheRedisConfigurationOutput

func (GetCacheRedisConfigurationOutput) ToGetCacheRedisConfigurationOutputWithContext

func (o GetCacheRedisConfigurationOutput) ToGetCacheRedisConfigurationOutputWithContext(ctx context.Context) GetCacheRedisConfigurationOutput

type LinkedServer added in v3.16.0

type LinkedServer struct {
	pulumi.CustomResourceState

	// The ID of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheId pulumi.StringOutput `pulumi:"linkedRedisCacheId"`
	// The location of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheLocation pulumi.StringOutput `pulumi:"linkedRedisCacheLocation"`
	// The name of the linked server.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created.
	ServerRole pulumi.StringOutput `pulumi:"serverRole"`
	// The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role)
	TargetRedisCacheName pulumi.StringOutput `pulumi:"targetRedisCacheName"`
}

Manages a Redis Linked Server (ie Geo Location)

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"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 {
		_, err := core.NewResourceGroup(ctx, "example_primaryResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("East US"),
		})
		if err != nil {
			return err
		}
		_, err = redis.NewCache(ctx, "example_primaryCache", &redis.CacheArgs{
			Location:          example_primaryResourceGroup.Location,
			ResourceGroupName: example_primaryResourceGroup.Name,
			Capacity:          pulumi.Int(1),
			Family:            pulumi.String("P"),
			SkuName:           pulumi.String("Premium"),
			EnableNonSslPort:  pulumi.Bool(false),
			RedisConfiguration: &redis.CacheRedisConfigurationArgs{
				MaxmemoryReserved: pulumi.Int(2),
				MaxmemoryDelta:    pulumi.Int(2),
				MaxmemoryPolicy:   pulumi.String("allkeys-lru"),
			},
		})
		if err != nil {
			return err
		}
		_, err = core.NewResourceGroup(ctx, "example_secondaryResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West US"),
		})
		if err != nil {
			return err
		}
		_, err = redis.NewCache(ctx, "example_secondaryCache", &redis.CacheArgs{
			Location:          example_secondaryResourceGroup.Location,
			ResourceGroupName: example_secondaryResourceGroup.Name,
			Capacity:          pulumi.Int(1),
			Family:            pulumi.String("P"),
			SkuName:           pulumi.String("Premium"),
			EnableNonSslPort:  pulumi.Bool(false),
			RedisConfiguration: &redis.CacheRedisConfigurationArgs{
				MaxmemoryReserved: pulumi.Int(2),
				MaxmemoryDelta:    pulumi.Int(2),
				MaxmemoryPolicy:   pulumi.String("allkeys-lru"),
			},
		})
		if err != nil {
			return err
		}
		_, err = redis.NewLinkedServer(ctx, "example_link", &redis.LinkedServerArgs{
			TargetRedisCacheName:     example_primaryCache.Name,
			ResourceGroupName:        example_primaryCache.ResourceGroupName,
			LinkedRedisCacheId:       example_secondaryCache.ID(),
			LinkedRedisCacheLocation: example_secondaryCache.Location,
			ServerRole:               pulumi.String("Secondary"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Redis can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:redis/linkedServer:LinkedServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/Redis/cache1/linkedServers/cache2

```

func GetLinkedServer added in v3.16.0

func GetLinkedServer(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LinkedServerState, opts ...pulumi.ResourceOption) (*LinkedServer, error)

GetLinkedServer gets an existing LinkedServer resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLinkedServer added in v3.16.0

func NewLinkedServer(ctx *pulumi.Context,
	name string, args *LinkedServerArgs, opts ...pulumi.ResourceOption) (*LinkedServer, error)

NewLinkedServer registers a new resource with the given unique name, arguments, and options.

func (LinkedServer) ElementType added in v3.31.1

func (LinkedServer) ElementType() reflect.Type

func (LinkedServer) ToLinkedServerOutput added in v3.31.1

func (i LinkedServer) ToLinkedServerOutput() LinkedServerOutput

func (LinkedServer) ToLinkedServerOutputWithContext added in v3.31.1

func (i LinkedServer) ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput

type LinkedServerArgs added in v3.16.0

type LinkedServerArgs struct {
	// The ID of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheId pulumi.StringInput
	// The location of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheLocation pulumi.StringInput
	// The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created.
	ResourceGroupName pulumi.StringInput
	// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created.
	ServerRole pulumi.StringInput
	// The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role)
	TargetRedisCacheName pulumi.StringInput
}

The set of arguments for constructing a LinkedServer resource.

func (LinkedServerArgs) ElementType added in v3.16.0

func (LinkedServerArgs) ElementType() reflect.Type

type LinkedServerInput added in v3.31.1

type LinkedServerInput interface {
	pulumi.Input

	ToLinkedServerOutput() LinkedServerOutput
	ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput
}

type LinkedServerOutput added in v3.31.1

type LinkedServerOutput struct {
	*pulumi.OutputState
}

func (LinkedServerOutput) ElementType added in v3.31.1

func (LinkedServerOutput) ElementType() reflect.Type

func (LinkedServerOutput) ToLinkedServerOutput added in v3.31.1

func (o LinkedServerOutput) ToLinkedServerOutput() LinkedServerOutput

func (LinkedServerOutput) ToLinkedServerOutputWithContext added in v3.31.1

func (o LinkedServerOutput) ToLinkedServerOutputWithContext(ctx context.Context) LinkedServerOutput

type LinkedServerState added in v3.16.0

type LinkedServerState struct {
	// The ID of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheId pulumi.StringPtrInput
	// The location of the linked Redis cache. Changing this forces a new Redis to be created.
	LinkedRedisCacheLocation pulumi.StringPtrInput
	// The name of the linked server.
	Name pulumi.StringPtrInput
	// The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created.
	ServerRole pulumi.StringPtrInput
	// The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role)
	TargetRedisCacheName pulumi.StringPtrInput
}

func (LinkedServerState) ElementType added in v3.16.0

func (LinkedServerState) ElementType() reflect.Type

type LookupCacheArgs

type LookupCacheArgs struct {
	// The name of the Redis cache
	Name string `pulumi:"name"`
	// The name of the resource group the Redis cache instance is located in.
	ResourceGroupName string   `pulumi:"resourceGroupName"`
	Zones             []string `pulumi:"zones"`
}

A collection of arguments for invoking getCache.

type LookupCacheResult

type LookupCacheResult struct {
	// The size of the Redis Cache deployed.
	Capacity int `pulumi:"capacity"`
	// Whether the SSL port is enabled.
	EnableNonSslPort bool `pulumi:"enableNonSslPort"`
	// The SKU family/pricing group used. Possible values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`)
	Family string `pulumi:"family"`
	// The Hostname of the Redis Instance
	Hostname string `pulumi:"hostname"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// The location of the Redis Cache.
	Location string `pulumi:"location"`
	// The minimum TLS version.
	MinimumTlsVersion string `pulumi:"minimumTlsVersion"`
	Name              string `pulumi:"name"`
	// A list of `patchSchedule` blocks as defined below - only available for Premium SKU's.
	PatchSchedules []GetCachePatchSchedule `pulumi:"patchSchedules"`
	// The non-SSL Port of the Redis Instance
	Port int `pulumi:"port"`
	// The Primary Access Key for the Redis Instance
	PrimaryAccessKey string `pulumi:"primaryAccessKey"`
	// The primary connection string of the Redis Instance.
	PrimaryConnectionString string `pulumi:"primaryConnectionString"`
	PrivateStaticIpAddress  string `pulumi:"privateStaticIpAddress"`
	// A `redisConfiguration` block as defined below.
	RedisConfigurations []GetCacheRedisConfiguration `pulumi:"redisConfigurations"`
	ResourceGroupName   string                       `pulumi:"resourceGroupName"`
	// The Secondary Access Key for the Redis Instance
	SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
	// The secondary connection string of the Redis Instance.
	SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
	ShardCount                int    `pulumi:"shardCount"`
	// The SKU of Redis used. Possible values are `Basic`, `Standard` and `Premium`.
	SkuName string `pulumi:"skuName"`
	// The SSL Port of the Redis Instance
	SslPort  int               `pulumi:"sslPort"`
	SubnetId string            `pulumi:"subnetId"`
	Tags     map[string]string `pulumi:"tags"`
	Zones    []string          `pulumi:"zones"`
}

A collection of values returned by getCache.

func LookupCache

func LookupCache(ctx *pulumi.Context, args *LookupCacheArgs, opts ...pulumi.InvokeOption) (*LookupCacheResult, error)

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

## Example Usage

```go 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
	})
}

```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL