1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. getClsMachineGroups
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.23
published on Friday, Aug 14, 2026 by tencentcloudstack

    Use this data source to query detailed information of cls machine_groups

    Example Usage

    Query all machine groups

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getClsMachineGroups({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cls_machine_groups()
    
    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.GetClsMachineGroups(ctx, &tencentcloud.GetClsMachineGroupsArgs{}, 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.GetClsMachineGroups.Invoke();
    
    });
    
    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.GetClsMachineGroupsArgs;
    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.getClsMachineGroups(GetClsMachineGroupsArgs.builder()
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getClsMachineGroups
          arguments: {}
    
    Example coming soon!
    

    Query machine group by filters

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getClsMachineGroups({
        filters: [
            {
                name: "machineGroupId",
                values: ["76e09d6f-e0c5-4103-bd6e-22bdbf63a76e"],
            },
            {
                name: "machineGroupName",
                values: ["cls-m26ybna6"],
            },
        ],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_cls_machine_groups(filters=[
        {
            "name": "machineGroupId",
            "values": ["76e09d6f-e0c5-4103-bd6e-22bdbf63a76e"],
        },
        {
            "name": "machineGroupName",
            "values": ["cls-m26ybna6"],
        },
    ])
    
    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.GetClsMachineGroups(ctx, &tencentcloud.GetClsMachineGroupsArgs{
    			Filters: []tencentcloud.GetClsMachineGroupsFilter{
    				{
    					Name: "machineGroupId",
    					Values: []string{
    						"76e09d6f-e0c5-4103-bd6e-22bdbf63a76e",
    					},
    				},
    				{
    					Name: "machineGroupName",
    					Values: []string{
    						"cls-m26ybna6",
    					},
    				},
    			},
    		}, 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.GetClsMachineGroups.Invoke(new()
        {
            Filters = new[]
            {
                new Tencentcloud.Inputs.GetClsMachineGroupsFilterInputArgs
                {
                    Name = "machineGroupId",
                    Values = new[]
                    {
                        "76e09d6f-e0c5-4103-bd6e-22bdbf63a76e",
                    },
                },
                new Tencentcloud.Inputs.GetClsMachineGroupsFilterInputArgs
                {
                    Name = "machineGroupName",
                    Values = new[]
                    {
                        "cls-m26ybna6",
                    },
                },
            },
        });
    
    });
    
    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.GetClsMachineGroupsArgs;
    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.getClsMachineGroups(GetClsMachineGroupsArgs.builder()
                .filters(            
                    GetClsMachineGroupsFilterArgs.builder()
                        .name("machineGroupId")
                        .values("76e09d6f-e0c5-4103-bd6e-22bdbf63a76e")
                        .build(),
                    GetClsMachineGroupsFilterArgs.builder()
                        .name("machineGroupName")
                        .values("cls-m26ybna6")
                        .build())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getClsMachineGroups
          arguments:
            filters:
              - name: machineGroupId
                values:
                  - 76e09d6f-e0c5-4103-bd6e-22bdbf63a76e
              - name: machineGroupName
                values:
                  - cls-m26ybna6
    
    Example coming soon!
    

    Using getClsMachineGroups

    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 getClsMachineGroups(args: GetClsMachineGroupsArgs, opts?: InvokeOptions): Promise<GetClsMachineGroupsResult>
    function getClsMachineGroupsOutput(args: GetClsMachineGroupsOutputArgs, opts?: InvokeOptions): Output<GetClsMachineGroupsResult>
    def get_cls_machine_groups(filters: Optional[Sequence[GetClsMachineGroupsFilter]] = None,
                               id: Optional[str] = None,
                               result_output_file: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetClsMachineGroupsResult
    def get_cls_machine_groups_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetClsMachineGroupsFilterArgs]]]] = None,
                               id: pulumi.Input[Optional[str]] = None,
                               result_output_file: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetClsMachineGroupsResult]
    func GetClsMachineGroups(ctx *Context, args *GetClsMachineGroupsArgs, opts ...InvokeOption) (*GetClsMachineGroupsResult, error)
    func GetClsMachineGroupsOutput(ctx *Context, args *GetClsMachineGroupsOutputArgs, opts ...InvokeOption) GetClsMachineGroupsResultOutput

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

    public static class GetClsMachineGroups 
    {
        public static Task<GetClsMachineGroupsResult> InvokeAsync(GetClsMachineGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetClsMachineGroupsResult> Invoke(GetClsMachineGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClsMachineGroupsResult> getClsMachineGroups(GetClsMachineGroupsArgs args, InvokeOptions options)
    public static Output<GetClsMachineGroupsResult> getClsMachineGroups(GetClsMachineGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getClsMachineGroups:getClsMachineGroups
      arguments:
        # arguments dictionary
    data "tencentcloud_get_cls_machine_groups" "name" {
        # arguments
    }

    The following arguments are supported:

    Filters List<GetClsMachineGroupsFilter>
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    Id string
    ResultOutputFile string
    Used to save results.
    Filters []GetClsMachineGroupsFilter
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    Id string
    ResultOutputFile string
    Used to save results.
    filters list(object)
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    id string
    result_output_file string
    Used to save results.
    filters List<GetClsMachineGroupsFilter>
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    id String
    resultOutputFile String
    Used to save results.
    filters GetClsMachineGroupsFilter[]
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    id string
    resultOutputFile string
    Used to save results.
    filters Sequence[GetClsMachineGroupsFilter]
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    id str
    result_output_file str
    Used to save results.
    filters List<Property Map>
    Filter conditions. Maximum 10 filters, each with up to 5 values. Supported keys: machineGroupName, machineGroupId, osType, tagKey, tag:tagKey.
    id String
    resultOutputFile String
    Used to save results.

    getClsMachineGroups Result

    The following output properties are available:

    Supporting Types

    GetClsMachineGroupsFilter

    Name string
    Filter field name.
    Values List<string>
    Filter field values.
    Name string
    Filter field name.
    Values []string
    Filter field values.
    name string
    Filter field name.
    values list(string)
    Filter field values.
    name String
    Filter field name.
    values List<String>
    Filter field values.
    name string
    Filter field name.
    values string[]
    Filter field values.
    name str
    Filter field name.
    values Sequence[str]
    Filter field values.
    name String
    Filter field name.
    values List<String>
    Filter field values.

    GetClsMachineGroupsMachineGroup

    AutoUpdate string
    Whether machine group auto update is enabled.
    CreateTime string
    Creation time.
    DelayCleanupTime double
    Machine offline periodic cleanup time, in days.
    GroupId string
    Machine group ID.
    GroupName string
    Machine group name.
    MachineGroupTypes List<GetClsMachineGroupsMachineGroupMachineGroupType>
    Machine group type.
    MetaTags List<GetClsMachineGroupsMachineGroupMetaTag>
    Machine group metadata tag list.
    OsType double
    Operating system type. 0: Linux, 1: Windows.
    ServiceLogging bool
    Whether service logging is enabled.
    Tags List<GetClsMachineGroupsMachineGroupTag>
    Tag list.
    UpdateEndTime string
    Upgrade end time.
    UpdateStartTime string
    Upgrade start time.
    AutoUpdate string
    Whether machine group auto update is enabled.
    CreateTime string
    Creation time.
    DelayCleanupTime float64
    Machine offline periodic cleanup time, in days.
    GroupId string
    Machine group ID.
    GroupName string
    Machine group name.
    MachineGroupTypes []GetClsMachineGroupsMachineGroupMachineGroupType
    Machine group type.
    MetaTags []GetClsMachineGroupsMachineGroupMetaTag
    Machine group metadata tag list.
    OsType float64
    Operating system type. 0: Linux, 1: Windows.
    ServiceLogging bool
    Whether service logging is enabled.
    Tags []GetClsMachineGroupsMachineGroupTag
    Tag list.
    UpdateEndTime string
    Upgrade end time.
    UpdateStartTime string
    Upgrade start time.
    auto_update string
    Whether machine group auto update is enabled.
    create_time string
    Creation time.
    delay_cleanup_time number
    Machine offline periodic cleanup time, in days.
    group_id string
    Machine group ID.
    group_name string
    Machine group name.
    machine_group_types list(object)
    Machine group type.
    meta_tags list(object)
    Machine group metadata tag list.
    os_type number
    Operating system type. 0: Linux, 1: Windows.
    service_logging bool
    Whether service logging is enabled.
    tags list(object)
    Tag list.
    update_end_time string
    Upgrade end time.
    update_start_time string
    Upgrade start time.
    autoUpdate String
    Whether machine group auto update is enabled.
    createTime String
    Creation time.
    delayCleanupTime Double
    Machine offline periodic cleanup time, in days.
    groupId String
    Machine group ID.
    groupName String
    Machine group name.
    machineGroupTypes List<GetClsMachineGroupsMachineGroupMachineGroupType>
    Machine group type.
    metaTags List<GetClsMachineGroupsMachineGroupMetaTag>
    Machine group metadata tag list.
    osType Double
    Operating system type. 0: Linux, 1: Windows.
    serviceLogging Boolean
    Whether service logging is enabled.
    tags List<GetClsMachineGroupsMachineGroupTag>
    Tag list.
    updateEndTime String
    Upgrade end time.
    updateStartTime String
    Upgrade start time.
    autoUpdate string
    Whether machine group auto update is enabled.
    createTime string
    Creation time.
    delayCleanupTime number
    Machine offline periodic cleanup time, in days.
    groupId string
    Machine group ID.
    groupName string
    Machine group name.
    machineGroupTypes GetClsMachineGroupsMachineGroupMachineGroupType[]
    Machine group type.
    metaTags GetClsMachineGroupsMachineGroupMetaTag[]
    Machine group metadata tag list.
    osType number
    Operating system type. 0: Linux, 1: Windows.
    serviceLogging boolean
    Whether service logging is enabled.
    tags GetClsMachineGroupsMachineGroupTag[]
    Tag list.
    updateEndTime string
    Upgrade end time.
    updateStartTime string
    Upgrade start time.
    auto_update str
    Whether machine group auto update is enabled.
    create_time str
    Creation time.
    delay_cleanup_time float
    Machine offline periodic cleanup time, in days.
    group_id str
    Machine group ID.
    group_name str
    Machine group name.
    machine_group_types Sequence[GetClsMachineGroupsMachineGroupMachineGroupType]
    Machine group type.
    meta_tags Sequence[GetClsMachineGroupsMachineGroupMetaTag]
    Machine group metadata tag list.
    os_type float
    Operating system type. 0: Linux, 1: Windows.
    service_logging bool
    Whether service logging is enabled.
    tags Sequence[GetClsMachineGroupsMachineGroupTag]
    Tag list.
    update_end_time str
    Upgrade end time.
    update_start_time str
    Upgrade start time.
    autoUpdate String
    Whether machine group auto update is enabled.
    createTime String
    Creation time.
    delayCleanupTime Number
    Machine offline periodic cleanup time, in days.
    groupId String
    Machine group ID.
    groupName String
    Machine group name.
    machineGroupTypes List<Property Map>
    Machine group type.
    metaTags List<Property Map>
    Machine group metadata tag list.
    osType Number
    Operating system type. 0: Linux, 1: Windows.
    serviceLogging Boolean
    Whether service logging is enabled.
    tags List<Property Map>
    Tag list.
    updateEndTime String
    Upgrade end time.
    updateStartTime String
    Upgrade start time.

    GetClsMachineGroupsMachineGroupMachineGroupType

    Type string
    Machine group type. Valid values: ip, label.
    Values List<string>
    Machine description list.
    Type string
    Machine group type. Valid values: ip, label.
    Values []string
    Machine description list.
    type string
    Machine group type. Valid values: ip, label.
    values list(string)
    Machine description list.
    type String
    Machine group type. Valid values: ip, label.
    values List<String>
    Machine description list.
    type string
    Machine group type. Valid values: ip, label.
    values string[]
    Machine description list.
    type str
    Machine group type. Valid values: ip, label.
    values Sequence[str]
    Machine description list.
    type String
    Machine group type. Valid values: ip, label.
    values List<String>
    Machine description list.

    GetClsMachineGroupsMachineGroupMetaTag

    Key string
    Tag key.
    Value string
    Tag value.
    Key string
    Tag key.
    Value string
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key String
    Tag key.
    value String
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key str
    Tag key.
    value str
    Tag value.
    key String
    Tag key.
    value String
    Tag value.

    GetClsMachineGroupsMachineGroupTag

    Key string
    Tag key.
    Value string
    Tag value.
    Key string
    Tag key.
    Value string
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key String
    Tag key.
    value String
    Tag value.
    key string
    Tag key.
    value string
    Tag value.
    key str
    Tag key.
    value str
    Tag value.
    key String
    Tag key.
    value String
    Tag value.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.83.23
    published on Friday, Aug 14, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial