1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCdhInstances
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getCdhInstances

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query CDH instances.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const list = tencentcloud.getCdhInstances({
        availabilityZone: "ap-guangzhou-3",
        hostId: "host-d6s7i5q4",
        hostName: "test",
        hostState: "RUNNING",
        projectId: 1154137,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    list = tencentcloud.get_cdh_instances(availability_zone="ap-guangzhou-3",
        host_id="host-d6s7i5q4",
        host_name="test",
        host_state="RUNNING",
        project_id=1154137)
    
    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.GetCdhInstances(ctx, &tencentcloud.GetCdhInstancesArgs{
    			AvailabilityZone: pulumi.StringRef("ap-guangzhou-3"),
    			HostId:           pulumi.StringRef("host-d6s7i5q4"),
    			HostName:         pulumi.StringRef("test"),
    			HostState:        pulumi.StringRef("RUNNING"),
    			ProjectId:        pulumi.Float64Ref(1154137),
    		}, 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 list = Tencentcloud.GetCdhInstances.Invoke(new()
        {
            AvailabilityZone = "ap-guangzhou-3",
            HostId = "host-d6s7i5q4",
            HostName = "test",
            HostState = "RUNNING",
            ProjectId = 1154137,
        });
    
    });
    
    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.GetCdhInstancesArgs;
    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 list = TencentcloudFunctions.getCdhInstances(GetCdhInstancesArgs.builder()
                .availabilityZone("ap-guangzhou-3")
                .hostId("host-d6s7i5q4")
                .hostName("test")
                .hostState("RUNNING")
                .projectId(1154137)
                .build());
    
        }
    }
    
    variables:
      list:
        fn::invoke:
          function: tencentcloud:getCdhInstances
          arguments:
            availabilityZone: ap-guangzhou-3
            hostId: host-d6s7i5q4
            hostName: test
            hostState: RUNNING
            projectId: 1.154137e+06
    

    Using getCdhInstances

    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 getCdhInstances(args: GetCdhInstancesArgs, opts?: InvokeOptions): Promise<GetCdhInstancesResult>
    function getCdhInstancesOutput(args: GetCdhInstancesOutputArgs, opts?: InvokeOptions): Output<GetCdhInstancesResult>
    def get_cdh_instances(availability_zone: Optional[str] = None,
                          host_id: Optional[str] = None,
                          host_name: Optional[str] = None,
                          host_state: Optional[str] = None,
                          id: Optional[str] = None,
                          project_id: Optional[float] = None,
                          result_output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCdhInstancesResult
    def get_cdh_instances_output(availability_zone: Optional[pulumi.Input[str]] = None,
                          host_id: Optional[pulumi.Input[str]] = None,
                          host_name: Optional[pulumi.Input[str]] = None,
                          host_state: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[float]] = None,
                          result_output_file: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCdhInstancesResult]
    func GetCdhInstances(ctx *Context, args *GetCdhInstancesArgs, opts ...InvokeOption) (*GetCdhInstancesResult, error)
    func GetCdhInstancesOutput(ctx *Context, args *GetCdhInstancesOutputArgs, opts ...InvokeOption) GetCdhInstancesResultOutput

    > Note: This function is named GetCdhInstances in the Go SDK.

    public static class GetCdhInstances 
    {
        public static Task<GetCdhInstancesResult> InvokeAsync(GetCdhInstancesArgs args, InvokeOptions? opts = null)
        public static Output<GetCdhInstancesResult> Invoke(GetCdhInstancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCdhInstancesResult> getCdhInstances(GetCdhInstancesArgs args, InvokeOptions options)
    public static Output<GetCdhInstancesResult> getCdhInstances(GetCdhInstancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCdhInstances:getCdhInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AvailabilityZone string
    The available zone that the CDH instance locates at.
    HostId string
    ID of the CDH instances to be queried.
    HostName string
    Name of the CDH instances to be queried.
    HostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    Id string
    ProjectId double
    The project CDH belongs to.
    ResultOutputFile string
    Used to save results.
    AvailabilityZone string
    The available zone that the CDH instance locates at.
    HostId string
    ID of the CDH instances to be queried.
    HostName string
    Name of the CDH instances to be queried.
    HostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    Id string
    ProjectId float64
    The project CDH belongs to.
    ResultOutputFile string
    Used to save results.
    availabilityZone String
    The available zone that the CDH instance locates at.
    hostId String
    ID of the CDH instances to be queried.
    hostName String
    Name of the CDH instances to be queried.
    hostState String
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    id String
    projectId Double
    The project CDH belongs to.
    resultOutputFile String
    Used to save results.
    availabilityZone string
    The available zone that the CDH instance locates at.
    hostId string
    ID of the CDH instances to be queried.
    hostName string
    Name of the CDH instances to be queried.
    hostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    id string
    projectId number
    The project CDH belongs to.
    resultOutputFile string
    Used to save results.
    availability_zone str
    The available zone that the CDH instance locates at.
    host_id str
    ID of the CDH instances to be queried.
    host_name str
    Name of the CDH instances to be queried.
    host_state str
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    id str
    project_id float
    The project CDH belongs to.
    result_output_file str
    Used to save results.
    availabilityZone String
    The available zone that the CDH instance locates at.
    hostId String
    ID of the CDH instances to be queried.
    hostName String
    Name of the CDH instances to be queried.
    hostState String
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    id String
    projectId Number
    The project CDH belongs to.
    resultOutputFile String
    Used to save results.

    getCdhInstances Result

    The following output properties are available:

    CdhInstanceLists List<GetCdhInstancesCdhInstanceList>
    An information list of cdh instance. Each element contains the following attributes:
    Id string
    AvailabilityZone string
    The available zone that the CDH instance locates at.
    HostId string
    ID of the CDH instance.
    HostName string
    Name of the CDH instance.
    HostState string
    State of the CDH instance.
    ProjectId double
    The project CDH belongs to.
    ResultOutputFile string
    CdhInstanceLists []GetCdhInstancesCdhInstanceList
    An information list of cdh instance. Each element contains the following attributes:
    Id string
    AvailabilityZone string
    The available zone that the CDH instance locates at.
    HostId string
    ID of the CDH instance.
    HostName string
    Name of the CDH instance.
    HostState string
    State of the CDH instance.
    ProjectId float64
    The project CDH belongs to.
    ResultOutputFile string
    cdhInstanceLists List<GetCdhInstancesCdhInstanceList>
    An information list of cdh instance. Each element contains the following attributes:
    id String
    availabilityZone String
    The available zone that the CDH instance locates at.
    hostId String
    ID of the CDH instance.
    hostName String
    Name of the CDH instance.
    hostState String
    State of the CDH instance.
    projectId Double
    The project CDH belongs to.
    resultOutputFile String
    cdhInstanceLists GetCdhInstancesCdhInstanceList[]
    An information list of cdh instance. Each element contains the following attributes:
    id string
    availabilityZone string
    The available zone that the CDH instance locates at.
    hostId string
    ID of the CDH instance.
    hostName string
    Name of the CDH instance.
    hostState string
    State of the CDH instance.
    projectId number
    The project CDH belongs to.
    resultOutputFile string
    cdh_instance_lists Sequence[GetCdhInstancesCdhInstanceList]
    An information list of cdh instance. Each element contains the following attributes:
    id str
    availability_zone str
    The available zone that the CDH instance locates at.
    host_id str
    ID of the CDH instance.
    host_name str
    Name of the CDH instance.
    host_state str
    State of the CDH instance.
    project_id float
    The project CDH belongs to.
    result_output_file str
    cdhInstanceLists List<Property Map>
    An information list of cdh instance. Each element contains the following attributes:
    id String
    availabilityZone String
    The available zone that the CDH instance locates at.
    hostId String
    ID of the CDH instance.
    hostName String
    Name of the CDH instance.
    hostState String
    State of the CDH instance.
    projectId Number
    The project CDH belongs to.
    resultOutputFile String

    Supporting Types

    GetCdhInstancesCdhInstanceList

    AvailabilityZone string
    The available zone that the CDH instance locates at.
    CageId string
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    ChargeType string
    The charge type of the CDH instance.
    CreateTime string
    Creation time of the CDH instance.
    CvmInstanceIds List<string>
    Id of CVM instances that have been created on the CDH instance.
    ExpiredTime string
    Expired time of the CDH instance.
    HostId string
    ID of the CDH instances to be queried.
    HostName string
    Name of the CDH instances to be queried.
    HostResources List<GetCdhInstancesCdhInstanceListHostResource>
    An information list of host resource. Each element contains the following attributes:
    HostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    HostType string
    Type of the CDH instance.
    PrepaidRenewFlag string
    Auto renewal flag.
    ProjectId double
    The project CDH belongs to.
    AvailabilityZone string
    The available zone that the CDH instance locates at.
    CageId string
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    ChargeType string
    The charge type of the CDH instance.
    CreateTime string
    Creation time of the CDH instance.
    CvmInstanceIds []string
    Id of CVM instances that have been created on the CDH instance.
    ExpiredTime string
    Expired time of the CDH instance.
    HostId string
    ID of the CDH instances to be queried.
    HostName string
    Name of the CDH instances to be queried.
    HostResources []GetCdhInstancesCdhInstanceListHostResource
    An information list of host resource. Each element contains the following attributes:
    HostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    HostType string
    Type of the CDH instance.
    PrepaidRenewFlag string
    Auto renewal flag.
    ProjectId float64
    The project CDH belongs to.
    availabilityZone String
    The available zone that the CDH instance locates at.
    cageId String
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    chargeType String
    The charge type of the CDH instance.
    createTime String
    Creation time of the CDH instance.
    cvmInstanceIds List<String>
    Id of CVM instances that have been created on the CDH instance.
    expiredTime String
    Expired time of the CDH instance.
    hostId String
    ID of the CDH instances to be queried.
    hostName String
    Name of the CDH instances to be queried.
    hostResources List<GetCdhInstancesCdhInstanceListHostResource>
    An information list of host resource. Each element contains the following attributes:
    hostState String
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    hostType String
    Type of the CDH instance.
    prepaidRenewFlag String
    Auto renewal flag.
    projectId Double
    The project CDH belongs to.
    availabilityZone string
    The available zone that the CDH instance locates at.
    cageId string
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    chargeType string
    The charge type of the CDH instance.
    createTime string
    Creation time of the CDH instance.
    cvmInstanceIds string[]
    Id of CVM instances that have been created on the CDH instance.
    expiredTime string
    Expired time of the CDH instance.
    hostId string
    ID of the CDH instances to be queried.
    hostName string
    Name of the CDH instances to be queried.
    hostResources GetCdhInstancesCdhInstanceListHostResource[]
    An information list of host resource. Each element contains the following attributes:
    hostState string
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    hostType string
    Type of the CDH instance.
    prepaidRenewFlag string
    Auto renewal flag.
    projectId number
    The project CDH belongs to.
    availability_zone str
    The available zone that the CDH instance locates at.
    cage_id str
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    charge_type str
    The charge type of the CDH instance.
    create_time str
    Creation time of the CDH instance.
    cvm_instance_ids Sequence[str]
    Id of CVM instances that have been created on the CDH instance.
    expired_time str
    Expired time of the CDH instance.
    host_id str
    ID of the CDH instances to be queried.
    host_name str
    Name of the CDH instances to be queried.
    host_resources Sequence[GetCdhInstancesCdhInstanceListHostResource]
    An information list of host resource. Each element contains the following attributes:
    host_state str
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    host_type str
    Type of the CDH instance.
    prepaid_renew_flag str
    Auto renewal flag.
    project_id float
    The project CDH belongs to.
    availabilityZone String
    The available zone that the CDH instance locates at.
    cageId String
    Cage ID of the CDH instance. This parameter is only valid for CDH instances in the cages of finance availability zones.
    chargeType String
    The charge type of the CDH instance.
    createTime String
    Creation time of the CDH instance.
    cvmInstanceIds List<String>
    Id of CVM instances that have been created on the CDH instance.
    expiredTime String
    Expired time of the CDH instance.
    hostId String
    ID of the CDH instances to be queried.
    hostName String
    Name of the CDH instances to be queried.
    hostResources List<Property Map>
    An information list of host resource. Each element contains the following attributes:
    hostState String
    State of the CDH instances to be queried. Valid values: PENDING, LAUNCH_FAILURE, RUNNING, EXPIRED.
    hostType String
    Type of the CDH instance.
    prepaidRenewFlag String
    Auto renewal flag.
    projectId Number
    The project CDH belongs to.

    GetCdhInstancesCdhInstanceListHostResource

    CpuAvailableNum double
    The number of available CPU cores of the instance.
    CpuTotalNum double
    The number of total CPU cores of the instance.
    DiskAvailableSize double
    Instance disk available capacity, unit in GB.
    DiskTotalSize double
    Instance disk total capacity, unit in GB.
    DiskType string
    Type of the disk.
    MemoryAvailableSize double
    Instance memory available capacity, unit in GB.
    MemoryTotalSize double
    Instance memory total capacity, unit in GB.
    CpuAvailableNum float64
    The number of available CPU cores of the instance.
    CpuTotalNum float64
    The number of total CPU cores of the instance.
    DiskAvailableSize float64
    Instance disk available capacity, unit in GB.
    DiskTotalSize float64
    Instance disk total capacity, unit in GB.
    DiskType string
    Type of the disk.
    MemoryAvailableSize float64
    Instance memory available capacity, unit in GB.
    MemoryTotalSize float64
    Instance memory total capacity, unit in GB.
    cpuAvailableNum Double
    The number of available CPU cores of the instance.
    cpuTotalNum Double
    The number of total CPU cores of the instance.
    diskAvailableSize Double
    Instance disk available capacity, unit in GB.
    diskTotalSize Double
    Instance disk total capacity, unit in GB.
    diskType String
    Type of the disk.
    memoryAvailableSize Double
    Instance memory available capacity, unit in GB.
    memoryTotalSize Double
    Instance memory total capacity, unit in GB.
    cpuAvailableNum number
    The number of available CPU cores of the instance.
    cpuTotalNum number
    The number of total CPU cores of the instance.
    diskAvailableSize number
    Instance disk available capacity, unit in GB.
    diskTotalSize number
    Instance disk total capacity, unit in GB.
    diskType string
    Type of the disk.
    memoryAvailableSize number
    Instance memory available capacity, unit in GB.
    memoryTotalSize number
    Instance memory total capacity, unit in GB.
    cpu_available_num float
    The number of available CPU cores of the instance.
    cpu_total_num float
    The number of total CPU cores of the instance.
    disk_available_size float
    Instance disk available capacity, unit in GB.
    disk_total_size float
    Instance disk total capacity, unit in GB.
    disk_type str
    Type of the disk.
    memory_available_size float
    Instance memory available capacity, unit in GB.
    memory_total_size float
    Instance memory total capacity, unit in GB.
    cpuAvailableNum Number
    The number of available CPU cores of the instance.
    cpuTotalNum Number
    The number of total CPU cores of the instance.
    diskAvailableSize Number
    Instance disk available capacity, unit in GB.
    diskTotalSize Number
    Instance disk total capacity, unit in GB.
    diskType String
    Type of the disk.
    memoryAvailableSize Number
    Instance memory available capacity, unit in GB.
    memoryTotalSize Number
    Instance memory total capacity, unit in GB.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack