import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The basic unit of Redis cache database is the instance. An instance is an independent, virtualized database runtime environment, consisting of multiple data nodes and proxy nodes. The Redis engine runs on the data nodes. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const redisInstanceDemo = new volcenginecc.redis.Instance("RedisInstanceDemo", { * configureNodes: [ * { * az: "cn-beijing-a", * }, * { * az: "cn-beijing-b", * }, * ], * multiAz: "enabled", * tags: [{ * key: "env", * value: "test", * }], * projectName: "default", * vpcId: "vpc-xxxxx", * subnetId: "subnet-xxxxx", * deletionProtection: "enabled", * port: 9999, * autoRenew: false, * chargeType: "PostPaid", * engineVersion: "6.0", * shardCapacity: 512, * shardNumber: 2, * nodeNumber: 2, * allowListIds: ["acl-cnlfwmfaqdefxxxxx"], * password: "********", * shardedCluster: 1, * instanceName: "ccapi-auto-test", * noAuthMode: "open", * parameterGroupId: "DefaultParamGroupId-6.0", * continuousBackup: true, * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:redis/instance:Instance example "instance_id" * ``` */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: InstanceState, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Instance; /** * Allowlist ID list. If left empty, the new instance will not be added to any allowlist by default. You can call the DescribeAllowLists API to query all IP allowlist information, including allowlist IDs, for the specified region under your account. Each instance supports binding up to 100 allowlists, and you can batch bind up to 100 allowlists at a time. Each instance supports binding up to 1000 IP addresses or CIDR-format IP address ranges. */ readonly allowListIds: pulumi.Output; /** * Whether to enable auto-renewal. Value options: false (default): Disabled; true: Enabled. */ readonly autoRenew: pulumi.Output; /** * Set a backup name for the full backup created before changes. */ readonly backupPointName: pulumi.Output; /** * Restore data from the backup set to the original Redis instance. */ readonly backupRestore: pulumi.Output; /** * Blue-green deployment role of the instance. Valid values: Blue: blue instance. Green: green instance. This parameter is returned only for Redis instances that have used the blue-green deployment feature. */ readonly blueGreenRole: pulumi.Output; /** * Capacity information of the instance. */ readonly capacity: pulumi.Output; /** * Instance billing type. Value options: PrePaid: Subscription (also called prepaid). PostPaid: Pay-as-you-go (also called postpaid). */ readonly chargeType: pulumi.Output; readonly configureNodes: pulumi.Output; /** * Enable data flashback */ readonly continuousBackup: pulumi.Output; /** * Whether to create a backup before making changes. */ readonly createBackup: pulumi.Output; /** * Creation time of the instance. */ readonly createTime: pulumi.Output; /** * Data storage type of the instance. This parameter is only relevant for Enterprise Edition instances (ServiceType=Enterprise). Community Edition instances (ServiceType=Basic) do not involve data storage type, and DataLayout is always set to RAM. If this parameter is left empty, data storage type is not used as a filter. */ readonly dataLayout: pulumi.Output; /** * Enable or disable instance deletion protection. disabled: Off. enabled: On. */ readonly deletionProtection: pulumi.Output; /** * Database version number. Valid values: 5.0: Version 5.0. 6.0: Version 6.0. 7.0: Version 7.0. */ readonly engineVersion: pulumi.Output; /** * Instance expiration time. */ readonly expiredTime: pulumi.Output; /** * Type of Redis instance. Valid values: PrimarySecondary: primary-secondary instance; Standalone: single-node instance. If this parameter is left empty, instance type is not used as a filter. For more information about instance types, see Product Architecture. */ readonly instanceClass: pulumi.Output; /** * Instance ID. */ readonly instanceId: pulumi.Output; /** * Instance name. Naming rules: Cannot start with a digit or hyphen (-); can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-); length must be 1–128 characters. */ readonly instanceName: pulumi.Output; readonly instanceShards: pulumi.Output; /** * Maintenance window for the instance, format: HH:mm-HH:mm (UTC+8). */ readonly maintenanceTime: pulumi.Output; /** * Current maximum connections per shard for the instance. The default connection limit per shard is 10,000. You can also call the ModifyDBInstanceMaxConn API to adjust the maximum connections per shard based on your business needs. */ readonly maxConnections: pulumi.Output; /** * Set the instance's availability zone deployment scheme. Valid values: enabled: Multi-availability zone deployment. disabled: Single availability zone deployment. */ readonly multiAz: pulumi.Output; /** * Enable or disable password-free access for new instances. Valid values: open: enable password-free access; close (default): disable password-free access. */ readonly noAuthMode: pulumi.Output; /** * List of Proxy and Server node IDs. */ readonly nodeIds: pulumi.Output; /** * Number of nodes in each shard. Value range: 1–6. By default, each account can create up to 4 nodes of 256 MiB specification per region. To increase the quota limit to 10, see Account Quotas. A value of 1 creates a single-node instance; a value greater than 1 creates a primary-secondary instance. For details on the differences between these two types of instances, see Feature Differences. */ readonly nodeNumber: pulumi.Output; /** * The parameter template to be applied to the new instance. Redis for Cache Database creates a default system parameter template for each database version, which includes all parameters supported by that version and their default values. If this parameter is left blank, the system will select and apply the corresponding version's system parameter template for the new instance based on the database version you set (i.e., EngineVersion). You can call the DescribeParameterGroups API to query basic information about all parameter templates under your account and region, including the parameter template ID. */ readonly parameterGroupId: pulumi.Output; /** * Set the password for the default account of the default database. */ readonly password: pulumi.Output; /** * Custom port number for the private network connection address. Value range: 1024~65535. If this parameter is left blank, the private network connection address uses port 6379 by default. After the instance is created, you can also modify the port number of the private network address. For instructions, see Modify Port Number. */ readonly port: pulumi.Output; /** * The domain name for the instance's private network connection address. */ readonly privateAddress: pulumi.Output; /** * Port number for the instance's private network connection address. */ readonly privatePort: pulumi.Output; /** * Project to which the instance belongs. */ readonly projectName: pulumi.Output; /** * Purchase duration, unit: month. Value options: Monthly purchase: 1, 2, 3, 4, 5, 6, 7, 8, 9. Annual purchase: 12, 24, 36. When ChargeType is PrePaid, this parameter is required. */ readonly purchaseMonths: pulumi.Output; /** * Set whether to reserve additional bandwidth */ readonly reserveAdditionalBandwidth: pulumi.Output; /** * Restart instance? Only instances with the status Running support restart operations. During the restart process, access to some services may be temporarily affected. Proceed with caution. It is recommended to restart during off-peak hours and ensure your application supports automatic reconnection. */ readonly restartInstance: pulumi.Output; /** * Instance service type. Valid values: Basic: Community Edition. Enterprise: Enterprise Edition. */ readonly serviceType: pulumi.Output; /** * Memory capacity of each shard in the instance. Unit: MiB. */ readonly shardCapacity: pulumi.Output; /** * Number of shards in the instance. Value range: 2–256. Specify this parameter only when ShardedCluster is set to 1 (enabled). */ readonly shardNumber: pulumi.Output; /** * Whether to enable sharded cluster. Value options: 0: Disabled. 1: Enabled. */ readonly shardedCluster: pulumi.Output; /** * Current status of the instance. */ readonly status: pulumi.Output; /** * Set the subnet ID for the instance. Subnets have availability zone attributes; you must select a subnet in the target private network that belongs to the same availability zone as the instance. A subnet is an IP address block within a private network. All cloud resources in the private network must be deployed in a subnet. The subnet assigns private IP addresses to cloud resources. You can call the CreateSubnet API to create a subnet. You can call the DescribeSubnets API to query the list of all subnets in a specified availability zone, including subnet IDs. */ readonly subnetId: pulumi.Output; readonly tags: pulumi.Output; /** * The IPv6 address corresponding to the instance's private network connection address. This parameter is returned only if the instance uses an IPv6 address. */ readonly viPv6: pulumi.Output; /** * IPv4 address corresponding to the instance's private network connection address. */ readonly vip: pulumi.Output; readonly visitAddrs: pulumi.Output; /** * Enable or disable password-free access. Valid values: open: enable password-free access; close: disable password-free access. Values are case-insensitive. */ readonly vpcAuthMode: pulumi.Output; /** * Set the private network ID for the instance. It is recommended that the Redis instance and the ECS instance you want to connect to are in the same private network; otherwise, they cannot communicate optimally via the internal network. You can call the CreateVpc API to create a private network. You can call the DescribeVpcs API to query private network information that meets specified conditions, including the private network ID. */ readonly vpcId: pulumi.Output; /** * List of available zones where the instance is located. */ readonly zoneIds: pulumi.Output; /** * Create a Instance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Instance resources. */ export interface InstanceState { /** * Allowlist ID list. If left empty, the new instance will not be added to any allowlist by default. You can call the DescribeAllowLists API to query all IP allowlist information, including allowlist IDs, for the specified region under your account. Each instance supports binding up to 100 allowlists, and you can batch bind up to 100 allowlists at a time. Each instance supports binding up to 1000 IP addresses or CIDR-format IP address ranges. */ allowListIds?: pulumi.Input[]>; /** * Whether to enable auto-renewal. Value options: false (default): Disabled; true: Enabled. */ autoRenew?: pulumi.Input; /** * Set a backup name for the full backup created before changes. */ backupPointName?: pulumi.Input; /** * Restore data from the backup set to the original Redis instance. */ backupRestore?: pulumi.Input; /** * Blue-green deployment role of the instance. Valid values: Blue: blue instance. Green: green instance. This parameter is returned only for Redis instances that have used the blue-green deployment feature. */ blueGreenRole?: pulumi.Input; /** * Capacity information of the instance. */ capacity?: pulumi.Input; /** * Instance billing type. Value options: PrePaid: Subscription (also called prepaid). PostPaid: Pay-as-you-go (also called postpaid). */ chargeType?: pulumi.Input; configureNodes?: pulumi.Input[]>; /** * Enable data flashback */ continuousBackup?: pulumi.Input; /** * Whether to create a backup before making changes. */ createBackup?: pulumi.Input; /** * Creation time of the instance. */ createTime?: pulumi.Input; /** * Data storage type of the instance. This parameter is only relevant for Enterprise Edition instances (ServiceType=Enterprise). Community Edition instances (ServiceType=Basic) do not involve data storage type, and DataLayout is always set to RAM. If this parameter is left empty, data storage type is not used as a filter. */ dataLayout?: pulumi.Input; /** * Enable or disable instance deletion protection. disabled: Off. enabled: On. */ deletionProtection?: pulumi.Input; /** * Database version number. Valid values: 5.0: Version 5.0. 6.0: Version 6.0. 7.0: Version 7.0. */ engineVersion?: pulumi.Input; /** * Instance expiration time. */ expiredTime?: pulumi.Input; /** * Type of Redis instance. Valid values: PrimarySecondary: primary-secondary instance; Standalone: single-node instance. If this parameter is left empty, instance type is not used as a filter. For more information about instance types, see Product Architecture. */ instanceClass?: pulumi.Input; /** * Instance ID. */ instanceId?: pulumi.Input; /** * Instance name. Naming rules: Cannot start with a digit or hyphen (-); can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-); length must be 1–128 characters. */ instanceName?: pulumi.Input; instanceShards?: pulumi.Input[]>; /** * Maintenance window for the instance, format: HH:mm-HH:mm (UTC+8). */ maintenanceTime?: pulumi.Input; /** * Current maximum connections per shard for the instance. The default connection limit per shard is 10,000. You can also call the ModifyDBInstanceMaxConn API to adjust the maximum connections per shard based on your business needs. */ maxConnections?: pulumi.Input; /** * Set the instance's availability zone deployment scheme. Valid values: enabled: Multi-availability zone deployment. disabled: Single availability zone deployment. */ multiAz?: pulumi.Input; /** * Enable or disable password-free access for new instances. Valid values: open: enable password-free access; close (default): disable password-free access. */ noAuthMode?: pulumi.Input; /** * List of Proxy and Server node IDs. */ nodeIds?: pulumi.Input[]>; /** * Number of nodes in each shard. Value range: 1–6. By default, each account can create up to 4 nodes of 256 MiB specification per region. To increase the quota limit to 10, see Account Quotas. A value of 1 creates a single-node instance; a value greater than 1 creates a primary-secondary instance. For details on the differences between these two types of instances, see Feature Differences. */ nodeNumber?: pulumi.Input; /** * The parameter template to be applied to the new instance. Redis for Cache Database creates a default system parameter template for each database version, which includes all parameters supported by that version and their default values. If this parameter is left blank, the system will select and apply the corresponding version's system parameter template for the new instance based on the database version you set (i.e., EngineVersion). You can call the DescribeParameterGroups API to query basic information about all parameter templates under your account and region, including the parameter template ID. */ parameterGroupId?: pulumi.Input; /** * Set the password for the default account of the default database. */ password?: pulumi.Input; /** * Custom port number for the private network connection address. Value range: 1024~65535. If this parameter is left blank, the private network connection address uses port 6379 by default. After the instance is created, you can also modify the port number of the private network address. For instructions, see Modify Port Number. */ port?: pulumi.Input; /** * The domain name for the instance's private network connection address. */ privateAddress?: pulumi.Input; /** * Port number for the instance's private network connection address. */ privatePort?: pulumi.Input; /** * Project to which the instance belongs. */ projectName?: pulumi.Input; /** * Purchase duration, unit: month. Value options: Monthly purchase: 1, 2, 3, 4, 5, 6, 7, 8, 9. Annual purchase: 12, 24, 36. When ChargeType is PrePaid, this parameter is required. */ purchaseMonths?: pulumi.Input; /** * Set whether to reserve additional bandwidth */ reserveAdditionalBandwidth?: pulumi.Input; /** * Restart instance? Only instances with the status Running support restart operations. During the restart process, access to some services may be temporarily affected. Proceed with caution. It is recommended to restart during off-peak hours and ensure your application supports automatic reconnection. */ restartInstance?: pulumi.Input; /** * Instance service type. Valid values: Basic: Community Edition. Enterprise: Enterprise Edition. */ serviceType?: pulumi.Input; /** * Memory capacity of each shard in the instance. Unit: MiB. */ shardCapacity?: pulumi.Input; /** * Number of shards in the instance. Value range: 2–256. Specify this parameter only when ShardedCluster is set to 1 (enabled). */ shardNumber?: pulumi.Input; /** * Whether to enable sharded cluster. Value options: 0: Disabled. 1: Enabled. */ shardedCluster?: pulumi.Input; /** * Current status of the instance. */ status?: pulumi.Input; /** * Set the subnet ID for the instance. Subnets have availability zone attributes; you must select a subnet in the target private network that belongs to the same availability zone as the instance. A subnet is an IP address block within a private network. All cloud resources in the private network must be deployed in a subnet. The subnet assigns private IP addresses to cloud resources. You can call the CreateSubnet API to create a subnet. You can call the DescribeSubnets API to query the list of all subnets in a specified availability zone, including subnet IDs. */ subnetId?: pulumi.Input; tags?: pulumi.Input[]>; /** * The IPv6 address corresponding to the instance's private network connection address. This parameter is returned only if the instance uses an IPv6 address. */ viPv6?: pulumi.Input; /** * IPv4 address corresponding to the instance's private network connection address. */ vip?: pulumi.Input; visitAddrs?: pulumi.Input[]>; /** * Enable or disable password-free access. Valid values: open: enable password-free access; close: disable password-free access. Values are case-insensitive. */ vpcAuthMode?: pulumi.Input; /** * Set the private network ID for the instance. It is recommended that the Redis instance and the ECS instance you want to connect to are in the same private network; otherwise, they cannot communicate optimally via the internal network. You can call the CreateVpc API to create a private network. You can call the DescribeVpcs API to query private network information that meets specified conditions, including the private network ID. */ vpcId?: pulumi.Input; /** * List of available zones where the instance is located. */ zoneIds?: pulumi.Input[]>; } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * Allowlist ID list. If left empty, the new instance will not be added to any allowlist by default. You can call the DescribeAllowLists API to query all IP allowlist information, including allowlist IDs, for the specified region under your account. Each instance supports binding up to 100 allowlists, and you can batch bind up to 100 allowlists at a time. Each instance supports binding up to 1000 IP addresses or CIDR-format IP address ranges. */ allowListIds?: pulumi.Input[]>; /** * Whether to enable auto-renewal. Value options: false (default): Disabled; true: Enabled. */ autoRenew?: pulumi.Input; /** * Set a backup name for the full backup created before changes. */ backupPointName?: pulumi.Input; /** * Restore data from the backup set to the original Redis instance. */ backupRestore?: pulumi.Input; /** * Instance billing type. Value options: PrePaid: Subscription (also called prepaid). PostPaid: Pay-as-you-go (also called postpaid). */ chargeType?: pulumi.Input; configureNodes: pulumi.Input[]>; /** * Enable data flashback */ continuousBackup?: pulumi.Input; /** * Whether to create a backup before making changes. */ createBackup?: pulumi.Input; /** * Enable or disable instance deletion protection. disabled: Off. enabled: On. */ deletionProtection?: pulumi.Input; /** * Database version number. Valid values: 5.0: Version 5.0. 6.0: Version 6.0. 7.0: Version 7.0. */ engineVersion: pulumi.Input; /** * Instance name. Naming rules: Cannot start with a digit or hyphen (-); can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-); length must be 1–128 characters. */ instanceName?: pulumi.Input; /** * Set the instance's availability zone deployment scheme. Valid values: enabled: Multi-availability zone deployment. disabled: Single availability zone deployment. */ multiAz: pulumi.Input; /** * Enable or disable password-free access for new instances. Valid values: open: enable password-free access; close (default): disable password-free access. */ noAuthMode?: pulumi.Input; /** * Number of nodes in each shard. Value range: 1–6. By default, each account can create up to 4 nodes of 256 MiB specification per region. To increase the quota limit to 10, see Account Quotas. A value of 1 creates a single-node instance; a value greater than 1 creates a primary-secondary instance. For details on the differences between these two types of instances, see Feature Differences. */ nodeNumber: pulumi.Input; /** * The parameter template to be applied to the new instance. Redis for Cache Database creates a default system parameter template for each database version, which includes all parameters supported by that version and their default values. If this parameter is left blank, the system will select and apply the corresponding version's system parameter template for the new instance based on the database version you set (i.e., EngineVersion). You can call the DescribeParameterGroups API to query basic information about all parameter templates under your account and region, including the parameter template ID. */ parameterGroupId?: pulumi.Input; /** * Set the password for the default account of the default database. */ password?: pulumi.Input; /** * Custom port number for the private network connection address. Value range: 1024~65535. If this parameter is left blank, the private network connection address uses port 6379 by default. After the instance is created, you can also modify the port number of the private network address. For instructions, see Modify Port Number. */ port?: pulumi.Input; /** * Project to which the instance belongs. */ projectName?: pulumi.Input; /** * Purchase duration, unit: month. Value options: Monthly purchase: 1, 2, 3, 4, 5, 6, 7, 8, 9. Annual purchase: 12, 24, 36. When ChargeType is PrePaid, this parameter is required. */ purchaseMonths?: pulumi.Input; /** * Set whether to reserve additional bandwidth */ reserveAdditionalBandwidth?: pulumi.Input; /** * Restart instance? Only instances with the status Running support restart operations. During the restart process, access to some services may be temporarily affected. Proceed with caution. It is recommended to restart during off-peak hours and ensure your application supports automatic reconnection. */ restartInstance?: pulumi.Input; /** * Memory capacity of each shard in the instance. Unit: MiB. */ shardCapacity: pulumi.Input; /** * Number of shards in the instance. Value range: 2–256. Specify this parameter only when ShardedCluster is set to 1 (enabled). */ shardNumber?: pulumi.Input; /** * Whether to enable sharded cluster. Value options: 0: Disabled. 1: Enabled. */ shardedCluster: pulumi.Input; /** * Set the subnet ID for the instance. Subnets have availability zone attributes; you must select a subnet in the target private network that belongs to the same availability zone as the instance. A subnet is an IP address block within a private network. All cloud resources in the private network must be deployed in a subnet. The subnet assigns private IP addresses to cloud resources. You can call the CreateSubnet API to create a subnet. You can call the DescribeSubnets API to query the list of all subnets in a specified availability zone, including subnet IDs. */ subnetId: pulumi.Input; tags?: pulumi.Input[]>; /** * Set the private network ID for the instance. It is recommended that the Redis instance and the ECS instance you want to connect to are in the same private network; otherwise, they cannot communicate optimally via the internal network. You can call the CreateVpc API to create a private network. You can call the DescribeVpcs API to query private network information that meets specified conditions, including the private network ID. */ vpcId: pulumi.Input; }