1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cms
  5. getMonitorGroups
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cms.getMonitorGroups

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Cms Monitor Groups of the current Alibaba Cloud user.

NOTE: Available in v1.113.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.cms.getMonitorGroups({
    ids: ["example_value"],
    nameRegex: "the_resource_name",
});
export const firstCmsMonitorGroupId = example.then(example => example.groups?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.cms.get_monitor_groups(ids=["example_value"],
    name_regex="the_resource_name")
pulumi.export("firstCmsMonitorGroupId", example.groups[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := cms.GetMonitorGroups(ctx, &cms.GetMonitorGroupsArgs{
			Ids: []string{
				"example_value",
			},
			NameRegex: pulumi.StringRef("the_resource_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstCmsMonitorGroupId", example.Groups[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.Cms.GetMonitorGroups.Invoke(new()
    {
        Ids = new[]
        {
            "example_value",
        },
        NameRegex = "the_resource_name",
    });

    return new Dictionary<string, object?>
    {
        ["firstCmsMonitorGroupId"] = example.Apply(getMonitorGroupsResult => getMonitorGroupsResult.Groups[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.CmsFunctions;
import com.pulumi.alicloud.cms.inputs.GetMonitorGroupsArgs;
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 = CmsFunctions.getMonitorGroups(GetMonitorGroupsArgs.builder()
            .ids("example_value")
            .nameRegex("the_resource_name")
            .build());

        ctx.export("firstCmsMonitorGroupId", example.applyValue(getMonitorGroupsResult -> getMonitorGroupsResult.groups()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:cms:getMonitorGroups
      arguments:
        ids:
          - example_value
        nameRegex: the_resource_name
outputs:
  firstCmsMonitorGroupId: ${example.groups[0].id}
Copy

Using getMonitorGroups

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 getMonitorGroups(args: GetMonitorGroupsArgs, opts?: InvokeOptions): Promise<GetMonitorGroupsResult>
function getMonitorGroupsOutput(args: GetMonitorGroupsOutputArgs, opts?: InvokeOptions): Output<GetMonitorGroupsResult>
Copy
def get_monitor_groups(dynamic_tag_rule_id: Optional[str] = None,
                       ids: Optional[Sequence[str]] = None,
                       include_template_history: Optional[bool] = None,
                       keyword: Optional[str] = None,
                       monitor_group_name: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       select_contact_groups: Optional[bool] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetMonitorGroupsResult
def get_monitor_groups_output(dynamic_tag_rule_id: Optional[pulumi.Input[str]] = None,
                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       include_template_history: Optional[pulumi.Input[bool]] = None,
                       keyword: Optional[pulumi.Input[str]] = None,
                       monitor_group_name: Optional[pulumi.Input[str]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       select_contact_groups: Optional[pulumi.Input[bool]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       type: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetMonitorGroupsResult]
Copy
func GetMonitorGroups(ctx *Context, args *GetMonitorGroupsArgs, opts ...InvokeOption) (*GetMonitorGroupsResult, error)
func GetMonitorGroupsOutput(ctx *Context, args *GetMonitorGroupsOutputArgs, opts ...InvokeOption) GetMonitorGroupsResultOutput
Copy

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

public static class GetMonitorGroups 
{
    public static Task<GetMonitorGroupsResult> InvokeAsync(GetMonitorGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetMonitorGroupsResult> Invoke(GetMonitorGroupsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMonitorGroupsResult> getMonitorGroups(GetMonitorGroupsArgs args, InvokeOptions options)
public static Output<GetMonitorGroupsResult> getMonitorGroups(GetMonitorGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cms/getMonitorGroups:getMonitorGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DynamicTagRuleId Changes to this property will trigger replacement. string
The ID of the tag rule.
Ids Changes to this property will trigger replacement. List<string>
A list of Monitor Group IDs.
IncludeTemplateHistory Changes to this property will trigger replacement. bool
The include template history.
Keyword Changes to this property will trigger replacement. string
The keyword to be matched.
MonitorGroupName Changes to this property will trigger replacement. string
The name of the application group.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Monitor Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
SelectContactGroups Changes to this property will trigger replacement. bool
The select contact groups.
Tags Dictionary<string, string>
Type Changes to this property will trigger replacement. string
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.
DynamicTagRuleId Changes to this property will trigger replacement. string
The ID of the tag rule.
Ids Changes to this property will trigger replacement. []string
A list of Monitor Group IDs.
IncludeTemplateHistory Changes to this property will trigger replacement. bool
The include template history.
Keyword Changes to this property will trigger replacement. string
The keyword to be matched.
MonitorGroupName Changes to this property will trigger replacement. string
The name of the application group.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Monitor Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
SelectContactGroups Changes to this property will trigger replacement. bool
The select contact groups.
Tags map[string]string
Type Changes to this property will trigger replacement. string
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.
dynamicTagRuleId Changes to this property will trigger replacement. String
The ID of the tag rule.
ids Changes to this property will trigger replacement. List<String>
A list of Monitor Group IDs.
includeTemplateHistory Changes to this property will trigger replacement. Boolean
The include template history.
keyword Changes to this property will trigger replacement. String
The keyword to be matched.
monitorGroupName Changes to this property will trigger replacement. String
The name of the application group.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Monitor Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
selectContactGroups Changes to this property will trigger replacement. Boolean
The select contact groups.
tags Map<String,String>
type Changes to this property will trigger replacement. String
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.
dynamicTagRuleId Changes to this property will trigger replacement. string
The ID of the tag rule.
ids Changes to this property will trigger replacement. string[]
A list of Monitor Group IDs.
includeTemplateHistory Changes to this property will trigger replacement. boolean
The include template history.
keyword Changes to this property will trigger replacement. string
The keyword to be matched.
monitorGroupName Changes to this property will trigger replacement. string
The name of the application group.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Monitor Group name.
outputFile string
File name where to save data source results (after running pulumi preview).
selectContactGroups Changes to this property will trigger replacement. boolean
The select contact groups.
tags {[key: string]: string}
type Changes to this property will trigger replacement. string
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.
dynamic_tag_rule_id Changes to this property will trigger replacement. str
The ID of the tag rule.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Monitor Group IDs.
include_template_history Changes to this property will trigger replacement. bool
The include template history.
keyword Changes to this property will trigger replacement. str
The keyword to be matched.
monitor_group_name Changes to this property will trigger replacement. str
The name of the application group.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Monitor Group name.
output_file str
File name where to save data source results (after running pulumi preview).
select_contact_groups Changes to this property will trigger replacement. bool
The select contact groups.
tags Mapping[str, str]
type Changes to this property will trigger replacement. str
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.
dynamicTagRuleId Changes to this property will trigger replacement. String
The ID of the tag rule.
ids Changes to this property will trigger replacement. List<String>
A list of Monitor Group IDs.
includeTemplateHistory Changes to this property will trigger replacement. Boolean
The include template history.
keyword Changes to this property will trigger replacement. String
The keyword to be matched.
monitorGroupName Changes to this property will trigger replacement. String
The name of the application group.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Monitor Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
selectContactGroups Changes to this property will trigger replacement. Boolean
The select contact groups.
tags Map<String>
type Changes to this property will trigger replacement. String
The type of the application group. Valid values: custom, ehpc_cluster, kubernetes.

getMonitorGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.Cms.Outputs.GetMonitorGroupsGroup>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
DynamicTagRuleId string
IncludeTemplateHistory bool
Keyword string
MonitorGroupName string
NameRegex string
OutputFile string
SelectContactGroups bool
Tags Dictionary<string, string>
Type string
Groups []GetMonitorGroupsGroup
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
DynamicTagRuleId string
IncludeTemplateHistory bool
Keyword string
MonitorGroupName string
NameRegex string
OutputFile string
SelectContactGroups bool
Tags map[string]string
Type string
groups List<GetMonitorGroupsGroup>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
dynamicTagRuleId String
includeTemplateHistory Boolean
keyword String
monitorGroupName String
nameRegex String
outputFile String
selectContactGroups Boolean
tags Map<String,String>
type String
groups GetMonitorGroupsGroup[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
dynamicTagRuleId string
includeTemplateHistory boolean
keyword string
monitorGroupName string
nameRegex string
outputFile string
selectContactGroups boolean
tags {[key: string]: string}
type string
groups Sequence[GetMonitorGroupsGroup]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
dynamic_tag_rule_id str
include_template_history bool
keyword str
monitor_group_name str
name_regex str
output_file str
select_contact_groups bool
tags Mapping[str, str]
type str
groups List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
dynamicTagRuleId String
includeTemplateHistory Boolean
keyword String
monitorGroupName String
nameRegex String
outputFile String
selectContactGroups Boolean
tags Map<String>
type String

Supporting Types

GetMonitorGroupsGroup

BindUrl This property is required. string
The URL of the Kubernetes cluster from which the application group is synchronized.
ContactGroups This property is required. List<string>
The list of alert groups that receive alert notifications for the application group.
DynamicTagRuleId This property is required. string
The ID of the tag rule.
GmtCreate This property is required. int
The time when the application group was created.
GmtModified This property is required. int
The time when the application group was modified.
GroupId This property is required. string
The ID of the application group.
Id This property is required. string
The ID of the Monitor Group.
MonitorGroupName This property is required. string
The name of the application group.
ServiceId This property is required. string
The ID of the Alibaba Cloud service.
Tags This property is required. Dictionary<string, string>
A map of tags assigned to the Cms Monitor Group.
TemplateIds This property is required. List<string>
The alert templates applied to the application group.
Type This property is required. string
The type of the application group.
BindUrl This property is required. string
The URL of the Kubernetes cluster from which the application group is synchronized.
ContactGroups This property is required. []string
The list of alert groups that receive alert notifications for the application group.
DynamicTagRuleId This property is required. string
The ID of the tag rule.
GmtCreate This property is required. int
The time when the application group was created.
GmtModified This property is required. int
The time when the application group was modified.
GroupId This property is required. string
The ID of the application group.
Id This property is required. string
The ID of the Monitor Group.
MonitorGroupName This property is required. string
The name of the application group.
ServiceId This property is required. string
The ID of the Alibaba Cloud service.
Tags This property is required. map[string]string
A map of tags assigned to the Cms Monitor Group.
TemplateIds This property is required. []string
The alert templates applied to the application group.
Type This property is required. string
The type of the application group.
bindUrl This property is required. String
The URL of the Kubernetes cluster from which the application group is synchronized.
contactGroups This property is required. List<String>
The list of alert groups that receive alert notifications for the application group.
dynamicTagRuleId This property is required. String
The ID of the tag rule.
gmtCreate This property is required. Integer
The time when the application group was created.
gmtModified This property is required. Integer
The time when the application group was modified.
groupId This property is required. String
The ID of the application group.
id This property is required. String
The ID of the Monitor Group.
monitorGroupName This property is required. String
The name of the application group.
serviceId This property is required. String
The ID of the Alibaba Cloud service.
tags This property is required. Map<String,String>
A map of tags assigned to the Cms Monitor Group.
templateIds This property is required. List<String>
The alert templates applied to the application group.
type This property is required. String
The type of the application group.
bindUrl This property is required. string
The URL of the Kubernetes cluster from which the application group is synchronized.
contactGroups This property is required. string[]
The list of alert groups that receive alert notifications for the application group.
dynamicTagRuleId This property is required. string
The ID of the tag rule.
gmtCreate This property is required. number
The time when the application group was created.
gmtModified This property is required. number
The time when the application group was modified.
groupId This property is required. string
The ID of the application group.
id This property is required. string
The ID of the Monitor Group.
monitorGroupName This property is required. string
The name of the application group.
serviceId This property is required. string
The ID of the Alibaba Cloud service.
tags This property is required. {[key: string]: string}
A map of tags assigned to the Cms Monitor Group.
templateIds This property is required. string[]
The alert templates applied to the application group.
type This property is required. string
The type of the application group.
bind_url This property is required. str
The URL of the Kubernetes cluster from which the application group is synchronized.
contact_groups This property is required. Sequence[str]
The list of alert groups that receive alert notifications for the application group.
dynamic_tag_rule_id This property is required. str
The ID of the tag rule.
gmt_create This property is required. int
The time when the application group was created.
gmt_modified This property is required. int
The time when the application group was modified.
group_id This property is required. str
The ID of the application group.
id This property is required. str
The ID of the Monitor Group.
monitor_group_name This property is required. str
The name of the application group.
service_id This property is required. str
The ID of the Alibaba Cloud service.
tags This property is required. Mapping[str, str]
A map of tags assigned to the Cms Monitor Group.
template_ids This property is required. Sequence[str]
The alert templates applied to the application group.
type This property is required. str
The type of the application group.
bindUrl This property is required. String
The URL of the Kubernetes cluster from which the application group is synchronized.
contactGroups This property is required. List<String>
The list of alert groups that receive alert notifications for the application group.
dynamicTagRuleId This property is required. String
The ID of the tag rule.
gmtCreate This property is required. Number
The time when the application group was created.
gmtModified This property is required. Number
The time when the application group was modified.
groupId This property is required. String
The ID of the application group.
id This property is required. String
The ID of the Monitor Group.
monitorGroupName This property is required. String
The name of the application group.
serviceId This property is required. String
The ID of the Alibaba Cloud service.
tags This property is required. Map<String>
A map of tags assigned to the Cms Monitor Group.
templateIds This property is required. List<String>
The alert templates applied to the application group.
type This property is required. String
The type of the application group.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi