tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getInstancesSet
Start a Neo task
Explain and create a tencentcloud.getInstancesSet resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query cvm instances in parallel.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = tencentcloud.getInstancesSet({
instanceId: "ins-a81rnm8c",
instanceName: "tf_example",
availabilityZone: "ap-guangzhou-6",
projectId: 0,
vpcId: "vpc-l040hycv",
subnetId: "subnet-1to7t9au",
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.get_instances_set(instance_id="ins-a81rnm8c",
instance_name="tf_example",
availability_zone="ap-guangzhou-6",
project_id=0,
vpc_id="vpc-l040hycv",
subnet_id="subnet-1to7t9au",
tags={
"tagKey": "tagValue",
})
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.GetInstancesSet(ctx, &tencentcloud.GetInstancesSetArgs{
InstanceId: pulumi.StringRef("ins-a81rnm8c"),
InstanceName: pulumi.StringRef("tf_example"),
AvailabilityZone: pulumi.StringRef("ap-guangzhou-6"),
ProjectId: pulumi.Float64Ref(0),
VpcId: pulumi.StringRef("vpc-l040hycv"),
SubnetId: pulumi.StringRef("subnet-1to7t9au"),
Tags: map[string]interface{}{
"tagKey": "tagValue",
},
}, 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 example = Tencentcloud.GetInstancesSet.Invoke(new()
{
InstanceId = "ins-a81rnm8c",
InstanceName = "tf_example",
AvailabilityZone = "ap-guangzhou-6",
ProjectId = 0,
VpcId = "vpc-l040hycv",
SubnetId = "subnet-1to7t9au",
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
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.GetInstancesSetArgs;
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 example = TencentcloudFunctions.getInstancesSet(GetInstancesSetArgs.builder()
.instanceId("ins-a81rnm8c")
.instanceName("tf_example")
.availabilityZone("ap-guangzhou-6")
.projectId(0)
.vpcId("vpc-l040hycv")
.subnetId("subnet-1to7t9au")
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
variables:
example:
fn::invoke:
function: tencentcloud:getInstancesSet
arguments:
instanceId: ins-a81rnm8c
instanceName: tf_example
availabilityZone: ap-guangzhou-6
projectId: 0
vpcId: vpc-l040hycv
subnetId: subnet-1to7t9au
tags:
tagKey: tagValue
Using getInstancesSet
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 getInstancesSet(args: GetInstancesSetArgs, opts?: InvokeOptions): Promise<GetInstancesSetResult>
function getInstancesSetOutput(args: GetInstancesSetOutputArgs, opts?: InvokeOptions): Output<GetInstancesSetResult>def get_instances_set(availability_zone: Optional[str] = None,
id: Optional[str] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
project_id: Optional[float] = None,
result_output_file: Optional[str] = None,
subnet_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vpc_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancesSetResult
def get_instances_set_output(availability_zone: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
instance_name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
subnet_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
vpc_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancesSetResult]func GetInstancesSet(ctx *Context, args *GetInstancesSetArgs, opts ...InvokeOption) (*GetInstancesSetResult, error)
func GetInstancesSetOutput(ctx *Context, args *GetInstancesSetOutputArgs, opts ...InvokeOption) GetInstancesSetResultOutput> Note: This function is named GetInstancesSet in the Go SDK.
public static class GetInstancesSet
{
public static Task<GetInstancesSetResult> InvokeAsync(GetInstancesSetArgs args, InvokeOptions? opts = null)
public static Output<GetInstancesSetResult> Invoke(GetInstancesSetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstancesSetResult> getInstancesSet(GetInstancesSetArgs args, InvokeOptions options)
public static Output<GetInstancesSetResult> getInstancesSet(GetInstancesSetArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getInstancesSet:getInstancesSet
arguments:
# arguments dictionaryThe following arguments are supported:
- Availability
Zone string - The available zone that the CVM instance locates at.
- Id string
- Instance
Id string - ID of the instances to be queried.
- Instance
Name string - Name of the instances to be queried.
- Project
Id double - The project CVM belongs to.
- Result
Output stringFile - Used to save results.
- Subnet
Id string - ID of a vpc subnetwork.
- Dictionary<string, string>
- Tags of the instance.
- Vpc
Id string - ID of the vpc to be queried.
- Availability
Zone string - The available zone that the CVM instance locates at.
- Id string
- Instance
Id string - ID of the instances to be queried.
- Instance
Name string - Name of the instances to be queried.
- Project
Id float64 - The project CVM belongs to.
- Result
Output stringFile - Used to save results.
- Subnet
Id string - ID of a vpc subnetwork.
- map[string]string
- Tags of the instance.
- Vpc
Id string - ID of the vpc to be queried.
- availability
Zone String - The available zone that the CVM instance locates at.
- id String
- instance
Id String - ID of the instances to be queried.
- instance
Name String - Name of the instances to be queried.
- project
Id Double - The project CVM belongs to.
- result
Output StringFile - Used to save results.
- subnet
Id String - ID of a vpc subnetwork.
- Map<String,String>
- Tags of the instance.
- vpc
Id String - ID of the vpc to be queried.
- availability
Zone string - The available zone that the CVM instance locates at.
- id string
- instance
Id string - ID of the instances to be queried.
- instance
Name string - Name of the instances to be queried.
- project
Id number - The project CVM belongs to.
- result
Output stringFile - Used to save results.
- subnet
Id string - ID of a vpc subnetwork.
- {[key: string]: string}
- Tags of the instance.
- vpc
Id string - ID of the vpc to be queried.
- availability_
zone str - The available zone that the CVM instance locates at.
- id str
- instance_
id str - ID of the instances to be queried.
- instance_
name str - Name of the instances to be queried.
- project_
id float - The project CVM belongs to.
- result_
output_ strfile - Used to save results.
- subnet_
id str - ID of a vpc subnetwork.
- Mapping[str, str]
- Tags of the instance.
- vpc_
id str - ID of the vpc to be queried.
- availability
Zone String - The available zone that the CVM instance locates at.
- id String
- instance
Id String - ID of the instances to be queried.
- instance
Name String - Name of the instances to be queried.
- project
Id Number - The project CVM belongs to.
- result
Output StringFile - Used to save results.
- subnet
Id String - ID of a vpc subnetwork.
- Map<String>
- Tags of the instance.
- vpc
Id String - ID of the vpc to be queried.
getInstancesSet Result
The following output properties are available:
- Id string
- Instance
Lists List<GetInstances Set Instance List> - An information list of cvm instance. Each element contains the following attributes:
- Availability
Zone string - The available zone that the CVM instance locates at.
- Instance
Id string - ID of the instances.
- Instance
Name string - Name of the instances.
- Project
Id double - The project CVM belongs to.
- Result
Output stringFile - Subnet
Id string - ID of a vpc subnetwork.
- Dictionary<string, string>
- Tags of the instance.
- Vpc
Id string - ID of the vpc.
- Id string
- Instance
Lists []GetInstances Set Instance List - An information list of cvm instance. Each element contains the following attributes:
- Availability
Zone string - The available zone that the CVM instance locates at.
- Instance
Id string - ID of the instances.
- Instance
Name string - Name of the instances.
- Project
Id float64 - The project CVM belongs to.
- Result
Output stringFile - Subnet
Id string - ID of a vpc subnetwork.
- map[string]string
- Tags of the instance.
- Vpc
Id string - ID of the vpc.
- id String
- instance
Lists List<GetInstances Set Instance List> - An information list of cvm instance. Each element contains the following attributes:
- availability
Zone String - The available zone that the CVM instance locates at.
- instance
Id String - ID of the instances.
- instance
Name String - Name of the instances.
- project
Id Double - The project CVM belongs to.
- result
Output StringFile - subnet
Id String - ID of a vpc subnetwork.
- Map<String,String>
- Tags of the instance.
- vpc
Id String - ID of the vpc.
- id string
- instance
Lists GetInstances Set Instance List[] - An information list of cvm instance. Each element contains the following attributes:
- availability
Zone string - The available zone that the CVM instance locates at.
- instance
Id string - ID of the instances.
- instance
Name string - Name of the instances.
- project
Id number - The project CVM belongs to.
- result
Output stringFile - subnet
Id string - ID of a vpc subnetwork.
- {[key: string]: string}
- Tags of the instance.
- vpc
Id string - ID of the vpc.
- id str
- instance_
lists Sequence[GetInstances Set Instance List] - An information list of cvm instance. Each element contains the following attributes:
- availability_
zone str - The available zone that the CVM instance locates at.
- instance_
id str - ID of the instances.
- instance_
name str - Name of the instances.
- project_
id float - The project CVM belongs to.
- result_
output_ strfile - subnet_
id str - ID of a vpc subnetwork.
- Mapping[str, str]
- Tags of the instance.
- vpc_
id str - ID of the vpc.
- id String
- instance
Lists List<Property Map> - An information list of cvm instance. Each element contains the following attributes:
- availability
Zone String - The available zone that the CVM instance locates at.
- instance
Id String - ID of the instances.
- instance
Name String - Name of the instances.
- project
Id Number - The project CVM belongs to.
- result
Output StringFile - subnet
Id String - ID of a vpc subnetwork.
- Map<String>
- Tags of the instance.
- vpc
Id String - ID of the vpc.
Supporting Types
GetInstancesSetInstanceList
- Allocate
Public boolIp - Indicates whether public ip is assigned.
- Availability
Zone string - The available zone that the CVM instance locates at.
- Cam
Role stringName - CAM role name authorized to access.
- Cpu double
- The number of CPU cores of the instance.
- Create
Time string - Creation time of the instance.
- Data
Disks List<GetInstances Set Instance List Data Disk> - An information list of data disk. Each element contains the following attributes:
- Expired
Time string - Expired time of the instance.
- Image
Id string - ID of the image.
- Instance
Charge stringType - The charge type of the instance.
- Instance
Charge stringType Prepaid Renew Flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- Instance
Id string - ID of the instances to be queried.
- Instance
Name string - Name of the instances to be queried.
- Instance
Type string - Type of the instance.
- Internet
Charge stringType - The charge type of the instance.
- Internet
Max doubleBandwidth Out - Public network maximum output bandwidth of the instance.
- Memory double
- Instance memory capacity, unit in GB.
- Private
Ip string - Private IP of the instance.
- Project
Id double - The project CVM belongs to.
- Public
Ip string - Public IP of the instance.
- Security
Groups List<string> - Security groups of the instance.
- Status string
- Status of the instance.
- Subnet
Id string - ID of a vpc subnetwork.
- System
Disk stringId - Image ID of the system disk.
- System
Disk doubleSize - Size of the system disk.
- System
Disk stringType - Type of the system disk.
- Dictionary<string, string>
- Tags of the instance.
- Vpc
Id string - ID of the vpc to be queried.
- Allocate
Public boolIp - Indicates whether public ip is assigned.
- Availability
Zone string - The available zone that the CVM instance locates at.
- Cam
Role stringName - CAM role name authorized to access.
- Cpu float64
- The number of CPU cores of the instance.
- Create
Time string - Creation time of the instance.
- Data
Disks []GetInstances Set Instance List Data Disk - An information list of data disk. Each element contains the following attributes:
- Expired
Time string - Expired time of the instance.
- Image
Id string - ID of the image.
- Instance
Charge stringType - The charge type of the instance.
- Instance
Charge stringType Prepaid Renew Flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- Instance
Id string - ID of the instances to be queried.
- Instance
Name string - Name of the instances to be queried.
- Instance
Type string - Type of the instance.
- Internet
Charge stringType - The charge type of the instance.
- Internet
Max float64Bandwidth Out - Public network maximum output bandwidth of the instance.
- Memory float64
- Instance memory capacity, unit in GB.
- Private
Ip string - Private IP of the instance.
- Project
Id float64 - The project CVM belongs to.
- Public
Ip string - Public IP of the instance.
- Security
Groups []string - Security groups of the instance.
- Status string
- Status of the instance.
- Subnet
Id string - ID of a vpc subnetwork.
- System
Disk stringId - Image ID of the system disk.
- System
Disk float64Size - Size of the system disk.
- System
Disk stringType - Type of the system disk.
- map[string]string
- Tags of the instance.
- Vpc
Id string - ID of the vpc to be queried.
- allocate
Public BooleanIp - Indicates whether public ip is assigned.
- availability
Zone String - The available zone that the CVM instance locates at.
- cam
Role StringName - CAM role name authorized to access.
- cpu Double
- The number of CPU cores of the instance.
- create
Time String - Creation time of the instance.
- data
Disks List<GetInstances Set Instance List Data Disk> - An information list of data disk. Each element contains the following attributes:
- expired
Time String - Expired time of the instance.
- image
Id String - ID of the image.
- instance
Charge StringType - The charge type of the instance.
- instance
Charge StringType Prepaid Renew Flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- instance
Id String - ID of the instances to be queried.
- instance
Name String - Name of the instances to be queried.
- instance
Type String - Type of the instance.
- internet
Charge StringType - The charge type of the instance.
- internet
Max DoubleBandwidth Out - Public network maximum output bandwidth of the instance.
- memory Double
- Instance memory capacity, unit in GB.
- private
Ip String - Private IP of the instance.
- project
Id Double - The project CVM belongs to.
- public
Ip String - Public IP of the instance.
- security
Groups List<String> - Security groups of the instance.
- status String
- Status of the instance.
- subnet
Id String - ID of a vpc subnetwork.
- system
Disk StringId - Image ID of the system disk.
- system
Disk DoubleSize - Size of the system disk.
- system
Disk StringType - Type of the system disk.
- Map<String,String>
- Tags of the instance.
- vpc
Id String - ID of the vpc to be queried.
- allocate
Public booleanIp - Indicates whether public ip is assigned.
- availability
Zone string - The available zone that the CVM instance locates at.
- cam
Role stringName - CAM role name authorized to access.
- cpu number
- The number of CPU cores of the instance.
- create
Time string - Creation time of the instance.
- data
Disks GetInstances Set Instance List Data Disk[] - An information list of data disk. Each element contains the following attributes:
- expired
Time string - Expired time of the instance.
- image
Id string - ID of the image.
- instance
Charge stringType - The charge type of the instance.
- instance
Charge stringType Prepaid Renew Flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- instance
Id string - ID of the instances to be queried.
- instance
Name string - Name of the instances to be queried.
- instance
Type string - Type of the instance.
- internet
Charge stringType - The charge type of the instance.
- internet
Max numberBandwidth Out - Public network maximum output bandwidth of the instance.
- memory number
- Instance memory capacity, unit in GB.
- private
Ip string - Private IP of the instance.
- project
Id number - The project CVM belongs to.
- public
Ip string - Public IP of the instance.
- security
Groups string[] - Security groups of the instance.
- status string
- Status of the instance.
- subnet
Id string - ID of a vpc subnetwork.
- system
Disk stringId - Image ID of the system disk.
- system
Disk numberSize - Size of the system disk.
- system
Disk stringType - Type of the system disk.
- {[key: string]: string}
- Tags of the instance.
- vpc
Id string - ID of the vpc to be queried.
- allocate_
public_ boolip - Indicates whether public ip is assigned.
- availability_
zone str - The available zone that the CVM instance locates at.
- cam_
role_ strname - CAM role name authorized to access.
- cpu float
- The number of CPU cores of the instance.
- create_
time str - Creation time of the instance.
- data_
disks Sequence[GetInstances Set Instance List Data Disk] - An information list of data disk. Each element contains the following attributes:
- expired_
time str - Expired time of the instance.
- image_
id str - ID of the image.
- instance_
charge_ strtype - The charge type of the instance.
- instance_
charge_ strtype_ prepaid_ renew_ flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- instance_
id str - ID of the instances to be queried.
- instance_
name str - Name of the instances to be queried.
- instance_
type str - Type of the instance.
- internet_
charge_ strtype - The charge type of the instance.
- internet_
max_ floatbandwidth_ out - Public network maximum output bandwidth of the instance.
- memory float
- Instance memory capacity, unit in GB.
- private_
ip str - Private IP of the instance.
- project_
id float - The project CVM belongs to.
- public_
ip str - Public IP of the instance.
- security_
groups Sequence[str] - Security groups of the instance.
- status str
- Status of the instance.
- subnet_
id str - ID of a vpc subnetwork.
- system_
disk_ strid - Image ID of the system disk.
- system_
disk_ floatsize - Size of the system disk.
- system_
disk_ strtype - Type of the system disk.
- Mapping[str, str]
- Tags of the instance.
- vpc_
id str - ID of the vpc to be queried.
- allocate
Public BooleanIp - Indicates whether public ip is assigned.
- availability
Zone String - The available zone that the CVM instance locates at.
- cam
Role StringName - CAM role name authorized to access.
- cpu Number
- The number of CPU cores of the instance.
- create
Time String - Creation time of the instance.
- data
Disks List<Property Map> - An information list of data disk. Each element contains the following attributes:
- expired
Time String - Expired time of the instance.
- image
Id String - ID of the image.
- instance
Charge StringType - The charge type of the instance.
- instance
Charge StringType Prepaid Renew Flag - The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.
- instance
Id String - ID of the instances to be queried.
- instance
Name String - Name of the instances to be queried.
- instance
Type String - Type of the instance.
- internet
Charge StringType - The charge type of the instance.
- internet
Max NumberBandwidth Out - Public network maximum output bandwidth of the instance.
- memory Number
- Instance memory capacity, unit in GB.
- private
Ip String - Private IP of the instance.
- project
Id Number - The project CVM belongs to.
- public
Ip String - Public IP of the instance.
- security
Groups List<String> - Security groups of the instance.
- status String
- Status of the instance.
- subnet
Id String - ID of a vpc subnetwork.
- system
Disk StringId - Image ID of the system disk.
- system
Disk NumberSize - Size of the system disk.
- system
Disk StringType - Type of the system disk.
- Map<String>
- Tags of the instance.
- vpc
Id String - ID of the vpc to be queried.
GetInstancesSetInstanceListDataDisk
- Data
Disk stringId - Image ID of the data disk.
- Data
Disk doubleSize - Size of the data disk.
- Data
Disk stringType - Type of the data disk.
- Delete
With boolInstance - Indicates whether the data disk is destroyed with the instance.
- Data
Disk stringId - Image ID of the data disk.
- Data
Disk float64Size - Size of the data disk.
- Data
Disk stringType - Type of the data disk.
- Delete
With boolInstance - Indicates whether the data disk is destroyed with the instance.
- data
Disk StringId - Image ID of the data disk.
- data
Disk DoubleSize - Size of the data disk.
- data
Disk StringType - Type of the data disk.
- delete
With BooleanInstance - Indicates whether the data disk is destroyed with the instance.
- data
Disk stringId - Image ID of the data disk.
- data
Disk numberSize - Size of the data disk.
- data
Disk stringType - Type of the data disk.
- delete
With booleanInstance - Indicates whether the data disk is destroyed with the instance.
- data_
disk_ strid - Image ID of the data disk.
- data_
disk_ floatsize - Size of the data disk.
- data_
disk_ strtype - Type of the data disk.
- delete_
with_ boolinstance - Indicates whether the data disk is destroyed with the instance.
- data
Disk StringId - Image ID of the data disk.
- data
Disk NumberSize - Size of the data disk.
- data
Disk StringType - Type of the data disk.
- delete
With BooleanInstance - Indicates whether the data disk is destroyed with the instance.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
