volcengine.redis.Instance
Explore with Pulumi AI
Import
redis instance can be imported using the id, e.g.
$ pulumi import volcengine:redis/instance:Instance default redis-n769ewmjjqyqh5dv
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.Zones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Redis.Instance("fooInstance", new()
{
ZoneIds = new[]
{
fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
},
InstanceName = "tf-test",
ShardedCluster = 1,
Password = "1qaz!QAZ12",
NodeNumber = 2,
ShardCapacity = 1024,
ShardNumber = 2,
EngineVersion = "5.0",
SubnetId = fooSubnet.Id,
DeletionProtection = "disabled",
VpcAuthMode = "close",
ChargeType = "PostPaid",
Port = 6381,
ProjectName = "default",
Tags = new[]
{
new Volcengine.Redis.Inputs.InstanceTagArgs
{
Key = "k1",
Value = "v1",
},
new Volcengine.Redis.Inputs.InstanceTagArgs
{
Key = "k3",
Value = "v3",
},
},
ParamValues = new[]
{
new Volcengine.Redis.Inputs.InstanceParamValueArgs
{
Name = "active-defrag-cycle-min",
Value = "5",
},
new Volcengine.Redis.Inputs.InstanceParamValueArgs
{
Name = "active-defrag-cycle-max",
Value = "28",
},
},
BackupPeriods = new[]
{
1,
2,
3,
},
BackupHour = 6,
BackupActive = true,
CreateBackup = false,
ApplyImmediately = true,
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/redis"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.Zones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
_, err = redis.NewInstance(ctx, "fooInstance", &redis.InstanceArgs{
ZoneIds: pulumi.StringArray{
*pulumi.String(fooZones.Zones[0].Id),
},
InstanceName: pulumi.String("tf-test"),
ShardedCluster: pulumi.Int(1),
Password: pulumi.String("1qaz!QAZ12"),
NodeNumber: pulumi.Int(2),
ShardCapacity: pulumi.Int(1024),
ShardNumber: pulumi.Int(2),
EngineVersion: pulumi.String("5.0"),
SubnetId: fooSubnet.ID(),
DeletionProtection: pulumi.String("disabled"),
VpcAuthMode: pulumi.String("close"),
ChargeType: pulumi.String("PostPaid"),
Port: pulumi.Int(6381),
ProjectName: pulumi.String("default"),
Tags: redis.InstanceTagArray{
&redis.InstanceTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
&redis.InstanceTagArgs{
Key: pulumi.String("k3"),
Value: pulumi.String("v3"),
},
},
ParamValues: redis.InstanceParamValueArray{
&redis.InstanceParamValueArgs{
Name: pulumi.String("active-defrag-cycle-min"),
Value: pulumi.String("5"),
},
&redis.InstanceParamValueArgs{
Name: pulumi.String("active-defrag-cycle-max"),
Value: pulumi.String("28"),
},
},
BackupPeriods: pulumi.IntArray{
pulumi.Int(1),
pulumi.Int(2),
pulumi.Int(3),
},
BackupHour: pulumi.Int(6),
BackupActive: pulumi.Bool(true),
CreateBackup: pulumi.Bool(false),
ApplyImmediately: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.redis.Instance;
import com.pulumi.volcengine.redis.InstanceArgs;
import com.pulumi.volcengine.redis.inputs.InstanceTagArgs;
import com.pulumi.volcengine.redis.inputs.InstanceParamValueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var fooZones = EcsFunctions.Zones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.zoneIds(fooZones.applyValue(zonesResult -> zonesResult.zones()[0].id()))
.instanceName("tf-test")
.shardedCluster(1)
.password("1qaz!QAZ12")
.nodeNumber(2)
.shardCapacity(1024)
.shardNumber(2)
.engineVersion("5.0")
.subnetId(fooSubnet.id())
.deletionProtection("disabled")
.vpcAuthMode("close")
.chargeType("PostPaid")
.port(6381)
.projectName("default")
.tags(
InstanceTagArgs.builder()
.key("k1")
.value("v1")
.build(),
InstanceTagArgs.builder()
.key("k3")
.value("v3")
.build())
.paramValues(
InstanceParamValueArgs.builder()
.name("active-defrag-cycle-min")
.value("5")
.build(),
InstanceParamValueArgs.builder()
.name("active-defrag-cycle-max")
.value("28")
.build())
.backupPeriods(
1,
2,
3)
.backupHour(6)
.backupActive(true)
.createBackup(false)
.applyImmediately(true)
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.redis.Instance("fooInstance",
zone_ids=[foo_zones.zones[0].id],
instance_name="tf-test",
sharded_cluster=1,
password="1qaz!QAZ12",
node_number=2,
shard_capacity=1024,
shard_number=2,
engine_version="5.0",
subnet_id=foo_subnet.id,
deletion_protection="disabled",
vpc_auth_mode="close",
charge_type="PostPaid",
port=6381,
project_name="default",
tags=[
volcengine.redis.InstanceTagArgs(
key="k1",
value="v1",
),
volcengine.redis.InstanceTagArgs(
key="k3",
value="v3",
),
],
param_values=[
volcengine.redis.InstanceParamValueArgs(
name="active-defrag-cycle-min",
value="5",
),
volcengine.redis.InstanceParamValueArgs(
name="active-defrag-cycle-max",
value="28",
),
],
backup_periods=[
1,
2,
3,
],
backup_hour=6,
backup_active=True,
create_backup=False,
apply_immediately=True)
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.redis.Instance("fooInstance", {
zoneIds: [fooZones.then(fooZones => fooZones.zones?.[0]?.id)],
instanceName: "tf-test",
shardedCluster: 1,
password: "1qaz!QAZ12",
nodeNumber: 2,
shardCapacity: 1024,
shardNumber: 2,
engineVersion: "5.0",
subnetId: fooSubnet.id,
deletionProtection: "disabled",
vpcAuthMode: "close",
chargeType: "PostPaid",
port: 6381,
projectName: "default",
tags: [
{
key: "k1",
value: "v1",
},
{
key: "k3",
value: "v3",
},
],
paramValues: [
{
name: "active-defrag-cycle-min",
value: "5",
},
{
name: "active-defrag-cycle-max",
value: "28",
},
],
backupPeriods: [
1,
2,
3,
],
backupHour: 6,
backupActive: true,
createBackup: false,
applyImmediately: true,
});
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:redis:Instance
properties:
zoneIds:
- ${fooZones.zones[0].id}
instanceName: tf-test
shardedCluster: 1
password: 1qaz!QAZ12
nodeNumber: 2
shardCapacity: 1024
shardNumber: 2
engineVersion: '5.0'
subnetId: ${fooSubnet.id}
deletionProtection: disabled
vpcAuthMode: close
chargeType: PostPaid
port: 6381
projectName: default
tags:
- key: k1
value: v1
- key: k3
value: v3
paramValues:
- name: active-defrag-cycle-min
value: '5'
- name: active-defrag-cycle-max
value: '28'
backupPeriods:
- 1
- 2
- 3
backupHour: 6
backupActive: true
createBackup: false
applyImmediately: true
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:Zones
Arguments: {}
Create Instance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
@overload
def Instance(resource_name: str,
args: InstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Instance(resource_name: str,
opts: Optional[ResourceOptions] = None,
engine_version: Optional[str] = None,
zone_ids: Optional[Sequence[str]] = None,
subnet_id: Optional[str] = None,
sharded_cluster: Optional[int] = None,
shard_capacity: Optional[int] = None,
password: Optional[str] = None,
node_number: Optional[int] = None,
charge_type: Optional[str] = None,
project_name: Optional[str] = None,
instance_name: Optional[str] = None,
create_backup: Optional[bool] = None,
param_values: Optional[Sequence[InstanceParamValueArgs]] = None,
apply_immediately: Optional[bool] = None,
port: Optional[int] = None,
deletion_protection: Optional[str] = None,
purchase_months: Optional[int] = None,
backup_periods: Optional[Sequence[int]] = None,
shard_number: Optional[int] = None,
backup_hour: Optional[int] = None,
backup_active: Optional[bool] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
vpc_auth_mode: Optional[str] = None,
auto_renew: Optional[bool] = None)
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
public Instance(String name, InstanceArgs args)
public Instance(String name, InstanceArgs args, CustomResourceOptions options)
type: volcengine:redis:Instance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleinstanceResourceResourceFromRedisinstance = new Volcengine.Redis.Instance("exampleinstanceResourceResourceFromRedisinstance", new()
{
EngineVersion = "string",
ZoneIds = new[]
{
"string",
},
SubnetId = "string",
ShardedCluster = 0,
ShardCapacity = 0,
Password = "string",
NodeNumber = 0,
ChargeType = "string",
ProjectName = "string",
InstanceName = "string",
CreateBackup = false,
ParamValues = new[]
{
new Volcengine.Redis.Inputs.InstanceParamValueArgs
{
Name = "string",
Value = "string",
},
},
ApplyImmediately = false,
Port = 0,
DeletionProtection = "string",
PurchaseMonths = 0,
BackupPeriods = new[]
{
0,
},
ShardNumber = 0,
BackupHour = 0,
BackupActive = false,
Tags = new[]
{
new Volcengine.Redis.Inputs.InstanceTagArgs
{
Key = "string",
Value = "string",
},
},
VpcAuthMode = "string",
AutoRenew = false,
});
example, err := redis.NewInstance(ctx, "exampleinstanceResourceResourceFromRedisinstance", &redis.InstanceArgs{
EngineVersion: pulumi.String("string"),
ZoneIds: pulumi.StringArray{
pulumi.String("string"),
},
SubnetId: pulumi.String("string"),
ShardedCluster: pulumi.Int(0),
ShardCapacity: pulumi.Int(0),
Password: pulumi.String("string"),
NodeNumber: pulumi.Int(0),
ChargeType: pulumi.String("string"),
ProjectName: pulumi.String("string"),
InstanceName: pulumi.String("string"),
CreateBackup: pulumi.Bool(false),
ParamValues: redis.InstanceParamValueArray{
&redis.InstanceParamValueArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
ApplyImmediately: pulumi.Bool(false),
Port: pulumi.Int(0),
DeletionProtection: pulumi.String("string"),
PurchaseMonths: pulumi.Int(0),
BackupPeriods: pulumi.IntArray{
pulumi.Int(0),
},
ShardNumber: pulumi.Int(0),
BackupHour: pulumi.Int(0),
BackupActive: pulumi.Bool(false),
Tags: redis.InstanceTagArray{
&redis.InstanceTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
VpcAuthMode: pulumi.String("string"),
AutoRenew: pulumi.Bool(false),
})
var exampleinstanceResourceResourceFromRedisinstance = new Instance("exampleinstanceResourceResourceFromRedisinstance", InstanceArgs.builder()
.engineVersion("string")
.zoneIds("string")
.subnetId("string")
.shardedCluster(0)
.shardCapacity(0)
.password("string")
.nodeNumber(0)
.chargeType("string")
.projectName("string")
.instanceName("string")
.createBackup(false)
.paramValues(InstanceParamValueArgs.builder()
.name("string")
.value("string")
.build())
.applyImmediately(false)
.port(0)
.deletionProtection("string")
.purchaseMonths(0)
.backupPeriods(0)
.shardNumber(0)
.backupHour(0)
.backupActive(false)
.tags(InstanceTagArgs.builder()
.key("string")
.value("string")
.build())
.vpcAuthMode("string")
.autoRenew(false)
.build());
exampleinstance_resource_resource_from_redisinstance = volcengine.redis.Instance("exampleinstanceResourceResourceFromRedisinstance",
engine_version="string",
zone_ids=["string"],
subnet_id="string",
sharded_cluster=0,
shard_capacity=0,
password="string",
node_number=0,
charge_type="string",
project_name="string",
instance_name="string",
create_backup=False,
param_values=[{
"name": "string",
"value": "string",
}],
apply_immediately=False,
port=0,
deletion_protection="string",
purchase_months=0,
backup_periods=[0],
shard_number=0,
backup_hour=0,
backup_active=False,
tags=[{
"key": "string",
"value": "string",
}],
vpc_auth_mode="string",
auto_renew=False)
const exampleinstanceResourceResourceFromRedisinstance = new volcengine.redis.Instance("exampleinstanceResourceResourceFromRedisinstance", {
engineVersion: "string",
zoneIds: ["string"],
subnetId: "string",
shardedCluster: 0,
shardCapacity: 0,
password: "string",
nodeNumber: 0,
chargeType: "string",
projectName: "string",
instanceName: "string",
createBackup: false,
paramValues: [{
name: "string",
value: "string",
}],
applyImmediately: false,
port: 0,
deletionProtection: "string",
purchaseMonths: 0,
backupPeriods: [0],
shardNumber: 0,
backupHour: 0,
backupActive: false,
tags: [{
key: "string",
value: "string",
}],
vpcAuthMode: "string",
autoRenew: false,
});
type: volcengine:redis:Instance
properties:
applyImmediately: false
autoRenew: false
backupActive: false
backupHour: 0
backupPeriods:
- 0
chargeType: string
createBackup: false
deletionProtection: string
engineVersion: string
instanceName: string
nodeNumber: 0
paramValues:
- name: string
value: string
password: string
port: 0
projectName: string
purchaseMonths: 0
shardCapacity: 0
shardNumber: 0
shardedCluster: 0
subnetId: string
tags:
- key: string
value: string
vpcAuthMode: string
zoneIds:
- string
Instance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Instance resource accepts the following input properties:
- Engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - Node
Number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - Password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- int
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - int
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- Subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- Zone
Ids List<string> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- Apply
Immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- Auto
Renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Backup
Active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Periods List<int> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - Create
Backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- Deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - Instance
Name string - The name of the redis instance.
- Param
Values List<InstanceParam Value> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - Port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - Project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - Purchase
Months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - int
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - List<Instance
Tag> - Tags.
- Vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
- Engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - Node
Number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - Password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- int
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - int
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- Subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- Zone
Ids []string - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- Apply
Immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- Auto
Renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Backup
Active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Periods []int - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - Create
Backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- Deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - Instance
Name string - The name of the redis instance.
- Param
Values []InstanceParam Value Args - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - Port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - Project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - Purchase
Months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - int
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - []Instance
Tag Args - Tags.
- Vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
- engine
Version String - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - node
Number Integer - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - password String
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Integer
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - Integer
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id String - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- zone
Ids List<String> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately Boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew Boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active Boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour Integer - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods List<Integer> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type String - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup Boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection String - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - instance
Name String - The name of the redis instance.
- param
Values List<InstanceParam Value> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - port Integer
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name String - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months Integer - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Integer
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - List<Instance
Tag> - Tags.
- vpc
Auth StringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
- engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - node
Number number - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- number
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - number
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- zone
Ids string[] - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour number - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods number[] - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - instance
Name string - The name of the redis instance.
- param
Values InstanceParam Value[] - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - port number
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months number - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - number
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - Instance
Tag[] - Tags.
- vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
- engine_
version str - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - node_
number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - password str
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- int
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - int
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet_
id str - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- zone_
ids Sequence[str] - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply_
immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto_
renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup_
active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup_
hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup_
periods Sequence[int] - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge_
type str - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create_
backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion_
protection str - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - instance_
name str - The name of the redis instance.
- param_
values Sequence[InstanceParam Value Args] - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project_
name str - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase_
months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - int
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - Sequence[Instance
Tag Args] - Tags.
- vpc_
auth_ strmode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
- engine
Version String - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - node
Number Number - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - password String
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Number
- The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - Number
- Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id String - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- zone
Ids List<String> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately Boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew Boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active Boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour Number - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods List<Number> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type String - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup Boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection String - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - instance
Name String - The name of the redis instance.
- param
Values List<Property Map> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - port Number
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name String - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months Number - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Number
- The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - List<Property Map>
- Tags.
- vpc
Auth StringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Instance Resource
Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apply_immediately: Optional[bool] = None,
auto_renew: Optional[bool] = None,
backup_active: Optional[bool] = None,
backup_hour: Optional[int] = None,
backup_periods: Optional[Sequence[int]] = None,
charge_type: Optional[str] = None,
create_backup: Optional[bool] = None,
deletion_protection: Optional[str] = None,
engine_version: Optional[str] = None,
instance_name: Optional[str] = None,
node_number: Optional[int] = None,
param_values: Optional[Sequence[InstanceParamValueArgs]] = None,
password: Optional[str] = None,
port: Optional[int] = None,
project_name: Optional[str] = None,
purchase_months: Optional[int] = None,
shard_capacity: Optional[int] = None,
shard_number: Optional[int] = None,
sharded_cluster: Optional[int] = None,
subnet_id: Optional[str] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
vpc_auth_mode: Optional[str] = None,
zone_ids: Optional[Sequence[str]] = None) -> Instance
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Apply
Immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- Auto
Renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Backup
Active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Periods List<int> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - Create
Backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- Deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - Engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - Instance
Name string - The name of the redis instance.
- Node
Number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - Param
Values List<InstanceParam Value> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - Password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - Project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - Purchase
Months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Shard
Capacity int - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - Shard
Number int - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - Sharded
Cluster int - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- Subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- List<Instance
Tag> - Tags.
- Vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - Zone
Ids List<string> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- Apply
Immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- Auto
Renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Backup
Active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Backup
Periods []int - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- Charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - Create
Backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- Deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - Engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - Instance
Name string - The name of the redis instance.
- Node
Number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - Param
Values []InstanceParam Value Args - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - Password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- Port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - Project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - Purchase
Months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - Shard
Capacity int - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - Shard
Number int - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - Sharded
Cluster int - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- Subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- []Instance
Tag Args - Tags.
- Vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - Zone
Ids []string - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately Boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew Boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active Boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour Integer - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods List<Integer> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type String - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup Boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection String - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - engine
Version String - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - instance
Name String - The name of the redis instance.
- node
Number Integer - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - param
Values List<InstanceParam Value> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - password String
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- port Integer
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name String - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months Integer - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - shard
Capacity Integer - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - shard
Number Integer - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - sharded
Cluster Integer - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id String - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- List<Instance
Tag> - Tags.
- vpc
Auth StringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - zone
Ids List<String> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour number - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods number[] - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type string - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection string - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - engine
Version string - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - instance
Name string - The name of the redis instance.
- node
Number number - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - param
Values InstanceParam Value[] - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - password string
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- port number
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name string - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months number - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - shard
Capacity number - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - shard
Number number - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - sharded
Cluster number - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id string - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- Instance
Tag[] - Tags.
- vpc
Auth stringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - zone
Ids string[] - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply_
immediately bool - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto_
renew bool - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup_
active bool - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup_
hour int - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup_
periods Sequence[int] - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge_
type str - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create_
backup bool - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion_
protection str - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - engine_
version str - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - instance_
name str - The name of the redis instance.
- node_
number int - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - param_
values Sequence[InstanceParam Value Args] - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - password str
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- port int
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project_
name str - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase_
months int - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - shard_
capacity int - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - shard_
number int - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - sharded_
cluster int - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet_
id str - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- Sequence[Instance
Tag Args] - Tags.
- vpc_
auth_ strmode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - zone_
ids Sequence[str] - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
- apply
Immediately Boolean - Whether to apply the instance configuration change operation immediately. The value of this field is false, means that the change operation will be applied within maintenance time.
- auto
Renew Boolean - Whether to enable automatic renewal. This field is valid only when
ChargeType
isPrePaid
, the default value is false. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - backup
Active Boolean - Whether enable auto backup for redis instance. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Hour Number - The time period to start performing the backup. The valid value range is any integer between 0 and 23, where 0 means that the system will perform the backup in the period of 00:00~01:00, 1 means that the backup will be performed in the period of 01:00~02:00, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- backup
Periods List<Number> - The backup period. The valid value can be any integer between 1 and 7. Among them, 1 means backup every Monday, 2 means backup every Tuesday, and so on. This field is valid and required when updating the backup plan of primary and secondary instance.
- charge
Type String - The charge type of redis instance. Valid value:
PostPaid
,PrePaid
. - create
Backup Boolean - Whether to create a final backup when modify the instance configuration or destroy the redis instance.
- deletion
Protection String - Whether enable deletion protection for redis instance. Valid values:
enabled
,disabled
(default). - engine
Version String - The engine version of redis instance. Valid value:
4.0
,5.0
,6.0
. - instance
Name String - The name of the redis instance.
- node
Number Number - The number of nodes in each shard, the valid value range is
1-6
. When the value is 1, it means creating a single node instance, and this field can not be modified. When the value is greater than 1, it means creating a primary and secondary instance, and this field can be modified. - param
Values List<Property Map> - The configuration item information to be modified. This field can only be added or modified. Deleting this field is invalid.
When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields, or use the command
pulumi up
to perform a modification operation. - password String
- The account password. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
- port Number
- The port of custom define private network address. The valid value range is
1024-65535
. The default value is6379
. - project
Name String - The project name to which the redis instance belongs, if this parameter is empty, the new redis instance will be added to the
default
project. - purchase
Months Number - The purchase months of redis instance, the unit is month. the valid value range is as fallows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36
. This field is valid and required whenChargeType
isPrepaid
. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields. - shard
Capacity Number - The memory capacity of each shard, unit is MiB. The valid value range is as fallows: When the value of
ShardedCluster
is 0: 256, 1024, 2048, 4096, 8192, 16384, 32768, 65536. When the value ofShardedCluster
is 1: 1024, 2048, 4096, 8192, 16384. When the value ofnode_number
is 1, the value of this field can not be 256. - shard
Number Number - The number of shards in redis instance, the valid value range is
2-256
. This field is valid and required when the value ofShardedCluster
is 1. - sharded
Cluster Number - Whether enable sharded cluster for the current redis instance. Valid values: 0, 1. 0 means disable, 1 means enable.
- subnet
Id String - The subnet id of the redis instance. The specified subnet id must belong to the zone ids.
- List<Property Map>
- Tags.
- vpc
Auth StringMode - Whether to enable password-free access when connecting to an instance through a private network. Valid values:
open
,close
. - zone
Ids List<String> - The list of zone IDs of instance. When creating a single node instance, only one zone id can be specified.
Supporting Types
InstanceParamValue, InstanceParamValueArgs
InstanceTag, InstanceTagArgs
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.