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

tencentcloud.ClsMachineGroup

Explore with Pulumi AI

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

    Provides a resource to create a cls machine group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const group = new tencentcloud.ClsMachineGroup("group", {
        groupName: "group",
        machineGroupType: {
            type: "ip",
            values: [
                "192.168.1.1",
                "192.168.1.2",
            ],
        },
        serviceLogging: true,
        tags: {
            test: "test1",
        },
        updateEndTime: "19:05:40",
        updateStartTime: "17:05:40",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    group = tencentcloud.ClsMachineGroup("group",
        group_name="group",
        machine_group_type={
            "type": "ip",
            "values": [
                "192.168.1.1",
                "192.168.1.2",
            ],
        },
        service_logging=True,
        tags={
            "test": "test1",
        },
        update_end_time="19:05:40",
        update_start_time="17:05:40")
    
    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.NewClsMachineGroup(ctx, "group", &tencentcloud.ClsMachineGroupArgs{
    			GroupName: pulumi.String("group"),
    			MachineGroupType: &tencentcloud.ClsMachineGroupMachineGroupTypeArgs{
    				Type: pulumi.String("ip"),
    				Values: pulumi.StringArray{
    					pulumi.String("192.168.1.1"),
    					pulumi.String("192.168.1.2"),
    				},
    			},
    			ServiceLogging: pulumi.Bool(true),
    			Tags: pulumi.StringMap{
    				"test": pulumi.String("test1"),
    			},
    			UpdateEndTime:   pulumi.String("19:05:40"),
    			UpdateStartTime: pulumi.String("17:05:40"),
    		})
    		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 @group = new Tencentcloud.ClsMachineGroup("group", new()
        {
            GroupName = "group",
            MachineGroupType = new Tencentcloud.Inputs.ClsMachineGroupMachineGroupTypeArgs
            {
                Type = "ip",
                Values = new[]
                {
                    "192.168.1.1",
                    "192.168.1.2",
                },
            },
            ServiceLogging = true,
            Tags = 
            {
                { "test", "test1" },
            },
            UpdateEndTime = "19:05:40",
            UpdateStartTime = "17:05:40",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ClsMachineGroup;
    import com.pulumi.tencentcloud.ClsMachineGroupArgs;
    import com.pulumi.tencentcloud.inputs.ClsMachineGroupMachineGroupTypeArgs;
    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) {
            var group = new ClsMachineGroup("group", ClsMachineGroupArgs.builder()
                .groupName("group")
                .machineGroupType(ClsMachineGroupMachineGroupTypeArgs.builder()
                    .type("ip")
                    .values(                
                        "192.168.1.1",
                        "192.168.1.2")
                    .build())
                .serviceLogging(true)
                .tags(Map.of("test", "test1"))
                .updateEndTime("19:05:40")
                .updateStartTime("17:05:40")
                .build());
    
        }
    }
    
    resources:
      group:
        type: tencentcloud:ClsMachineGroup
        properties:
          groupName: group
          machineGroupType:
            type: ip
            values:
              - 192.168.1.1
              - 192.168.1.2
          serviceLogging: true
          tags:
            test: test1
          updateEndTime: 19:05:40
          updateStartTime: 17:05:40
    

    Create ClsMachineGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClsMachineGroup(name: string, args: ClsMachineGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ClsMachineGroup(resource_name: str,
                        args: ClsMachineGroupArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClsMachineGroup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        group_name: Optional[str] = None,
                        machine_group_type: Optional[ClsMachineGroupMachineGroupTypeArgs] = None,
                        auto_update: Optional[bool] = None,
                        cls_machine_group_id: Optional[str] = None,
                        service_logging: Optional[bool] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        update_end_time: Optional[str] = None,
                        update_start_time: Optional[str] = None)
    func NewClsMachineGroup(ctx *Context, name string, args ClsMachineGroupArgs, opts ...ResourceOption) (*ClsMachineGroup, error)
    public ClsMachineGroup(string name, ClsMachineGroupArgs args, CustomResourceOptions? opts = null)
    public ClsMachineGroup(String name, ClsMachineGroupArgs args)
    public ClsMachineGroup(String name, ClsMachineGroupArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ClsMachineGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ClsMachineGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ClsMachineGroupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ClsMachineGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClsMachineGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClsMachineGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ClsMachineGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ClsMachineGroup resource accepts the following input properties:

    GroupName string
    Machine group name, which must be unique.
    MachineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    AutoUpdate bool
    Whether to enable automatic update for the machine group.
    ClsMachineGroupId string
    ID of the resource.
    ServiceLogging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    UpdateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    UpdateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    GroupName string
    Machine group name, which must be unique.
    MachineGroupType ClsMachineGroupMachineGroupTypeArgs
    Type of the machine group to be created.
    AutoUpdate bool
    Whether to enable automatic update for the machine group.
    ClsMachineGroupId string
    ID of the resource.
    ServiceLogging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    UpdateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    UpdateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    groupName String
    Machine group name, which must be unique.
    machineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    autoUpdate Boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId String
    ID of the resource.
    serviceLogging Boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime String
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime String
    Update start time. We recommend you update LogListener during off-peak hours.
    groupName string
    Machine group name, which must be unique.
    machineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    autoUpdate boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId string
    ID of the resource.
    serviceLogging boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    group_name str
    Machine group name, which must be unique.
    machine_group_type ClsMachineGroupMachineGroupTypeArgs
    Type of the machine group to be created.
    auto_update bool
    Whether to enable automatic update for the machine group.
    cls_machine_group_id str
    ID of the resource.
    service_logging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    update_end_time str
    Update end time. We recommend you update LogListener during off-peak hours.
    update_start_time str
    Update start time. We recommend you update LogListener during off-peak hours.
    groupName String
    Machine group name, which must be unique.
    machineGroupType Property Map
    Type of the machine group to be created.
    autoUpdate Boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId String
    ID of the resource.
    serviceLogging Boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime String
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime String
    Update start time. We recommend you update LogListener during off-peak hours.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClsMachineGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ClsMachineGroup Resource

    Get an existing ClsMachineGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ClsMachineGroupState, opts?: CustomResourceOptions): ClsMachineGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_update: Optional[bool] = None,
            cls_machine_group_id: Optional[str] = None,
            group_name: Optional[str] = None,
            machine_group_type: Optional[ClsMachineGroupMachineGroupTypeArgs] = None,
            service_logging: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            update_end_time: Optional[str] = None,
            update_start_time: Optional[str] = None) -> ClsMachineGroup
    func GetClsMachineGroup(ctx *Context, name string, id IDInput, state *ClsMachineGroupState, opts ...ResourceOption) (*ClsMachineGroup, error)
    public static ClsMachineGroup Get(string name, Input<string> id, ClsMachineGroupState? state, CustomResourceOptions? opts = null)
    public static ClsMachineGroup get(String name, Output<String> id, ClsMachineGroupState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ClsMachineGroup    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoUpdate bool
    Whether to enable automatic update for the machine group.
    ClsMachineGroupId string
    ID of the resource.
    GroupName string
    Machine group name, which must be unique.
    MachineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    ServiceLogging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    Tags Dictionary<string, string>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    UpdateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    UpdateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    AutoUpdate bool
    Whether to enable automatic update for the machine group.
    ClsMachineGroupId string
    ID of the resource.
    GroupName string
    Machine group name, which must be unique.
    MachineGroupType ClsMachineGroupMachineGroupTypeArgs
    Type of the machine group to be created.
    ServiceLogging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    Tags map[string]string
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    UpdateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    UpdateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    autoUpdate Boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId String
    ID of the resource.
    groupName String
    Machine group name, which must be unique.
    machineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    serviceLogging Boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Map<String,String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime String
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime String
    Update start time. We recommend you update LogListener during off-peak hours.
    autoUpdate boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId string
    ID of the resource.
    groupName string
    Machine group name, which must be unique.
    machineGroupType ClsMachineGroupMachineGroupType
    Type of the machine group to be created.
    serviceLogging boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags {[key: string]: string}
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime string
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime string
    Update start time. We recommend you update LogListener during off-peak hours.
    auto_update bool
    Whether to enable automatic update for the machine group.
    cls_machine_group_id str
    ID of the resource.
    group_name str
    Machine group name, which must be unique.
    machine_group_type ClsMachineGroupMachineGroupTypeArgs
    Type of the machine group to be created.
    service_logging bool
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Mapping[str, str]
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    update_end_time str
    Update end time. We recommend you update LogListener during off-peak hours.
    update_start_time str
    Update start time. We recommend you update LogListener during off-peak hours.
    autoUpdate Boolean
    Whether to enable automatic update for the machine group.
    clsMachineGroupId String
    ID of the resource.
    groupName String
    Machine group name, which must be unique.
    machineGroupType Property Map
    Type of the machine group to be created.
    serviceLogging Boolean
    Whether to enable the service log to record the logs generated by the LogListener service itself. After it is enabled, the internal logset cls_service_logging and the loglistener_status, loglistener_alarm, and loglistener_business log topics will be created, which will not incur fees.
    tags Map<String>
    Tag description list. Up to 10 tag key-value pairs are supported and must be unique.
    updateEndTime String
    Update end time. We recommend you update LogListener during off-peak hours.
    updateStartTime String
    Update start time. We recommend you update LogListener during off-peak hours.

    Supporting Types

    ClsMachineGroupMachineGroupType, ClsMachineGroupMachineGroupTypeArgs

    Type string
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    Values List<string>
    Machine description list.
    Type string
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    Values []string
    Machine description list.
    type String
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    values List<String>
    Machine description list.
    type string
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    values string[]
    Machine description list.
    type str
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    values Sequence[str]
    Machine description list.
    type String
    Machine group type. Valid values: ip: the IP addresses of collection machines are stored in Values of the machine group; label: the tags of the machines are stored in Values of the machine group.
    values List<String>
    Machine description list.

    Import

    cls machine group can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/clsMachineGroup:ClsMachineGroup group caf168e7-32cd-4ac6-bf89-1950a760e09c
    

    To learn more about importing existing cloud resources, see Importing resources.

    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