Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.cms.getMonitorGroups
Explore with Pulumi AI
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);
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)
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
})
}
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),
};
});
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()));
}
}
variables:
example:
fn::invoke:
function: alicloud:cms:getMonitorGroups
arguments:
ids:
- example_value
nameRegex: the_resource_name
outputs:
firstCmsMonitorGroupId: ${example.groups[0].id}
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>
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]
func GetMonitorGroups(ctx *Context, args *GetMonitorGroupsArgs, opts ...InvokeOption) (*GetMonitorGroupsResult, error)
func GetMonitorGroupsOutput(ctx *Context, args *GetMonitorGroupsOutputArgs, opts ...InvokeOption) GetMonitorGroupsResultOutput
> 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)
}
public static CompletableFuture<GetMonitorGroupsResult> getMonitorGroups(GetMonitorGroupsArgs args, InvokeOptions options)
public static Output<GetMonitorGroupsResult> getMonitorGroups(GetMonitorGroupsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cms/getMonitorGroups:getMonitorGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Dynamic
Tag Rule Id Changes to this property will trigger replacement.
- The ID of the tag rule.
- Ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- Include
Template History Changes to this property will trigger replacement.
- The include template history.
- Keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- Monitor
Group Name Changes to this property will trigger replacement.
- The name of the application group.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Monitor Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Select
Contact Groups Changes to this property will trigger replacement.
- The select contact groups.
- Dictionary<string, string>
- Type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
- Dynamic
Tag Rule Id Changes to this property will trigger replacement.
- The ID of the tag rule.
- Ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- Include
Template History Changes to this property will trigger replacement.
- The include template history.
- Keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- Monitor
Group Name Changes to this property will trigger replacement.
- The name of the application group.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Monitor Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Select
Contact Groups Changes to this property will trigger replacement.
- The select contact groups.
- map[string]string
- Type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
- dynamic
Tag Rule Id Changes to this property will trigger replacement.
- The ID of the tag rule.
- ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- include
Template History Changes to this property will trigger replacement.
- The include template history.
- keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- monitor
Group Name Changes to this property will trigger replacement.
- The name of the application group.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Monitor Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - select
Contact Groups Changes to this property will trigger replacement.
- The select contact groups.
- Map<String,String>
- type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
- dynamic
Tag Rule Id Changes to this property will trigger replacement.
- The ID of the tag rule.
- ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- include
Template History Changes to this property will trigger replacement.
- The include template history.
- keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- monitor
Group Name Changes to this property will trigger replacement.
- The name of the application group.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Monitor Group name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - select
Contact Groups Changes to this property will trigger replacement.
- The select contact groups.
- {[key: string]: string}
- type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
- dynamic_
tag_ rule_ id Changes to this property will trigger replacement.
- The ID of the tag rule.
- ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- include_
template_ history Changes to this property will trigger replacement.
- The include template history.
- keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- monitor_
group_ name Changes to this property will trigger replacement.
- The name of the application group.
- name_
regex Changes to this property will trigger replacement.
- 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.
- The select contact groups.
- Mapping[str, str]
- type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
- dynamic
Tag Rule Id Changes to this property will trigger replacement.
- The ID of the tag rule.
- ids
Changes to this property will trigger replacement.
- A list of Monitor Group IDs.
- include
Template History Changes to this property will trigger replacement.
- The include template history.
- keyword
Changes to this property will trigger replacement.
- The keyword to be matched.
- monitor
Group Name Changes to this property will trigger replacement.
- The name of the application group.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Monitor Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - select
Contact Groups Changes to this property will trigger replacement.
- The select contact groups.
- Map<String>
- type
Changes to this property will trigger replacement.
- The type of the application group. Valid values:
custom
,ehpc_cluster
,kubernetes
.
getMonitorGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Cms. Outputs. Get Monitor Groups Group> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Dynamic
Tag stringRule Id - Include
Template boolHistory - Keyword string
- Monitor
Group stringName - Name
Regex string - Output
File string - Select
Contact boolGroups - Dictionary<string, string>
- Type string
- Groups
[]Get
Monitor Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Dynamic
Tag stringRule Id - Include
Template boolHistory - Keyword string
- Monitor
Group stringName - Name
Regex string - Output
File string - Select
Contact boolGroups - map[string]string
- Type string
- groups
List<Get
Monitor Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- dynamic
Tag StringRule Id - include
Template BooleanHistory - keyword String
- monitor
Group StringName - name
Regex String - output
File String - select
Contact BooleanGroups - Map<String,String>
- type String
- groups
Get
Monitor Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- dynamic
Tag stringRule Id - include
Template booleanHistory - keyword string
- monitor
Group stringName - name
Regex string - output
File string - select
Contact booleanGroups - {[key: string]: string}
- type string
- groups
Sequence[Get
Monitor Groups Group] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- dynamic_
tag_ strrule_ id - include_
template_ boolhistory - keyword str
- monitor_
group_ strname - name_
regex str - output_
file str - select_
contact_ boolgroups - 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>
- dynamic
Tag StringRule Id - include
Template BooleanHistory - keyword String
- monitor
Group StringName - name
Regex String - output
File String - select
Contact BooleanGroups - Map<String>
- type String
Supporting Types
GetMonitorGroupsGroup
- Bind
Url This property is required. string - The URL of the Kubernetes cluster from which the application group is synchronized.
- Contact
Groups This property is required. List<string> - The list of alert groups that receive alert notifications for the application group.
- Dynamic
Tag Rule Id This property is required. string - 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. string - The ID of the application group.
- Id
This property is required. string - The ID of the Monitor Group.
- Monitor
Group Name This property is required. string - The name of the application group.
- Service
Id This property is required. string - The ID of the Alibaba Cloud service.
This property is required. Dictionary<string, string>- A map of tags assigned to the Cms Monitor Group.
- Template
Ids 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.
- Bind
Url This property is required. string - The URL of the Kubernetes cluster from which the application group is synchronized.
- Contact
Groups This property is required. []string - The list of alert groups that receive alert notifications for the application group.
- Dynamic
Tag Rule Id This property is required. string - 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. string - The ID of the application group.
- Id
This property is required. string - The ID of the Monitor Group.
- Monitor
Group Name This property is required. string - The name of the application group.
- Service
Id This property is required. string - The ID of the Alibaba Cloud service.
This property is required. map[string]string- A map of tags assigned to the Cms Monitor Group.
- Template
Ids 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. String - The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups This property is required. List<String> - The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag Rule Id This property is required. String - The ID of the tag rule.
- gmt
Create This property is required. Integer - The time when the application group was created.
- gmt
Modified This property is required. Integer - The time when the application group was modified.
- group
Id This property is required. String - The ID of the application group.
- id
This property is required. String - The ID of the Monitor Group.
- monitor
Group Name This property is required. String - The name of the application group.
- service
Id This property is required. String - The ID of the Alibaba Cloud service.
This property is required. Map<String,String>- A map of tags assigned to the Cms Monitor Group.
- template
Ids 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.
- bind
Url This property is required. string - The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups This property is required. string[] - The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag Rule Id This property is required. string - The ID of the tag rule.
- gmt
Create This property is required. number - The time when the application group was created.
- gmt
Modified This property is required. number - The time when the application group was modified.
- group
Id This property is required. string - The ID of the application group.
- id
This property is required. string - The ID of the Monitor Group.
- monitor
Group Name This property is required. string - The name of the application group.
- service
Id This property is required. string - The ID of the Alibaba Cloud service.
This property is required. {[key: string]: string}- A map of tags assigned to the Cms Monitor Group.
- template
Ids 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.
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.
- bind
Url This property is required. String - The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups This property is required. List<String> - The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag Rule Id This property is required. String - The ID of the tag rule.
- gmt
Create This property is required. Number - The time when the application group was created.
- gmt
Modified This property is required. Number - The time when the application group was modified.
- group
Id This property is required. String - The ID of the application group.
- id
This property is required. String - The ID of the Monitor Group.
- monitor
Group Name This property is required. String - The name of the application group.
- service
Id This property is required. String - The ID of the Alibaba Cloud service.
This property is required. Map<String>- A map of tags assigned to the Cms Monitor Group.
- template
Ids 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.