tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
tencentcloud.getRedisInstances
Start a Neo task
Explain and create a tencentcloud.getRedisInstances resource
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
Use this data source to query the detail information of redis instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const redislab = tencentcloud.getRedisInstances({
zone: "ap-hongkong-1",
searchKey: "myredis",
projectId: 0,
limit: 20,
resultOutputFile: "/tmp/redis_instances",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
redislab = tencentcloud.get_redis_instances(zone="ap-hongkong-1",
search_key="myredis",
project_id=0,
limit=20,
result_output_file="/tmp/redis_instances")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.GetRedisInstances(ctx, &tencentcloud.GetRedisInstancesArgs{
Zone: pulumi.StringRef("ap-hongkong-1"),
SearchKey: pulumi.StringRef("myredis"),
ProjectId: pulumi.Float64Ref(0),
Limit: pulumi.Float64Ref(20),
ResultOutputFile: pulumi.StringRef("/tmp/redis_instances"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var redislab = Tencentcloud.GetRedisInstances.Invoke(new()
{
Zone = "ap-hongkong-1",
SearchKey = "myredis",
ProjectId = 0,
Limit = 20,
ResultOutputFile = "/tmp/redis_instances",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetRedisInstancesArgs;
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 redislab = TencentcloudFunctions.getRedisInstances(GetRedisInstancesArgs.builder()
.zone("ap-hongkong-1")
.searchKey("myredis")
.projectId(0)
.limit(20)
.resultOutputFile("/tmp/redis_instances")
.build());
}
}
variables:
redislab:
fn::invoke:
function: tencentcloud:getRedisInstances
arguments:
zone: ap-hongkong-1
searchKey: myredis
projectId: 0
limit: 20
resultOutputFile: /tmp/redis_instances
Using getRedisInstances
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRedisInstances(args: GetRedisInstancesArgs, opts?: InvokeOptions): Promise<GetRedisInstancesResult>
function getRedisInstancesOutput(args: GetRedisInstancesOutputArgs, opts?: InvokeOptions): Output<GetRedisInstancesResult>def get_redis_instances(id: Optional[str] = None,
limit: Optional[float] = None,
project_id: Optional[float] = None,
result_output_file: Optional[str] = None,
search_key: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRedisInstancesResult
def get_redis_instances_output(id: Optional[pulumi.Input[str]] = None,
limit: Optional[pulumi.Input[float]] = None,
project_id: Optional[pulumi.Input[float]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
search_key: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRedisInstancesResult]func GetRedisInstances(ctx *Context, args *GetRedisInstancesArgs, opts ...InvokeOption) (*GetRedisInstancesResult, error)
func GetRedisInstancesOutput(ctx *Context, args *GetRedisInstancesOutputArgs, opts ...InvokeOption) GetRedisInstancesResultOutput> Note: This function is named GetRedisInstances in the Go SDK.
public static class GetRedisInstances
{
public static Task<GetRedisInstancesResult> InvokeAsync(GetRedisInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetRedisInstancesResult> Invoke(GetRedisInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRedisInstancesResult> getRedisInstances(GetRedisInstancesArgs args, InvokeOptions options)
public static Output<GetRedisInstancesResult> getRedisInstances(GetRedisInstancesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getRedisInstances:getRedisInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- ID of the master or replica node.
- Limit double
- The number limitation of results for a query.
- Project
Id double - ID of the project to which redis instance belongs.
- Result
Output stringFile - Used to save results.
- Search
Key string - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- Dictionary<string, string>
- Tags of redis instance.
- Zone string
- ID of an available zone.
- Id string
- ID of the master or replica node.
- Limit float64
- The number limitation of results for a query.
- Project
Id float64 - ID of the project to which redis instance belongs.
- Result
Output stringFile - Used to save results.
- Search
Key string - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- map[string]string
- Tags of redis instance.
- Zone string
- ID of an available zone.
- id String
- ID of the master or replica node.
- limit Double
- The number limitation of results for a query.
- project
Id Double - ID of the project to which redis instance belongs.
- result
Output StringFile - Used to save results.
- search
Key String - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- Map<String,String>
- Tags of redis instance.
- zone String
- ID of an available zone.
- id string
- ID of the master or replica node.
- limit number
- The number limitation of results for a query.
- project
Id number - ID of the project to which redis instance belongs.
- result
Output stringFile - Used to save results.
- search
Key string - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- {[key: string]: string}
- Tags of redis instance.
- zone string
- ID of an available zone.
- id str
- ID of the master or replica node.
- limit float
- The number limitation of results for a query.
- project_
id float - ID of the project to which redis instance belongs.
- result_
output_ strfile - Used to save results.
- search_
key str - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- Mapping[str, str]
- Tags of redis instance.
- zone str
- ID of an available zone.
- id String
- ID of the master or replica node.
- limit Number
- The number limitation of results for a query.
- project
Id Number - ID of the project to which redis instance belongs.
- result
Output StringFile - Used to save results.
- search
Key String - Key words used to match the results, and the key words can be: instance ID, instance name and IP address.
- Map<String>
- Tags of redis instance.
- zone String
- ID of an available zone.
getRedisInstances Result
The following output properties are available:
- Id string
- ID of the master or replica node.
- Instance
Lists List<GetRedis Instances Instance List> - A list of redis instance. Each element contains the following attributes:
- Limit double
- Project
Id double - ID of the project to which a redis instance belongs.
- Result
Output stringFile - Search
Key string - Dictionary<string, string>
- Tags of an instance.
- Zone string
- Available zone to which a redis instance belongs.
- Id string
- ID of the master or replica node.
- Instance
Lists []GetRedis Instances Instance List - A list of redis instance. Each element contains the following attributes:
- Limit float64
- Project
Id float64 - ID of the project to which a redis instance belongs.
- Result
Output stringFile - Search
Key string - map[string]string
- Tags of an instance.
- Zone string
- Available zone to which a redis instance belongs.
- id String
- ID of the master or replica node.
- instance
Lists List<GetRedis Instances Instance List> - A list of redis instance. Each element contains the following attributes:
- limit Double
- project
Id Double - ID of the project to which a redis instance belongs.
- result
Output StringFile - search
Key String - Map<String,String>
- Tags of an instance.
- zone String
- Available zone to which a redis instance belongs.
- id string
- ID of the master or replica node.
- instance
Lists GetRedis Instances Instance List[] - A list of redis instance. Each element contains the following attributes:
- limit number
- project
Id number - ID of the project to which a redis instance belongs.
- result
Output stringFile - search
Key string - {[key: string]: string}
- Tags of an instance.
- zone string
- Available zone to which a redis instance belongs.
- id str
- ID of the master or replica node.
- instance_
lists Sequence[GetRedis Instances Instance List] - A list of redis instance. Each element contains the following attributes:
- limit float
- project_
id float - ID of the project to which a redis instance belongs.
- result_
output_ strfile - search_
key str - Mapping[str, str]
- Tags of an instance.
- zone str
- Available zone to which a redis instance belongs.
- id String
- ID of the master or replica node.
- instance
Lists List<Property Map> - A list of redis instance. Each element contains the following attributes:
- limit Number
- project
Id Number - ID of the project to which a redis instance belongs.
- result
Output StringFile - search
Key String - Map<String>
- Tags of an instance.
- zone String
- Available zone to which a redis instance belongs.
Supporting Types
GetRedisInstancesInstanceList
- Charge
Type string - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - Create
Time string - The time when the instance is created.
- Ip string
- IP address of an instance.
- Mem
Size double - Memory size in MB.
- Name string
- Name of a redis instance.
- Node
Infos List<GetRedis Instances Instance List Node Info> - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- Port double
- The port used to access a redis instance.
- Project
Id double - ID of the project to which redis instance belongs.
- Redis
Id string - ID of a redis instance.
- Redis
Replicas doubleNum - The number of instance copies.
- Redis
Shard doubleNum - The number of instance shard.
- Status string
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - Subnet
Id string - ID of the vpc subnet.
- Dictionary<string, string>
- Tags of redis instance.
- Type string
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - Type
Id double - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - Vpc
Id string - ID of the vpc with which the instance is associated.
- Zone string
- ID of an available zone.
- Charge
Type string - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - Create
Time string - The time when the instance is created.
- Ip string
- IP address of an instance.
- Mem
Size float64 - Memory size in MB.
- Name string
- Name of a redis instance.
- Node
Infos []GetRedis Instances Instance List Node Info - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- Port float64
- The port used to access a redis instance.
- Project
Id float64 - ID of the project to which redis instance belongs.
- Redis
Id string - ID of a redis instance.
- Redis
Replicas float64Num - The number of instance copies.
- Redis
Shard float64Num - The number of instance shard.
- Status string
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - Subnet
Id string - ID of the vpc subnet.
- map[string]string
- Tags of redis instance.
- Type string
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - Type
Id float64 - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - Vpc
Id string - ID of the vpc with which the instance is associated.
- Zone string
- ID of an available zone.
- charge
Type String - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - create
Time String - The time when the instance is created.
- ip String
- IP address of an instance.
- mem
Size Double - Memory size in MB.
- name String
- Name of a redis instance.
- node
Infos List<GetRedis Instances Instance List Node Info> - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- port Double
- The port used to access a redis instance.
- project
Id Double - ID of the project to which redis instance belongs.
- redis
Id String - ID of a redis instance.
- redis
Replicas DoubleNum - The number of instance copies.
- redis
Shard DoubleNum - The number of instance shard.
- status String
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - subnet
Id String - ID of the vpc subnet.
- Map<String,String>
- Tags of redis instance.
- type String
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - type
Id Double - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - vpc
Id String - ID of the vpc with which the instance is associated.
- zone String
- ID of an available zone.
- charge
Type string - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - create
Time string - The time when the instance is created.
- ip string
- IP address of an instance.
- mem
Size number - Memory size in MB.
- name string
- Name of a redis instance.
- node
Infos GetRedis Instances Instance List Node Info[] - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- port number
- The port used to access a redis instance.
- project
Id number - ID of the project to which redis instance belongs.
- redis
Id string - ID of a redis instance.
- redis
Replicas numberNum - The number of instance copies.
- redis
Shard numberNum - The number of instance shard.
- status string
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - subnet
Id string - ID of the vpc subnet.
- {[key: string]: string}
- Tags of redis instance.
- type string
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - type
Id number - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - vpc
Id string - ID of the vpc with which the instance is associated.
- zone string
- ID of an available zone.
- charge_
type str - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - create_
time str - The time when the instance is created.
- ip str
- IP address of an instance.
- mem_
size float - Memory size in MB.
- name str
- Name of a redis instance.
- node_
infos Sequence[GetRedis Instances Instance List Node Info] - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- port float
- The port used to access a redis instance.
- project_
id float - ID of the project to which redis instance belongs.
- redis_
id str - ID of a redis instance.
- redis_
replicas_ floatnum - The number of instance copies.
- redis_
shard_ floatnum - The number of instance shard.
- status str
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - subnet_
id str - ID of the vpc subnet.
- Mapping[str, str]
- Tags of redis instance.
- type str
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - type_
id float - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - vpc_
id str - ID of the vpc with which the instance is associated.
- zone str
- ID of an available zone.
- charge
Type String - The charge type of instance. Valid values are
POSTPAIDandPREPAID. - create
Time String - The time when the instance is created.
- ip String
- IP address of an instance.
- mem
Size Number - Memory size in MB.
- name String
- Name of a redis instance.
- node
Infos List<Property Map> - List of instance node information. Currently, information about the node type (master or replica) and node availability zone can be passed in.
- port Number
- The port used to access a redis instance.
- project
Id Number - ID of the project to which redis instance belongs.
- redis
Id String - ID of a redis instance.
- redis
Replicas NumberNum - The number of instance copies.
- redis
Shard NumberNum - The number of instance shard.
- status String
- Current status of an instance, maybe:
init,processing,online,isolateandtodelete. - subnet
Id String - ID of the vpc subnet.
- Map<String>
- Tags of redis instance.
- type String
- (Deprecated) It has been deprecated from version 1.33.1. Please use 'type_id' instead. Instance type. Available values:
master_slave_redis,master_slave_ckv,cluster_ckv,cluster_redisandstandalone_redis. - type
Id Number - Instance type. Refer to
data.tencentcloud_redis_zone_config.list.type_idget available values. - vpc
Id String - ID of the vpc with which the instance is associated.
- zone String
- ID of an available zone.
GetRedisInstancesInstanceListNodeInfo
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.35 published on Friday, Nov 7, 2025 by tencentcloudstack
