1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. getMonitorGroups
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.cms.getMonitorGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 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);
    
    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, Any]] = 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, Any]]] = 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cms/getMonitorGroups:getMonitorGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DynamicTagRuleId string
    The ID of the tag rule.
    Ids List<string>
    A list of Monitor Group IDs.
    IncludeTemplateHistory bool
    The include template history.
    Keyword string
    The keyword to be matched.
    MonitorGroupName string
    The name of the application group.
    NameRegex 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 bool
    The select contact groups.
    Tags Dictionary<string, object>
    A map of tags assigned to the Cms Monitor Group.
    Type string
    The type of the application group.
    DynamicTagRuleId string
    The ID of the tag rule.
    Ids []string
    A list of Monitor Group IDs.
    IncludeTemplateHistory bool
    The include template history.
    Keyword string
    The keyword to be matched.
    MonitorGroupName string
    The name of the application group.
    NameRegex 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 bool
    The select contact groups.
    Tags map[string]interface{}
    A map of tags assigned to the Cms Monitor Group.
    Type string
    The type of the application group.
    dynamicTagRuleId String
    The ID of the tag rule.
    ids List<String>
    A list of Monitor Group IDs.
    includeTemplateHistory Boolean
    The include template history.
    keyword String
    The keyword to be matched.
    monitorGroupName String
    The name of the application group.
    nameRegex 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 Boolean
    The select contact groups.
    tags Map<String,Object>
    A map of tags assigned to the Cms Monitor Group.
    type String
    The type of the application group.
    dynamicTagRuleId string
    The ID of the tag rule.
    ids string[]
    A list of Monitor Group IDs.
    includeTemplateHistory boolean
    The include template history.
    keyword string
    The keyword to be matched.
    monitorGroupName string
    The name of the application group.
    nameRegex 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 boolean
    The select contact groups.
    tags {[key: string]: any}
    A map of tags assigned to the Cms Monitor Group.
    type string
    The type of the application group.
    dynamic_tag_rule_id str
    The ID of the tag rule.
    ids Sequence[str]
    A list of Monitor Group IDs.
    include_template_history bool
    The include template history.
    keyword str
    The keyword to be matched.
    monitor_group_name str
    The name of the application group.
    name_regex 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 bool
    The select contact groups.
    tags Mapping[str, Any]
    A map of tags assigned to the Cms Monitor Group.
    type str
    The type of the application group.
    dynamicTagRuleId String
    The ID of the tag rule.
    ids List<String>
    A list of Monitor Group IDs.
    includeTemplateHistory Boolean
    The include template history.
    keyword String
    The keyword to be matched.
    monitorGroupName String
    The name of the application group.
    nameRegex 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 Boolean
    The select contact groups.
    tags Map<Any>
    A map of tags assigned to the Cms Monitor Group.
    type String
    The type of the application group.

    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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    type String

    Supporting Types

    GetMonitorGroupsGroup

    BindUrl string
    The URL of the Kubernetes cluster from which the application group is synchronized.
    ContactGroups List<string>
    The list of alert groups that receive alert notifications for the application group.
    DynamicTagRuleId string
    The ID of the tag rule.
    GmtCreate int
    The time when the application group was created.
    GmtModified int
    The time when the application group was modified.
    GroupId string
    The ID of the application group.
    Id string
    The ID of the Monitor Group.
    MonitorGroupName string
    The name of the application group.
    ServiceId string
    The ID of the Alibaba Cloud service.
    Tags Dictionary<string, object>
    A map of tags assigned to the Cms Monitor Group.
    TemplateIds List<string>
    The alert templates applied to the application group.
    Type string
    The type of the application group.
    BindUrl string
    The URL of the Kubernetes cluster from which the application group is synchronized.
    ContactGroups []string
    The list of alert groups that receive alert notifications for the application group.
    DynamicTagRuleId string
    The ID of the tag rule.
    GmtCreate int
    The time when the application group was created.
    GmtModified int
    The time when the application group was modified.
    GroupId string
    The ID of the application group.
    Id string
    The ID of the Monitor Group.
    MonitorGroupName string
    The name of the application group.
    ServiceId string
    The ID of the Alibaba Cloud service.
    Tags map[string]interface{}
    A map of tags assigned to the Cms Monitor Group.
    TemplateIds []string
    The alert templates applied to the application group.
    Type string
    The type of the application group.
    bindUrl String
    The URL of the Kubernetes cluster from which the application group is synchronized.
    contactGroups List<String>
    The list of alert groups that receive alert notifications for the application group.
    dynamicTagRuleId String
    The ID of the tag rule.
    gmtCreate Integer
    The time when the application group was created.
    gmtModified Integer
    The time when the application group was modified.
    groupId String
    The ID of the application group.
    id String
    The ID of the Monitor Group.
    monitorGroupName String
    The name of the application group.
    serviceId String
    The ID of the Alibaba Cloud service.
    tags Map<String,Object>
    A map of tags assigned to the Cms Monitor Group.
    templateIds List<String>
    The alert templates applied to the application group.
    type String
    The type of the application group.
    bindUrl string
    The URL of the Kubernetes cluster from which the application group is synchronized.
    contactGroups string[]
    The list of alert groups that receive alert notifications for the application group.
    dynamicTagRuleId string
    The ID of the tag rule.
    gmtCreate number
    The time when the application group was created.
    gmtModified number
    The time when the application group was modified.
    groupId string
    The ID of the application group.
    id string
    The ID of the Monitor Group.
    monitorGroupName string
    The name of the application group.
    serviceId string
    The ID of the Alibaba Cloud service.
    tags {[key: string]: any}
    A map of tags assigned to the Cms Monitor Group.
    templateIds string[]
    The alert templates applied to the application group.
    type string
    The type of the application group.
    bind_url str
    The URL of the Kubernetes cluster from which the application group is synchronized.
    contact_groups Sequence[str]
    The list of alert groups that receive alert notifications for the application group.
    dynamic_tag_rule_id str
    The ID of the tag rule.
    gmt_create int
    The time when the application group was created.
    gmt_modified int
    The time when the application group was modified.
    group_id str
    The ID of the application group.
    id str
    The ID of the Monitor Group.
    monitor_group_name str
    The name of the application group.
    service_id str
    The ID of the Alibaba Cloud service.
    tags Mapping[str, Any]
    A map of tags assigned to the Cms Monitor Group.
    template_ids Sequence[str]
    The alert templates applied to the application group.
    type str
    The type of the application group.
    bindUrl String
    The URL of the Kubernetes cluster from which the application group is synchronized.
    contactGroups List<String>
    The list of alert groups that receive alert notifications for the application group.
    dynamicTagRuleId String
    The ID of the tag rule.
    gmtCreate Number
    The time when the application group was created.
    gmtModified Number
    The time when the application group was modified.
    groupId String
    The ID of the application group.
    id String
    The ID of the Monitor Group.
    monitorGroupName String
    The name of the application group.
    serviceId String
    The ID of the Alibaba Cloud service.
    tags Map<Any>
    A map of tags assigned to the Cms Monitor Group.
    templateIds List<String>
    The alert templates applied to the application group.
    type 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.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi