1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. DynamicTagGroup
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.cms.DynamicTagGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.cms.AlarmContactGroup("default", {
        alarmContactGroupName: "example_value",
        describe: "example_value",
        enableSubscribed: true,
    });
    const defaultDynamicTagGroup = new alicloud.cms.DynamicTagGroup("default", {
        contactGroupLists: [_default.id],
        tagKey: "your_tag_key",
        matchExpresses: [{
            tagValue: "your_tag_value",
            tagValueMatchFunction: "all",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.cms.AlarmContactGroup("default",
        alarm_contact_group_name="example_value",
        describe="example_value",
        enable_subscribed=True)
    default_dynamic_tag_group = alicloud.cms.DynamicTagGroup("default",
        contact_group_lists=[default.id],
        tag_key="your_tag_key",
        match_expresses=[alicloud.cms.DynamicTagGroupMatchExpressArgs(
            tag_value="your_tag_value",
            tag_value_match_function="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 {
    		_, err := cms.NewAlarmContactGroup(ctx, "default", &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, "default", &cms.DynamicTagGroupArgs{
    			ContactGroupLists: pulumi.StringArray{
    				_default.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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.Cms.AlarmContactGroup("default", new()
        {
            AlarmContactGroupName = "example_value",
            Describe = "example_value",
            EnableSubscribed = true,
        });
    
        var defaultDynamicTagGroup = new AliCloud.Cms.DynamicTagGroup("default", new()
        {
            ContactGroupLists = new[]
            {
                @default.Id,
            },
            TagKey = "your_tag_key",
            MatchExpresses = new[]
            {
                new AliCloud.Cms.Inputs.DynamicTagGroupMatchExpressArgs
                {
                    TagValue = "your_tag_value",
                    TagValueMatchFunction = "all",
                },
            },
        });
    
    });
    
    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 default_ = new AlarmContactGroup("default", AlarmContactGroupArgs.builder()
                .alarmContactGroupName("example_value")
                .describe("example_value")
                .enableSubscribed(true)
                .build());
    
            var defaultDynamicTagGroup = new DynamicTagGroup("defaultDynamicTagGroup", DynamicTagGroupArgs.builder()
                .contactGroupLists(default_.id())
                .tagKey("your_tag_key")
                .matchExpresses(DynamicTagGroupMatchExpressArgs.builder()
                    .tagValue("your_tag_value")
                    .tagValueMatchFunction("all")
                    .build())
                .build());
    
        }
    }
    
    resources:
      default:
        type: alicloud:cms:AlarmContactGroup
        properties:
          alarmContactGroupName: example_value
          describe: example_value
          enableSubscribed: true
      defaultDynamicTagGroup:
        type: alicloud:cms:DynamicTagGroup
        name: default
        properties:
          contactGroupLists:
            - ${default.id}
          tagKey: your_tag_key
          matchExpresses:
            - tagValue: your_tag_value
              tagValueMatchFunction: all
    

    Create DynamicTagGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DynamicTagGroup(name: string, args: DynamicTagGroupArgs, opts?: CustomResourceOptions);
    @overload
    def DynamicTagGroup(resource_name: str,
                        args: DynamicTagGroupArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def DynamicTagGroup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        contact_group_lists: Optional[Sequence[str]] = None,
                        match_expresses: Optional[Sequence[DynamicTagGroupMatchExpressArgs]] = None,
                        tag_key: Optional[str] = None,
                        match_express_filter_relation: Optional[str] = None,
                        template_id_lists: Optional[Sequence[str]] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var dynamicTagGroupResource = new AliCloud.Cms.DynamicTagGroup("dynamicTagGroupResource", new()
    {
        ContactGroupLists = new[]
        {
            "string",
        },
        MatchExpresses = new[]
        {
            new AliCloud.Cms.Inputs.DynamicTagGroupMatchExpressArgs
            {
                TagValue = "string",
                TagValueMatchFunction = "string",
            },
        },
        TagKey = "string",
        MatchExpressFilterRelation = "string",
        TemplateIdLists = new[]
        {
            "string",
        },
    });
    
    example, err := cms.NewDynamicTagGroup(ctx, "dynamicTagGroupResource", &cms.DynamicTagGroupArgs{
    	ContactGroupLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	MatchExpresses: cms.DynamicTagGroupMatchExpressArray{
    		&cms.DynamicTagGroupMatchExpressArgs{
    			TagValue:              pulumi.String("string"),
    			TagValueMatchFunction: pulumi.String("string"),
    		},
    	},
    	TagKey:                     pulumi.String("string"),
    	MatchExpressFilterRelation: pulumi.String("string"),
    	TemplateIdLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var dynamicTagGroupResource = new DynamicTagGroup("dynamicTagGroupResource", DynamicTagGroupArgs.builder()
        .contactGroupLists("string")
        .matchExpresses(DynamicTagGroupMatchExpressArgs.builder()
            .tagValue("string")
            .tagValueMatchFunction("string")
            .build())
        .tagKey("string")
        .matchExpressFilterRelation("string")
        .templateIdLists("string")
        .build());
    
    dynamic_tag_group_resource = alicloud.cms.DynamicTagGroup("dynamicTagGroupResource",
        contact_group_lists=["string"],
        match_expresses=[alicloud.cms.DynamicTagGroupMatchExpressArgs(
            tag_value="string",
            tag_value_match_function="string",
        )],
        tag_key="string",
        match_express_filter_relation="string",
        template_id_lists=["string"])
    
    const dynamicTagGroupResource = new alicloud.cms.DynamicTagGroup("dynamicTagGroupResource", {
        contactGroupLists: ["string"],
        matchExpresses: [{
            tagValue: "string",
            tagValueMatchFunction: "string",
        }],
        tagKey: "string",
        matchExpressFilterRelation: "string",
        templateIdLists: ["string"],
    });
    
    type: alicloud:cms:DynamicTagGroup
    properties:
        contactGroupLists:
            - string
        matchExpressFilterRelation: string
        matchExpresses:
            - tagValue: string
              tagValueMatchFunction: string
        tagKey: string
        templateIdLists:
            - string
    

    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:

    ContactGroupLists List<string>
    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.
    MatchExpresses List<Pulumi.AliCloud.Cms.Inputs.DynamicTagGroupMatchExpress>
    The label generates a matching expression that applies the grouping. See match_express below.
    TagKey string
    The tag key of the tag.
    MatchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    TemplateIdLists List<string>
    Alarm template ID list.
    ContactGroupLists []string
    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.
    MatchExpresses []DynamicTagGroupMatchExpressArgs
    The label generates a matching expression that applies the grouping. See match_express below.
    TagKey string
    The tag key of the tag.
    MatchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    TemplateIdLists []string
    Alarm template ID list.
    contactGroupLists List<String>
    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.
    matchExpresses List<DynamicTagGroupMatchExpress>
    The label generates a matching expression that applies the grouping. See match_express below.
    tagKey String
    The tag key of the tag.
    matchExpressFilterRelation String
    The relationship between conditional expressions. Valid values: and, or.
    templateIdLists List<String>
    Alarm template ID list.
    contactGroupLists string[]
    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.
    matchExpresses DynamicTagGroupMatchExpress[]
    The label generates a matching expression that applies the grouping. See match_express below.
    tagKey string
    The tag key of the tag.
    matchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    templateIdLists string[]
    Alarm template ID list.
    contact_group_lists Sequence[str]
    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[DynamicTagGroupMatchExpressArgs]
    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_filter_relation str
    The relationship between conditional expressions. Valid values: and, or.
    template_id_lists Sequence[str]
    Alarm template ID list.
    contactGroupLists List<String>
    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.
    matchExpresses List<Property Map>
    The label generates a matching expression that applies the grouping. See match_express below.
    tagKey String
    The tag key of the tag.
    matchExpressFilterRelation String
    The relationship between conditional expressions. Valid values: and, or.
    templateIdLists List<String>
    Alarm template ID list.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DynamicTagGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource. Valid values: RUNNING, FINISH.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource. Valid values: RUNNING, FINISH.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource. Valid values: RUNNING, FINISH.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource. Valid values: RUNNING, FINISH.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource. Valid values: RUNNING, FINISH.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource. Valid values: RUNNING, FINISH.

    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.
    The following state arguments are supported:
    ContactGroupLists List<string>
    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.
    MatchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    MatchExpresses List<Pulumi.AliCloud.Cms.Inputs.DynamicTagGroupMatchExpress>
    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.
    TagKey string
    The tag key of the tag.
    TemplateIdLists List<string>
    Alarm template ID list.
    ContactGroupLists []string
    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.
    MatchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    MatchExpresses []DynamicTagGroupMatchExpressArgs
    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.
    TagKey string
    The tag key of the tag.
    TemplateIdLists []string
    Alarm template ID list.
    contactGroupLists List<String>
    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.
    matchExpressFilterRelation String
    The relationship between conditional expressions. Valid values: and, or.
    matchExpresses List<DynamicTagGroupMatchExpress>
    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.
    tagKey String
    The tag key of the tag.
    templateIdLists List<String>
    Alarm template ID list.
    contactGroupLists string[]
    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.
    matchExpressFilterRelation string
    The relationship between conditional expressions. Valid values: and, or.
    matchExpresses DynamicTagGroupMatchExpress[]
    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.
    tagKey string
    The tag key of the tag.
    templateIdLists string[]
    Alarm template ID list.
    contact_group_lists Sequence[str]
    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_filter_relation str
    The relationship between conditional expressions. Valid values: and, or.
    match_expresses Sequence[DynamicTagGroupMatchExpressArgs]
    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_lists Sequence[str]
    Alarm template ID list.
    contactGroupLists List<String>
    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.
    matchExpressFilterRelation String
    The relationship between conditional expressions. Valid values: and, or.
    matchExpresses 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.
    tagKey String
    The tag key of the tag.
    templateIdLists List<String>
    Alarm template ID list.

    Supporting Types

    DynamicTagGroupMatchExpress, DynamicTagGroupMatchExpressArgs

    TagValue string
    The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
    TagValueMatchFunction string
    Matching method of tag value. Valid values: all, startWith,endWith,contains,notContains,equals.
    TagValue string
    The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
    TagValueMatchFunction string
    Matching method of tag value. Valid values: all, startWith,endWith,contains,notContains,equals.
    tagValue String
    The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
    tagValueMatchFunction String
    Matching method of tag value. Valid values: all, startWith,endWith,contains,notContains,equals.
    tagValue string
    The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
    tagValueMatchFunction string
    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_match_function str
    Matching method of tag value. Valid values: all, startWith,endWith,contains,notContains,equals.
    tagValue String
    The tag value. The Tag value must be used in conjunction with the tag value matching method TagValueMatchFunction.
    tagValueMatchFunction String
    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>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.57.0 published on Saturday, Jun 15, 2024 by Pulumi