1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cms
  6. AggTaskGroup
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi

    Provides a Cms Agg Task Group resource.

    Aggregation Task Group.

    For information about Cms Agg Task Group and how to use it, see What is Agg Task Group.

    NOTE: Available since v1.281.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultProject = new alicloud.log.Project("default", {projectName: `${name}-${_default.result}`});
    const defaultWorkspace = new alicloud.cms.Workspace("default", {
        workspaceName: name,
        slsProject: defaultProject.projectName,
    });
    const defaultPrometheusInstance: alicloud.cms.PrometheusInstance[] = [];
    for (let range = 0; range < 2; range++) {
        defaultPrometheusInstance.push(new alicloud.cms.PrometheusInstance(`default-${range}`, {
            prometheusInstanceName: `${name}_${range}`,
            workspace: defaultWorkspace.id,
        }));
    }
    const defaultAggTaskGroup = new alicloud.cms.AggTaskGroup("default", {
        sourcePrometheusId: defaultPrometheusInstance[0].id,
        targetPrometheusId: defaultPrometheusInstance[1].id,
        aggTaskGroupName: name,
        aggTaskGroupConfig: `groups:
    - name: \\"node.rules\\"
      interval: \\"60s\\"
      rules:
      - record: \\"node_namespace_pod:kube_pod_info:\\"
        expr: \\"max(label_replace(kube_pod_info{job=\\\\\\"kubernetes-pods-kube-state-metrics\\\\\\" }, \\\\\\"pod\\\\\\", \\\\\\"1\\\\\\", \\\\\\"pod\\\\\\", \\\\\\"(.*)\\\\\\")) by (node, namespace, pod, cluster)\\"
    `,
    });
    
    import pulumi
    from typing import Any
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = random.Integer("default",
        min=10000,
        max=99999)
    default_project = alicloud.log.Project("default", project_name=f"{name}-{default['result']}")
    default_workspace = alicloud.cms.Workspace("default",
        workspace_name=name,
        sls_project=default_project.project_name)
    default_prometheus_instance: list[alicloud.cms.PrometheusInstance] = []
    for default_prometheus_instance_range in [{"value": i} for i in range(0, 2)]:
        default_prometheus_instance.append(alicloud.cms.PrometheusInstance(f"default-{default_prometheus_instance_range['value']}",
            prometheus_instance_name=f"{name}_{default_prometheus_instance_range['value']}",
            workspace=default_workspace.id))
    default_agg_task_group = alicloud.cms.AggTaskGroup("default",
        source_prometheus_id=default_prometheus_instance[0].id,
        target_prometheus_id=default_prometheus_instance[1].id,
        agg_task_group_name=name,
        agg_task_group_config="""groups:
    - name: \"node.rules\"
      interval: \"60s\"
      rules:
      - record: \"node_namespace_pod:kube_pod_info:\"
        expr: \"max(label_replace(kube_pod_info{job=\\\"kubernetes-pods-kube-state-metrics\\\" }, \\\"pod\\\", \\\"$1\\\", \\\"pod\\\", \\\"(.*)\\\")) by (node, namespace, pod, cluster)\"
    """)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultProject, err := log.NewProject(ctx, "default", &log.ProjectArgs{
    			ProjectName: pulumi.Sprintf("%v-%v", name, _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		defaultWorkspace, err := cms.NewWorkspace(ctx, "default", &cms.WorkspaceArgs{
    			WorkspaceName: pulumi.String(name),
    			SlsProject:    defaultProject.ProjectName,
    		})
    		if err != nil {
    			return err
    		}
    		var defaultPrometheusInstance []*cms.PrometheusInstance
    		for index := 0; index < 2; index++ {
    			key0 := index
    			val0 := index
    			__res, err := cms.NewPrometheusInstance(ctx, fmt.Sprintf("default-%v", key0), &cms.PrometheusInstanceArgs{
    				PrometheusInstanceName: pulumi.Sprintf("%v_%v", name, val0),
    				Workspace:              defaultWorkspace.ID(),
    			})
    			if err != nil {
    				return err
    			}
    			defaultPrometheusInstance = append(defaultPrometheusInstance, __res)
    		}
    		_, err = cms.NewAggTaskGroup(ctx, "default", &cms.AggTaskGroupArgs{
    			SourcePrometheusId: defaultPrometheusInstance[0].ID(),
    			TargetPrometheusId: defaultPrometheusInstance[1].ID(),
    			AggTaskGroupName:   pulumi.String(name),
    			AggTaskGroupConfig: pulumi.String(`groups:
    - name: \"node.rules\"
      interval: \"60s\"
      rules:
      - record: \"node_namespace_pod:kube_pod_info:\"
        expr: \"max(label_replace(kube_pod_info{job=\\\"kubernetes-pods-kube-state-metrics\\\" }, \\\"pod\\\", \\\"$1\\\", \\\"pod\\\", \\\"(.*)\\\")) by (node, namespace, pod, cluster)\"
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new Random.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultProject = new AliCloud.Log.Project("default", new()
        {
            ProjectName = $"{name}-{@default.Result}",
        });
    
        var defaultWorkspace = new AliCloud.Cms.Workspace("default", new()
        {
            WorkspaceName = name,
            SlsProject = defaultProject.ProjectName,
        });
    
        var defaultPrometheusInstance = new List<AliCloud.Cms.PrometheusInstance>();
        for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            defaultPrometheusInstance.Add(new AliCloud.Cms.PrometheusInstance($"default-{range.Value}", new()
            {
                PrometheusInstanceName = $"{name}_{range.Value}",
                Workspace = defaultWorkspace.Id,
            }));
        }
        var defaultAggTaskGroup = new AliCloud.Cms.AggTaskGroup("default", new()
        {
            SourcePrometheusId = defaultPrometheusInstance[0].Id,
            TargetPrometheusId = defaultPrometheusInstance[1].Id,
            AggTaskGroupName = name,
            AggTaskGroupConfig = @"groups:
    - name: \""node.rules\""
      interval: \""60s\""
      rules:
      - record: \""node_namespace_pod:kube_pod_info:\""
        expr: \""max(label_replace(kube_pod_info{job=\\\""kubernetes-pods-kube-state-metrics\\\"" }, \\\""pod\\\"", \\\""$1\\\"", \\\""pod\\\"", \\\""(.*)\\\"")) by (node, namespace, pod, cluster)\""
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.Integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.log.Project;
    import com.pulumi.alicloud.log.ProjectArgs;
    import com.pulumi.alicloud.cms.Workspace;
    import com.pulumi.alicloud.cms.WorkspaceArgs;
    import com.pulumi.alicloud.cms.PrometheusInstance;
    import com.pulumi.alicloud.cms.PrometheusInstanceArgs;
    import com.pulumi.alicloud.cms.AggTaskGroup;
    import com.pulumi.alicloud.cms.AggTaskGroupArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultProject = new Project("defaultProject", ProjectArgs.builder()
                .projectName(String.format("%s-%s", name,default_.result()))
                .build());
    
            var defaultWorkspace = new Workspace("defaultWorkspace", WorkspaceArgs.builder()
                .workspaceName(name)
                .slsProject(defaultProject.projectName())
                .build());
    
            for (var i = 0; i < 2; i++) {
                new PrometheusInstance("defaultPrometheusInstance-" + i, PrometheusInstanceArgs.builder()
                    .prometheusInstanceName(String.format("%s_%s", name,range.value()))
                    .workspace(defaultWorkspace.id())
                    .build());
    
            
    }
            var defaultAggTaskGroup = new AggTaskGroup("defaultAggTaskGroup", AggTaskGroupArgs.builder()
                .sourcePrometheusId(defaultPrometheusInstance[0].id())
                .targetPrometheusId(defaultPrometheusInstance[1].id())
                .aggTaskGroupName(name)
                .aggTaskGroupConfig("""
    groups:
    - name: \"node.rules\"
      interval: \"60s\"
      rules:
      - record: \"node_namespace_pod:kube_pod_info:\"
        expr: \"max(label_replace(kube_pod_info{job=\\\"kubernetes-pods-kube-state-metrics\\\" }, \\\"pod\\\", \\\"$1\\\", \\\"pod\\\", \\\"(.*)\\\")) by (node, namespace, pod, cluster)\"
                """)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: random:Integer
        properties:
          min: 10000
          max: 99999
      defaultProject:
        type: alicloud:log:Project
        name: default
        properties:
          projectName: ${name}-${default.result}
      defaultWorkspace:
        type: alicloud:cms:Workspace
        name: default
        properties:
          workspaceName: ${name}
          slsProject: ${defaultProject.projectName}
      defaultPrometheusInstance:
        type: alicloud:cms:PrometheusInstance
        name: default
        properties:
          prometheusInstanceName: ${name}_${range.value}
          workspace: ${defaultWorkspace.id}
        options: {}
      defaultAggTaskGroup:
        type: alicloud:cms:AggTaskGroup
        name: default
        properties:
          sourcePrometheusId: ${defaultPrometheusInstance[0].id}
          targetPrometheusId: ${defaultPrometheusInstance[1].id}
          aggTaskGroupName: ${name}
          aggTaskGroupConfig: |
            groups:
            - name: \"node.rules\"
              interval: \"60s\"
              rules:
              - record: \"node_namespace_pod:kube_pod_info:\"
                expr: \"max(label_replace(kube_pod_info{job=\\\"kubernetes-pods-kube-state-metrics\\\" }, \\\"pod\\\", \\\"$1\\\", \\\"pod\\\", \\\"(.*)\\\")) by (node, namespace, pod, cluster)\"
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
        random = {
          source = "pulumi/random"
        }
      }
    }
    
    resource "random_integer" "default" {
      min = 10000
      max = 99999
    }
    resource "alicloud_log_project" "default" {
      project_name ="${var.name}-${random_integer.default.result}"
    }
    resource "alicloud_cms_workspace" "default" {
      workspace_name = var.name
      sls_project    = alicloud_log_project.default.project_name
    }
    resource "alicloud_cms_prometheusinstance" "default" {
      count                    = 2
      prometheus_instance_name ="${var.name}_${count.index}"
      workspace                = alicloud_cms_workspace.default.id
    }
    resource "alicloud_cms_aggtaskgroup" "default" {
      source_prometheus_id  = alicloud_cms_prometheusinstance.default[0].id
      target_prometheus_id  = alicloud_cms_prometheusinstance.default[1].id
      agg_task_group_name   = var.name
      agg_task_group_config = "groups:\n- name: \\\"node.rules\\\"\n  interval: \\\"60s\\\"\n  rules:\n  - record: \\\"node_namespace_pod:kube_pod_info:\\\"\n    expr: \\\"max(label_replace(kube_pod_info{job=\\\\\\\"kubernetes-pods-kube-state-metrics\\\\\\\" }, \\\\\\\"pod\\\\\\\", \\\\\\\"$1\\\\\\\", \\\\\\\"pod\\\\\\\", \\\\\\\"(.*)\\\\\\\")) by (node, namespace, pod, cluster)\\\"\n"
    }
    variable "name" {
      type    = string
      default = "terraform-example"
    }
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create AggTaskGroup Resource

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

    Constructor syntax

    new AggTaskGroup(name: string, args: AggTaskGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AggTaskGroup(resource_name: str,
                     args: AggTaskGroupArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AggTaskGroup(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     agg_task_group_config: Optional[str] = None,
                     target_prometheus_id: Optional[str] = None,
                     agg_task_group_name: Optional[str] = None,
                     source_prometheus_id: Optional[str] = None,
                     delay: Optional[int] = None,
                     description: Optional[str] = None,
                     max_retries: Optional[int] = None,
                     max_run_time_in_seconds: Optional[int] = None,
                     override_if_exists: Optional[bool] = None,
                     precheck_string: Optional[str] = None,
                     schedule_mode: Optional[str] = None,
                     schedule_time_expr: Optional[str] = None,
                     cron_expr: Optional[str] = None,
                     status: Optional[str] = None,
                     agg_task_group_config_type: Optional[str] = None,
                     to_time: Optional[int] = None)
    func NewAggTaskGroup(ctx *Context, name string, args AggTaskGroupArgs, opts ...ResourceOption) (*AggTaskGroup, error)
    public AggTaskGroup(string name, AggTaskGroupArgs args, CustomResourceOptions? opts = null)
    public AggTaskGroup(String name, AggTaskGroupArgs args)
    public AggTaskGroup(String name, AggTaskGroupArgs args, CustomResourceOptions options)
    
    type: alicloud:cms:AggTaskGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_cms_aggtaskgroup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AggTaskGroupArgs
    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 AggTaskGroupArgs
    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 AggTaskGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AggTaskGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AggTaskGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var aggTaskGroupResource = new AliCloud.Cms.AggTaskGroup("aggTaskGroupResource", new()
    {
        AggTaskGroupConfig = "string",
        TargetPrometheusId = "string",
        AggTaskGroupName = "string",
        SourcePrometheusId = "string",
        Delay = 0,
        Description = "string",
        MaxRetries = 0,
        MaxRunTimeInSeconds = 0,
        OverrideIfExists = false,
        PrecheckString = "string",
        ScheduleMode = "string",
        ScheduleTimeExpr = "string",
        CronExpr = "string",
        Status = "string",
        AggTaskGroupConfigType = "string",
        ToTime = 0,
    });
    
    example, err := cms.NewAggTaskGroup(ctx, "aggTaskGroupResource", &cms.AggTaskGroupArgs{
    	AggTaskGroupConfig:     pulumi.String("string"),
    	TargetPrometheusId:     pulumi.String("string"),
    	AggTaskGroupName:       pulumi.String("string"),
    	SourcePrometheusId:     pulumi.String("string"),
    	Delay:                  pulumi.Int(0),
    	Description:            pulumi.String("string"),
    	MaxRetries:             pulumi.Int(0),
    	MaxRunTimeInSeconds:    pulumi.Int(0),
    	OverrideIfExists:       pulumi.Bool(false),
    	PrecheckString:         pulumi.String("string"),
    	ScheduleMode:           pulumi.String("string"),
    	ScheduleTimeExpr:       pulumi.String("string"),
    	CronExpr:               pulumi.String("string"),
    	Status:                 pulumi.String("string"),
    	AggTaskGroupConfigType: pulumi.String("string"),
    	ToTime:                 pulumi.Int(0),
    })
    
    resource "alicloud_cms_aggtaskgroup" "aggTaskGroupResource" {
      agg_task_group_config      = "string"
      target_prometheus_id       = "string"
      agg_task_group_name        = "string"
      source_prometheus_id       = "string"
      delay                      = 0
      description                = "string"
      max_retries                = 0
      max_run_time_in_seconds    = 0
      override_if_exists         = false
      precheck_string            = "string"
      schedule_mode              = "string"
      schedule_time_expr         = "string"
      cron_expr                  = "string"
      status                     = "string"
      agg_task_group_config_type = "string"
      to_time                    = 0
    }
    
    var aggTaskGroupResource = new AggTaskGroup("aggTaskGroupResource", AggTaskGroupArgs.builder()
        .aggTaskGroupConfig("string")
        .targetPrometheusId("string")
        .aggTaskGroupName("string")
        .sourcePrometheusId("string")
        .delay(0)
        .description("string")
        .maxRetries(0)
        .maxRunTimeInSeconds(0)
        .overrideIfExists(false)
        .precheckString("string")
        .scheduleMode("string")
        .scheduleTimeExpr("string")
        .cronExpr("string")
        .status("string")
        .aggTaskGroupConfigType("string")
        .toTime(0)
        .build());
    
    agg_task_group_resource = alicloud.cms.AggTaskGroup("aggTaskGroupResource",
        agg_task_group_config="string",
        target_prometheus_id="string",
        agg_task_group_name="string",
        source_prometheus_id="string",
        delay=0,
        description="string",
        max_retries=0,
        max_run_time_in_seconds=0,
        override_if_exists=False,
        precheck_string="string",
        schedule_mode="string",
        schedule_time_expr="string",
        cron_expr="string",
        status="string",
        agg_task_group_config_type="string",
        to_time=0)
    
    const aggTaskGroupResource = new alicloud.cms.AggTaskGroup("aggTaskGroupResource", {
        aggTaskGroupConfig: "string",
        targetPrometheusId: "string",
        aggTaskGroupName: "string",
        sourcePrometheusId: "string",
        delay: 0,
        description: "string",
        maxRetries: 0,
        maxRunTimeInSeconds: 0,
        overrideIfExists: false,
        precheckString: "string",
        scheduleMode: "string",
        scheduleTimeExpr: "string",
        cronExpr: "string",
        status: "string",
        aggTaskGroupConfigType: "string",
        toTime: 0,
    });
    
    type: alicloud:cms:AggTaskGroup
    properties:
        aggTaskGroupConfig: string
        aggTaskGroupConfigType: string
        aggTaskGroupName: string
        cronExpr: string
        delay: 0
        description: string
        maxRetries: 0
        maxRunTimeInSeconds: 0
        overrideIfExists: false
        precheckString: string
        scheduleMode: string
        scheduleTimeExpr: string
        sourcePrometheusId: string
        status: string
        targetPrometheusId: string
        toTime: 0
    

    AggTaskGroup 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 AggTaskGroup resource accepts the following input properties:

    AggTaskGroupConfig string
    The configuration of the aggregation task group.
    AggTaskGroupName string
    The name of the aggregation task group.
    SourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    TargetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    AggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    CronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    Delay int
    The fixed delay for scheduling.
    Description string
    The description of the aggregation task group.
    MaxRetries int
    The maximum number of retries for an aggregation task.
    MaxRunTimeInSeconds int
    The maximum retry time for an aggregation task.
    OverrideIfExists bool
    Specifies whether to overwrite an existing resource with the same name.
    PrecheckString string
    The dry run configuration.
    ScheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    ScheduleTimeExpr string
    The scheduling time expression.
    Status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    ToTime int
    The UNIX timestamp for the scheduling end time.
    AggTaskGroupConfig string
    The configuration of the aggregation task group.
    AggTaskGroupName string
    The name of the aggregation task group.
    SourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    TargetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    AggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    CronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    Delay int
    The fixed delay for scheduling.
    Description string
    The description of the aggregation task group.
    MaxRetries int
    The maximum number of retries for an aggregation task.
    MaxRunTimeInSeconds int
    The maximum retry time for an aggregation task.
    OverrideIfExists bool
    Specifies whether to overwrite an existing resource with the same name.
    PrecheckString string
    The dry run configuration.
    ScheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    ScheduleTimeExpr string
    The scheduling time expression.
    Status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    ToTime int
    The UNIX timestamp for the scheduling end time.
    agg_task_group_config string
    The configuration of the aggregation task group.
    agg_task_group_name string
    The name of the aggregation task group.
    source_prometheus_id string
    The ID of the source Prometheus instance for the aggregation task group.
    target_prometheus_id string
    The ID of the target Prometheus instance for the aggregation task group.
    agg_task_group_config_type string
    The type of the aggregation task group configuration.
    cron_expr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay number
    The fixed delay for scheduling.
    description string
    The description of the aggregation task group.
    max_retries number
    The maximum number of retries for an aggregation task.
    max_run_time_in_seconds number
    The maximum retry time for an aggregation task.
    override_if_exists bool
    Specifies whether to overwrite an existing resource with the same name.
    precheck_string string
    The dry run configuration.
    schedule_mode string
    The scheduling mode. Valid values: Cron and FixedRate.
    schedule_time_expr string
    The scheduling time expression.
    status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    to_time number
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig String
    The configuration of the aggregation task group.
    aggTaskGroupName String
    The name of the aggregation task group.
    sourcePrometheusId String
    The ID of the source Prometheus instance for the aggregation task group.
    targetPrometheusId String
    The ID of the target Prometheus instance for the aggregation task group.
    aggTaskGroupConfigType String
    The type of the aggregation task group configuration.
    cronExpr String
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay Integer
    The fixed delay for scheduling.
    description String
    The description of the aggregation task group.
    maxRetries Integer
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds Integer
    The maximum retry time for an aggregation task.
    overrideIfExists Boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString String
    The dry run configuration.
    scheduleMode String
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr String
    The scheduling time expression.
    status String
    The status of the aggregation task group. Valid values: Running and Stopped.
    toTime Integer
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig string
    The configuration of the aggregation task group.
    aggTaskGroupName string
    The name of the aggregation task group.
    sourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    targetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    aggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    cronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay number
    The fixed delay for scheduling.
    description string
    The description of the aggregation task group.
    maxRetries number
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds number
    The maximum retry time for an aggregation task.
    overrideIfExists boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString string
    The dry run configuration.
    scheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr string
    The scheduling time expression.
    status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    toTime number
    The UNIX timestamp for the scheduling end time.
    agg_task_group_config str
    The configuration of the aggregation task group.
    agg_task_group_name str
    The name of the aggregation task group.
    source_prometheus_id str
    The ID of the source Prometheus instance for the aggregation task group.
    target_prometheus_id str
    The ID of the target Prometheus instance for the aggregation task group.
    agg_task_group_config_type str
    The type of the aggregation task group configuration.
    cron_expr str
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay int
    The fixed delay for scheduling.
    description str
    The description of the aggregation task group.
    max_retries int
    The maximum number of retries for an aggregation task.
    max_run_time_in_seconds int
    The maximum retry time for an aggregation task.
    override_if_exists bool
    Specifies whether to overwrite an existing resource with the same name.
    precheck_string str
    The dry run configuration.
    schedule_mode str
    The scheduling mode. Valid values: Cron and FixedRate.
    schedule_time_expr str
    The scheduling time expression.
    status str
    The status of the aggregation task group. Valid values: Running and Stopped.
    to_time int
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig String
    The configuration of the aggregation task group.
    aggTaskGroupName String
    The name of the aggregation task group.
    sourcePrometheusId String
    The ID of the source Prometheus instance for the aggregation task group.
    targetPrometheusId String
    The ID of the target Prometheus instance for the aggregation task group.
    aggTaskGroupConfigType String
    The type of the aggregation task group configuration.
    cronExpr String
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay Number
    The fixed delay for scheduling.
    description String
    The description of the aggregation task group.
    maxRetries Number
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds Number
    The maximum retry time for an aggregation task.
    overrideIfExists Boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString String
    The dry run configuration.
    scheduleMode String
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr String
    The scheduling time expression.
    status String
    The status of the aggregation task group. Valid values: Running and Stopped.
    toTime Number
    The UNIX timestamp for the scheduling end time.

    Outputs

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

    AggTaskGroupId string
    The ID of the aggregation task group.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID.
    AggTaskGroupId string
    The ID of the aggregation task group.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID.
    agg_task_group_id string
    The ID of the aggregation task group.
    id string
    The provider-assigned unique ID for this managed resource.
    region_id string
    The region ID.
    aggTaskGroupId String
    The ID of the aggregation task group.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID.
    aggTaskGroupId string
    The ID of the aggregation task group.
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    The region ID.
    agg_task_group_id str
    The ID of the aggregation task group.
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    The region ID.
    aggTaskGroupId String
    The ID of the aggregation task group.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID.

    Look up Existing AggTaskGroup Resource

    Get an existing AggTaskGroup 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?: AggTaskGroupState, opts?: CustomResourceOptions): AggTaskGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agg_task_group_config: Optional[str] = None,
            agg_task_group_config_type: Optional[str] = None,
            agg_task_group_id: Optional[str] = None,
            agg_task_group_name: Optional[str] = None,
            cron_expr: Optional[str] = None,
            delay: Optional[int] = None,
            description: Optional[str] = None,
            max_retries: Optional[int] = None,
            max_run_time_in_seconds: Optional[int] = None,
            override_if_exists: Optional[bool] = None,
            precheck_string: Optional[str] = None,
            region_id: Optional[str] = None,
            schedule_mode: Optional[str] = None,
            schedule_time_expr: Optional[str] = None,
            source_prometheus_id: Optional[str] = None,
            status: Optional[str] = None,
            target_prometheus_id: Optional[str] = None,
            to_time: Optional[int] = None) -> AggTaskGroup
    func GetAggTaskGroup(ctx *Context, name string, id IDInput, state *AggTaskGroupState, opts ...ResourceOption) (*AggTaskGroup, error)
    public static AggTaskGroup Get(string name, Input<string> id, AggTaskGroupState? state, CustomResourceOptions? opts = null)
    public static AggTaskGroup get(String name, Output<String> id, AggTaskGroupState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:cms:AggTaskGroup    get:      id: ${id}
    import {
      to = alicloud_cms_aggtaskgroup.example
      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:
    AggTaskGroupConfig string
    The configuration of the aggregation task group.
    AggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    AggTaskGroupId string
    The ID of the aggregation task group.
    AggTaskGroupName string
    The name of the aggregation task group.
    CronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    Delay int
    The fixed delay for scheduling.
    Description string
    The description of the aggregation task group.
    MaxRetries int
    The maximum number of retries for an aggregation task.
    MaxRunTimeInSeconds int
    The maximum retry time for an aggregation task.
    OverrideIfExists bool
    Specifies whether to overwrite an existing resource with the same name.
    PrecheckString string
    The dry run configuration.
    RegionId string
    The region ID.
    ScheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    ScheduleTimeExpr string
    The scheduling time expression.
    SourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    Status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    TargetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    ToTime int
    The UNIX timestamp for the scheduling end time.
    AggTaskGroupConfig string
    The configuration of the aggregation task group.
    AggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    AggTaskGroupId string
    The ID of the aggregation task group.
    AggTaskGroupName string
    The name of the aggregation task group.
    CronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    Delay int
    The fixed delay for scheduling.
    Description string
    The description of the aggregation task group.
    MaxRetries int
    The maximum number of retries for an aggregation task.
    MaxRunTimeInSeconds int
    The maximum retry time for an aggregation task.
    OverrideIfExists bool
    Specifies whether to overwrite an existing resource with the same name.
    PrecheckString string
    The dry run configuration.
    RegionId string
    The region ID.
    ScheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    ScheduleTimeExpr string
    The scheduling time expression.
    SourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    Status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    TargetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    ToTime int
    The UNIX timestamp for the scheduling end time.
    agg_task_group_config string
    The configuration of the aggregation task group.
    agg_task_group_config_type string
    The type of the aggregation task group configuration.
    agg_task_group_id string
    The ID of the aggregation task group.
    agg_task_group_name string
    The name of the aggregation task group.
    cron_expr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay number
    The fixed delay for scheduling.
    description string
    The description of the aggregation task group.
    max_retries number
    The maximum number of retries for an aggregation task.
    max_run_time_in_seconds number
    The maximum retry time for an aggregation task.
    override_if_exists bool
    Specifies whether to overwrite an existing resource with the same name.
    precheck_string string
    The dry run configuration.
    region_id string
    The region ID.
    schedule_mode string
    The scheduling mode. Valid values: Cron and FixedRate.
    schedule_time_expr string
    The scheduling time expression.
    source_prometheus_id string
    The ID of the source Prometheus instance for the aggregation task group.
    status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    target_prometheus_id string
    The ID of the target Prometheus instance for the aggregation task group.
    to_time number
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig String
    The configuration of the aggregation task group.
    aggTaskGroupConfigType String
    The type of the aggregation task group configuration.
    aggTaskGroupId String
    The ID of the aggregation task group.
    aggTaskGroupName String
    The name of the aggregation task group.
    cronExpr String
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay Integer
    The fixed delay for scheduling.
    description String
    The description of the aggregation task group.
    maxRetries Integer
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds Integer
    The maximum retry time for an aggregation task.
    overrideIfExists Boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString String
    The dry run configuration.
    regionId String
    The region ID.
    scheduleMode String
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr String
    The scheduling time expression.
    sourcePrometheusId String
    The ID of the source Prometheus instance for the aggregation task group.
    status String
    The status of the aggregation task group. Valid values: Running and Stopped.
    targetPrometheusId String
    The ID of the target Prometheus instance for the aggregation task group.
    toTime Integer
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig string
    The configuration of the aggregation task group.
    aggTaskGroupConfigType string
    The type of the aggregation task group configuration.
    aggTaskGroupId string
    The ID of the aggregation task group.
    aggTaskGroupName string
    The name of the aggregation task group.
    cronExpr string
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay number
    The fixed delay for scheduling.
    description string
    The description of the aggregation task group.
    maxRetries number
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds number
    The maximum retry time for an aggregation task.
    overrideIfExists boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString string
    The dry run configuration.
    regionId string
    The region ID.
    scheduleMode string
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr string
    The scheduling time expression.
    sourcePrometheusId string
    The ID of the source Prometheus instance for the aggregation task group.
    status string
    The status of the aggregation task group. Valid values: Running and Stopped.
    targetPrometheusId string
    The ID of the target Prometheus instance for the aggregation task group.
    toTime number
    The UNIX timestamp for the scheduling end time.
    agg_task_group_config str
    The configuration of the aggregation task group.
    agg_task_group_config_type str
    The type of the aggregation task group configuration.
    agg_task_group_id str
    The ID of the aggregation task group.
    agg_task_group_name str
    The name of the aggregation task group.
    cron_expr str
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay int
    The fixed delay for scheduling.
    description str
    The description of the aggregation task group.
    max_retries int
    The maximum number of retries for an aggregation task.
    max_run_time_in_seconds int
    The maximum retry time for an aggregation task.
    override_if_exists bool
    Specifies whether to overwrite an existing resource with the same name.
    precheck_string str
    The dry run configuration.
    region_id str
    The region ID.
    schedule_mode str
    The scheduling mode. Valid values: Cron and FixedRate.
    schedule_time_expr str
    The scheduling time expression.
    source_prometheus_id str
    The ID of the source Prometheus instance for the aggregation task group.
    status str
    The status of the aggregation task group. Valid values: Running and Stopped.
    target_prometheus_id str
    The ID of the target Prometheus instance for the aggregation task group.
    to_time int
    The UNIX timestamp for the scheduling end time.
    aggTaskGroupConfig String
    The configuration of the aggregation task group.
    aggTaskGroupConfigType String
    The type of the aggregation task group configuration.
    aggTaskGroupId String
    The ID of the aggregation task group.
    aggTaskGroupName String
    The name of the aggregation task group.
    cronExpr String
    The cron expression for scheduling when scheduleMode is set to Cron.
    delay Number
    The fixed delay for scheduling.
    description String
    The description of the aggregation task group.
    maxRetries Number
    The maximum number of retries for an aggregation task.
    maxRunTimeInSeconds Number
    The maximum retry time for an aggregation task.
    overrideIfExists Boolean
    Specifies whether to overwrite an existing resource with the same name.
    precheckString String
    The dry run configuration.
    regionId String
    The region ID.
    scheduleMode String
    The scheduling mode. Valid values: Cron and FixedRate.
    scheduleTimeExpr String
    The scheduling time expression.
    sourcePrometheusId String
    The ID of the source Prometheus instance for the aggregation task group.
    status String
    The status of the aggregation task group. Valid values: Running and Stopped.
    targetPrometheusId String
    The ID of the target Prometheus instance for the aggregation task group.
    toTime Number
    The UNIX timestamp for the scheduling end time.

    Import

    Cms Agg Task Group can be imported using the id, e.g.

    $ pulumi import alicloud:cms/aggTaskGroup:AggTaskGroup example <source_prometheus_id>:<agg_task_group_id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Viewing docs for Alibaba Cloud v3.105.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial