alicloud.cms.DynamicTagGroup
Explore with Pulumi AI
Provides a Cloud Monitor Service Dynamic Tag Group resource.
For information about Cloud Monitor Service Dynamic Tag Group and how to use it, see What is Dynamic Tag Group.
NOTE: Available since v1.142.0.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("defaultAlarmContactGroup", new()
{
AlarmContactGroupName = "example_value",
Describe = "example_value",
EnableSubscribed = true,
});
var defaultDynamicTagGroup = new AliCloud.Cms.DynamicTagGroup("defaultDynamicTagGroup", new()
{
ContactGroupLists = new[]
{
defaultAlarmContactGroup.Id,
},
TagKey = "your_tag_key",
MatchExpresses = new[]
{
new AliCloud.Cms.Inputs.DynamicTagGroupMatchExpressArgs
{
TagValue = "your_tag_value",
TagValueMatchFunction = "all",
},
},
});
});
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 {
defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "defaultAlarmContactGroup", &cms.AlarmContactGroupArgs{
AlarmContactGroupName: pulumi.String("example_value"),
Describe: pulumi.String("example_value"),
EnableSubscribed: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = cms.NewDynamicTagGroup(ctx, "defaultDynamicTagGroup", &cms.DynamicTagGroupArgs{
ContactGroupLists: pulumi.StringArray{
defaultAlarmContactGroup.ID(),
},
TagKey: pulumi.String("your_tag_key"),
MatchExpresses: cms.DynamicTagGroupMatchExpressArray{
&cms.DynamicTagGroupMatchExpressArgs{
TagValue: pulumi.String("your_tag_value"),
TagValueMatchFunction: pulumi.String("all"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.AlarmContactGroup;
import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
import com.pulumi.alicloud.cms.DynamicTagGroup;
import com.pulumi.alicloud.cms.DynamicTagGroupArgs;
import com.pulumi.alicloud.cms.inputs.DynamicTagGroupMatchExpressArgs;
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) {
var defaultAlarmContactGroup = new AlarmContactGroup("defaultAlarmContactGroup", AlarmContactGroupArgs.builder()
.alarmContactGroupName("example_value")
.describe("example_value")
.enableSubscribed(true)
.build());
var defaultDynamicTagGroup = new DynamicTagGroup("defaultDynamicTagGroup", DynamicTagGroupArgs.builder()
.contactGroupLists(defaultAlarmContactGroup.id())
.tagKey("your_tag_key")
.matchExpresses(DynamicTagGroupMatchExpressArgs.builder()
.tagValue("your_tag_value")
.tagValueMatchFunction("all")
.build())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_alarm_contact_group = alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup",
alarm_contact_group_name="example_value",
describe="example_value",
enable_subscribed=True)
default_dynamic_tag_group = alicloud.cms.DynamicTagGroup("defaultDynamicTagGroup",
contact_group_lists=[default_alarm_contact_group.id],
tag_key="your_tag_key",
match_expresses=[alicloud.cms.DynamicTagGroupMatchExpressArgs(
tag_value="your_tag_value",
tag_value_match_function="all",
)])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup", {
alarmContactGroupName: "example_value",
describe: "example_value",
enableSubscribed: true,
});
const defaultDynamicTagGroup = new alicloud.cms.DynamicTagGroup("defaultDynamicTagGroup", {
contactGroupLists: [defaultAlarmContactGroup.id],
tagKey: "your_tag_key",
matchExpresses: [{
tagValue: "your_tag_value",
tagValueMatchFunction: "all",
}],
});
resources:
defaultAlarmContactGroup:
type: alicloud:cms:AlarmContactGroup
properties:
alarmContactGroupName: example_value
describe: example_value
enableSubscribed: true
defaultDynamicTagGroup:
type: alicloud:cms:DynamicTagGroup
properties:
contactGroupLists:
- ${defaultAlarmContactGroup.id}
tagKey: your_tag_key
matchExpresses:
- tagValue: your_tag_value
tagValueMatchFunction: all
Create DynamicTagGroup Resource
new DynamicTagGroup(name: string, args: DynamicTagGroupArgs, opts?: CustomResourceOptions);
@overload
def DynamicTagGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact_group_lists: Optional[Sequence[str]] = None,
match_express_filter_relation: Optional[str] = None,
match_expresses: Optional[Sequence[DynamicTagGroupMatchExpressArgs]] = None,
tag_key: Optional[str] = None,
template_id_lists: Optional[Sequence[str]] = None)
@overload
def DynamicTagGroup(resource_name: str,
args: DynamicTagGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewDynamicTagGroup(ctx *Context, name string, args DynamicTagGroupArgs, opts ...ResourceOption) (*DynamicTagGroup, error)
public DynamicTagGroup(string name, DynamicTagGroupArgs args, CustomResourceOptions? opts = null)
public DynamicTagGroup(String name, DynamicTagGroupArgs args)
public DynamicTagGroup(String name, DynamicTagGroupArgs args, CustomResourceOptions options)
type: alicloud:cms:DynamicTagGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DynamicTagGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DynamicTagGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DynamicTagGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DynamicTagGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DynamicTagGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DynamicTagGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DynamicTagGroup resource accepts the following input properties:
- Contact
Group List<string>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- Match
Expresses List<Pulumi.Ali Cloud. Cms. Inputs. Dynamic Tag Group Match Express> The label generates a matching expression that applies the grouping. See
match_express
below.- Tag
Key string The tag key of the tag.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Template
Id List<string>Lists Alarm template ID list.
- Contact
Group []stringLists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- Match
Expresses []DynamicTag Group Match Express Args The label generates a matching expression that applies the grouping. See
match_express
below.- Tag
Key string The tag key of the tag.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Template
Id []stringLists Alarm template ID list.
- contact
Group List<String>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Expresses List<DynamicTag Group Match Express> The label generates a matching expression that applies the grouping. See
match_express
below.- tag
Key String The tag key of the tag.
- match
Express StringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- template
Id List<String>Lists Alarm template ID list.
- contact
Group string[]Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Expresses DynamicTag Group Match Express[] The label generates a matching expression that applies the grouping. See
match_express
below.- tag
Key string The tag key of the tag.
- match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- template
Id string[]Lists Alarm template ID list.
- contact_
group_ Sequence[str]lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match_
expresses Sequence[DynamicTag Group Match Express Args] The label generates a matching expression that applies the grouping. See
match_express
below.- tag_
key str The tag key of the tag.
- match_
express_ strfilter_ relation The relationship between conditional expressions. Valid values:
and
,or
.- template_
id_ Sequence[str]lists Alarm template ID list.
- contact
Group List<String>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Expresses List<Property Map> The label generates a matching expression that applies the grouping. See
match_express
below.- tag
Key String The tag key of the tag.
- match
Express StringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- template
Id List<String>Lists Alarm template ID list.
Outputs
All input properties are implicitly available as output properties. Additionally, the DynamicTagGroup resource produces the following output properties:
Look up Existing DynamicTagGroup Resource
Get an existing DynamicTagGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DynamicTagGroupState, opts?: CustomResourceOptions): DynamicTagGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact_group_lists: Optional[Sequence[str]] = None,
match_express_filter_relation: Optional[str] = None,
match_expresses: Optional[Sequence[DynamicTagGroupMatchExpressArgs]] = None,
status: Optional[str] = None,
tag_key: Optional[str] = None,
template_id_lists: Optional[Sequence[str]] = None) -> DynamicTagGroup
func GetDynamicTagGroup(ctx *Context, name string, id IDInput, state *DynamicTagGroupState, opts ...ResourceOption) (*DynamicTagGroup, error)
public static DynamicTagGroup Get(string name, Input<string> id, DynamicTagGroupState? state, CustomResourceOptions? opts = null)
public static DynamicTagGroup get(String name, Output<String> id, DynamicTagGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Contact
Group List<string>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Match
Expresses List<Pulumi.Ali Cloud. Cms. Inputs. Dynamic Tag Group Match Express> The label generates a matching expression that applies the grouping. See
match_express
below.- Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- Template
Id List<string>Lists Alarm template ID list.
- Contact
Group []stringLists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Match
Expresses []DynamicTag Group Match Express Args The label generates a matching expression that applies the grouping. See
match_express
below.- Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- Template
Id []stringLists Alarm template ID list.
- contact
Group List<String>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Express StringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- match
Expresses List<DynamicTag Group Match Express> The label generates a matching expression that applies the grouping. See
match_express
below.- status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
- template
Id List<String>Lists Alarm template ID list.
- contact
Group string[]Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- match
Expresses DynamicTag Group Match Express[] The label generates a matching expression that applies the grouping. See
match_express
below.- status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key string The tag key of the tag.
- template
Id string[]Lists Alarm template ID list.
- contact_
group_ Sequence[str]lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match_
express_ strfilter_ relation The relationship between conditional expressions. Valid values:
and
,or
.- match_
expresses Sequence[DynamicTag Group Match Express Args] The label generates a matching expression that applies the grouping. See
match_express
below.- status str
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag_
key str The tag key of the tag.
- template_
id_ Sequence[str]lists Alarm template ID list.
- contact
Group List<String>Lists Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
- match
Express StringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- match
Expresses List<Property Map> The label generates a matching expression that applies the grouping. See
match_express
below.- status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
- template
Id List<String>Lists Alarm template ID list.
Supporting Types
DynamicTagGroupMatchExpress, DynamicTagGroupMatchExpressArgs
- Tag
Value string The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- Tag
Value stringMatch Function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
- Tag
Value string The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- Tag
Value stringMatch Function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
- tag
Value String The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- tag
Value StringMatch Function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
- tag
Value string The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- tag
Value stringMatch Function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
- tag_
value str The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- tag_
value_ strmatch_ function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
- tag
Value String The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
- tag
Value StringMatch Function Matching method of tag value. Valid values:
all
,startWith
,endWith
,contains
,notContains
,equals
.
Import
Cloud Monitor Service Dynamic Tag Group can be imported using the id, e.g.
$ pulumi import alicloud:cms/dynamicTagGroup:DynamicTagGroup example <id>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.