GetAggTaskGroup

Updated at:

Queries the details of an aggregation task group.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:GetAggTaskGroup

get

*AggTaskGroup

acs:cms:{#regionId}:{#accountId}:prometheusinstance/{#sourcePrometheusId}/aggtaskgroup/{#aggTaskGroupId}

None None

Request syntax

GET /prometheus-instances/{instanceId}/agg-task-groups/{groupId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The ID of the Prometheus instance to which the aggregation task group belongs.

rw-xxx

groupId

string

Yes

The ID of the aggregation task group.

aggTaskGroup-xxx

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response struct.

aggTaskGroup

object

The aggregation task group.

aggTaskGroupConfig

string

The configuration of the aggregation task group.

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)"

aggTaskGroupConfigHash

string

The hash of the aggregation task group configuration.

a54136xxx

aggTaskGroupId

string

The ID of the aggregation task group.

aggTaskGroup-xx

aggTaskGroupName

string

The name of the aggregation task group.

pipeline-aggtask-group

cronExpr

string

The scheduling expression of the aggregation task group when the scheduling mode is set to Cron.

0 1 3 * * ? *

delay

integer

The fixed delay time for scheduling, in seconds.

2

description

string

The description of the aggregation task group.

test

fromTime

integer

The UNIX timestamp in seconds for the scheduling start time. This parameter is not yet in effect.

1757409495

maxRetries

integer

The maximum number of retries for executing the aggregation task.

2

maxRunTimeInSeconds

integer

The maximum retry time to execute the aggregation task.

50

precheckString

string

The precheck configuration.

{"policy":"skip","prometheusId":"rw-xx","query":"noPrecheck","threshold":0.5,"timeout":15,"type":"none"}

regionId

string

The region ID.

cn-zhangjiakou

scheduleMode

string

The scheduling mode.

FixedRate

scheduleTimeExpr

string

The scheduling time expression.

@m

sourcePrometheusId

string

The source Prometheus instance ID for the aggregation task group.

rw-xxx

status

string

The status of the aggregation task group.

Running

tags

array<object>

The tags of the resource group.

object

The tag.

key

string

The key of the resource group tag.

key1

value

string

The value of the resource group tag.

value1

targetPrometheusId

string

The target Prometheus instance ID for the aggregation task group.

rw-xxx

toTime

integer

The UNIX timestamp in seconds for the scheduling end time.

1757409495

updateTime

string

The update time of the aggregation task group. The value is a UNIX timestamp.

1757409499000

userId

string

The user to which the aggregation task group belongs.

123xxx

requestId

string

The request ID.

68DAF543-35DF-5762-BE90-F5C00B5DC036

success

boolean

Indicates whether the request is successful.

True

Examples

Success response

JSON format

{
  "aggTaskGroup": {
    "aggTaskGroupConfig": "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\\\"\\\n      }, \\\"pod\\\", \\\"$1\\\", \\\"pod\\\", \\\"(.*)\\\")) by (node, namespace, pod, cluster)\"",
    "aggTaskGroupConfigHash": "a54136xxx",
    "aggTaskGroupId": "aggTaskGroup-xx",
    "aggTaskGroupName": "pipeline-aggtask-group",
    "cronExpr": "0 1 3 * * ? *",
    "delay": 2,
    "description": "test",
    "fromTime": 1757409495,
    "maxRetries": 2,
    "maxRunTimeInSeconds": 50,
    "precheckString": "{\"policy\":\"skip\",\"prometheusId\":\"rw-xx\",\"query\":\"noPrecheck\",\"threshold\":0.5,\"timeout\":15,\"type\":\"none\"}",
    "regionId": "cn-zhangjiakou",
    "scheduleMode": "FixedRate",
    "scheduleTimeExpr": "@m",
    "sourcePrometheusId": "rw-xxx",
    "status": "Running",
    "tags": [
      {
        "key": "key1",
        "value": "value1"
      }
    ],
    "targetPrometheusId": "rw-xxx",
    "toTime": 1757409495,
    "updateTime": "1757409499000",
    "userId": "123xxx"
  },
  "requestId": "68DAF543-35DF-5762-BE90-F5C00B5DC036",
  "success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.