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
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 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
})
}
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()));
}
}
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)
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);
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:
- Dynamic
Tag stringRule Id The ID of the tag rule.
- Ids List<string>
A list of Monitor Group IDs.
- Include
Template boolHistory The include template history.
- Keyword string
The keyword to be matched.
- Monitor
Group stringName The name of the application group.
- Name
Regex string 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 boolGroups The select contact groups.
- Dictionary<string, object>
A map of tags assigned to the Cms Monitor Group.
- Type string
The type of the application group.
- Dynamic
Tag stringRule Id The ID of the tag rule.
- Ids []string
A list of Monitor Group IDs.
- Include
Template boolHistory The include template history.
- Keyword string
The keyword to be matched.
- Monitor
Group stringName The name of the application group.
- Name
Regex string 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 boolGroups The select contact groups.
- map[string]interface{}
A map of tags assigned to the Cms Monitor Group.
- Type string
The type of the application group.
- dynamic
Tag StringRule Id The ID of the tag rule.
- ids List<String>
A list of Monitor Group IDs.
- include
Template BooleanHistory The include template history.
- keyword String
The keyword to be matched.
- monitor
Group StringName The name of the application group.
- name
Regex String 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 BooleanGroups The select contact groups.
- Map<String,Object>
A map of tags assigned to the Cms Monitor Group.
- type String
The type of the application group.
- dynamic
Tag stringRule Id The ID of the tag rule.
- ids string[]
A list of Monitor Group IDs.
- include
Template booleanHistory The include template history.
- keyword string
The keyword to be matched.
- monitor
Group stringName The name of the application group.
- name
Regex string 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 booleanGroups The select contact groups.
- {[key: string]: any}
A map of tags assigned to the Cms Monitor Group.
- type string
The type of the application group.
- dynamic_
tag_ strrule_ id The ID of the tag rule.
- ids Sequence[str]
A list of Monitor Group IDs.
- include_
template_ boolhistory The include template history.
- keyword str
The keyword to be matched.
- monitor_
group_ strname 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_ boolgroups The select contact groups.
- Mapping[str, Any]
A map of tags assigned to the Cms Monitor Group.
- type str
The type of the application group.
- dynamic
Tag StringRule Id The ID of the tag rule.
- ids List<String>
A list of Monitor Group IDs.
- include
Template BooleanHistory The include template history.
- keyword String
The keyword to be matched.
- monitor
Group StringName The name of the application group.
- name
Regex String 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 BooleanGroups The select contact groups.
- 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.
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, object>
- 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]interface{}
- 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,Object>
- 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]: any}
- 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, Any]
- 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<Any>
- type String
Supporting Types
GetMonitorGroupsGroup
- Bind
Url string The URL of the Kubernetes cluster from which the application group is synchronized.
- Contact
Groups List<string> The list of alert groups that receive alert notifications for the application group.
- Dynamic
Tag stringRule Id 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 string The ID of the application group.
- Id string
The ID of the Monitor Group.
- Monitor
Group stringName The name of the application group.
- Service
Id string The ID of the Alibaba Cloud service.
- Dictionary<string, object>
A map of tags assigned to the Cms Monitor Group.
- Template
Ids List<string> The alert templates applied to the application group.
- Type string
The type of the application group.
- Bind
Url string The URL of the Kubernetes cluster from which the application group is synchronized.
- Contact
Groups []string The list of alert groups that receive alert notifications for the application group.
- Dynamic
Tag stringRule Id 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 string The ID of the application group.
- Id string
The ID of the Monitor Group.
- Monitor
Group stringName The name of the application group.
- Service
Id string The ID of the Alibaba Cloud service.
- map[string]interface{}
A map of tags assigned to the Cms Monitor Group.
- Template
Ids []string The alert templates applied to the application group.
- Type string
The type of the application group.
- bind
Url String The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups List<String> The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag StringRule Id The ID of the tag rule.
- gmt
Create Integer The time when the application group was created.
- gmt
Modified Integer The time when the application group was modified.
- group
Id String The ID of the application group.
- id String
The ID of the Monitor Group.
- monitor
Group StringName The name of the application group.
- service
Id String The ID of the Alibaba Cloud service.
- Map<String,Object>
A map of tags assigned to the Cms Monitor Group.
- template
Ids List<String> The alert templates applied to the application group.
- type String
The type of the application group.
- bind
Url string The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups string[] The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag stringRule Id The ID of the tag rule.
- gmt
Create number The time when the application group was created.
- gmt
Modified number The time when the application group was modified.
- group
Id string The ID of the application group.
- id string
The ID of the Monitor Group.
- monitor
Group stringName The name of the application group.
- service
Id string The ID of the Alibaba Cloud service.
- {[key: string]: any}
A map of tags assigned to the Cms Monitor Group.
- template
Ids 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_ strrule_ id 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_ strname The name of the application group.
- service_
id str The ID of the Alibaba Cloud service.
- 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.
- bind
Url String The URL of the Kubernetes cluster from which the application group is synchronized.
- contact
Groups List<String> The list of alert groups that receive alert notifications for the application group.
- dynamic
Tag StringRule Id The ID of the tag rule.
- gmt
Create Number The time when the application group was created.
- gmt
Modified Number The time when the application group was modified.
- group
Id String The ID of the application group.
- id String
The ID of the Monitor Group.
- monitor
Group StringName The name of the application group.
- service
Id String The ID of the Alibaba Cloud service.
- Map<Any>
A map of tags assigned to the Cms Monitor Group.
- template
Ids 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.