Alibaba Cloud
getDynamicTagGroups
This data source provides the Cms Dynamic Tag Groups of the current Alibaba Cloud user.
NOTE: Available in v1.142.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var name = config.Get("name") ?? "example_value";
var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("defaultAlarmContactGroup", new AliCloud.Cms.AlarmContactGroupArgs
{
AlarmContactGroupName = name,
Describe = "example_value",
EnableSubscribed = true,
});
var defaultDynamicTagGroup = new AliCloud.Cms.DynamicTagGroup("defaultDynamicTagGroup", new AliCloud.Cms.DynamicTagGroupArgs
{
ContactGroupLists =
{
defaultAlarmContactGroup.Id,
},
TagKey = "your_tag_key",
MatchExpresses =
{
new AliCloud.Cms.Inputs.DynamicTagGroupMatchExpressArgs
{
TagValue = "your_tag_value",
TagValueMatchFunction = "all",
},
},
});
var ids = AliCloud.Cms.GetDynamicTagGroups.Invoke(new AliCloud.Cms.GetDynamicTagGroupsInvokeArgs
{
Ids =
{
defaultDynamicTagGroup.Id,
},
});
this.CmsDynamicTagGroupId1 = ids.Apply(ids => ids.Groups?[0]?.Id);
}
[Output("cmsDynamicTagGroupId1")]
public Output<string> CmsDynamicTagGroupId1 { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "example_value"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "defaultAlarmContactGroup", &cms.AlarmContactGroupArgs{
AlarmContactGroupName: pulumi.String(name),
Describe: pulumi.String("example_value"),
EnableSubscribed: pulumi.Bool(true),
})
if err != nil {
return err
}
defaultDynamicTagGroup, 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
}
ids := cms.GetDynamicTagGroupsOutput(ctx, cms.GetDynamicTagGroupsOutputArgs{
Ids: pulumi.StringArray{
defaultDynamicTagGroup.ID(),
},
}, nil)
ctx.Export("cmsDynamicTagGroupId1", ids.ApplyT(func(ids cms.GetDynamicTagGroupsResult) (string, error) {
return ids.Groups[0].Id, nil
}).(pulumi.StringOutput))
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "example_value"
default_alarm_contact_group = alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup",
alarm_contact_group_name=name,
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",
)])
ids = alicloud.cms.get_dynamic_tag_groups_output(ids=[default_dynamic_tag_group.id])
pulumi.export("cmsDynamicTagGroupId1", ids.groups[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "example_value";
const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup", {
alarmContactGroupName: name,
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",
}],
});
const ids = alicloud.cms.getDynamicTagGroupsOutput({
ids: [defaultDynamicTagGroup.id],
});
export const cmsDynamicTagGroupId1 = ids.apply(ids => ids.groups?[0]?.id);
Coming soon!
Using getDynamicTagGroups
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 getDynamicTagGroups(args: GetDynamicTagGroupsArgs, opts?: InvokeOptions): Promise<GetDynamicTagGroupsResult>
function getDynamicTagGroupsOutput(args: GetDynamicTagGroupsOutputArgs, opts?: InvokeOptions): Output<GetDynamicTagGroupsResult>
def get_dynamic_tag_groups(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
tag_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDynamicTagGroupsResult
def get_dynamic_tag_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
tag_key: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDynamicTagGroupsResult]
func GetDynamicTagGroups(ctx *Context, args *GetDynamicTagGroupsArgs, opts ...InvokeOption) (*GetDynamicTagGroupsResult, error)
func GetDynamicTagGroupsOutput(ctx *Context, args *GetDynamicTagGroupsOutputArgs, opts ...InvokeOption) GetDynamicTagGroupsResultOutput
> Note: This function is named GetDynamicTagGroups
in the Go SDK.
public static class GetDynamicTagGroups
{
public static Task<GetDynamicTagGroupsResult> InvokeAsync(GetDynamicTagGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetDynamicTagGroupsResult> Invoke(GetDynamicTagGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDynamicTagGroupsResult> getDynamicTagGroups(GetDynamicTagGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: alicloud:cms/getDynamicTagGroups:getDynamicTagGroups
Arguments:
# Arguments dictionary
The following arguments are supported:
- Ids List<string>
A list of Dynamic Tag Group IDs.
- Output
File string - Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- Ids []string
A list of Dynamic Tag Group IDs.
- Output
File string - Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- ids List<String>
A list of Dynamic Tag Group IDs.
- output
File String - status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
- ids string[]
A list of Dynamic Tag Group IDs.
- output
File string - status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key string The tag key of the tag.
- ids Sequence[str]
A list of Dynamic Tag Group IDs.
- output_
file str - status str
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag_
key str The tag key of the tag.
- ids List<String>
A list of Dynamic Tag Group IDs.
- output
File String - status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
getDynamicTagGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Cms. Outputs. Get Dynamic Tag Groups Group> - Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Output
File string - Status string
- Tag
Key string
- Groups
[]Get
Dynamic Tag Groups Group - Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Output
File string - Status string
- Tag
Key string
- groups
List<Get
Dynamic Tag Groups Group> - id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status String
- tag
Key String
- groups
Get
Dynamic Tag Groups Group[] - id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- output
File string - status string
- tag
Key string
- groups
Sequence[Get
Dynamic Tag Groups Group] - id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- output_
file str - status str
- tag_
key str
- groups List<Property Map>
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - status String
- tag
Key String
Supporting Types
GetDynamicTagGroupsGroup
- Dynamic
Tag stringRule Id The ID of the tag rule.
- Id string
The ID of the Dynamic Tag Group.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Match
Expresses List<Pulumi.Ali Cloud. Cms. Inputs. Get Dynamic Tag Groups Group Match Express> The label generates a matching expression that applies the grouping. See the following
Block match_express
.- Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- Dynamic
Tag stringRule Id The ID of the tag rule.
- Id string
The ID of the Dynamic Tag Group.
- Match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- Match
Expresses []GetDynamic Tag Groups Group Match Express The label generates a matching expression that applies the grouping. See the following
Block match_express
.- Status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- Tag
Key string The tag key of the tag.
- dynamic
Tag StringRule Id The ID of the tag rule.
- id String
The ID of the Dynamic Tag Group.
- match
Express StringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- match
Expresses List<GetDynamic Tag Groups Group Match Express> The label generates a matching expression that applies the grouping. See the following
Block match_express
.- status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
- dynamic
Tag stringRule Id The ID of the tag rule.
- id string
The ID of the Dynamic Tag Group.
- match
Express stringFilter Relation The relationship between conditional expressions. Valid values:
and
,or
.- match
Expresses GetDynamic Tag Groups Group Match Express[] The label generates a matching expression that applies the grouping. See the following
Block match_express
.- status string
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key string The tag key of the tag.
- dynamic_
tag_ strrule_ id The ID of the tag rule.
- id str
The ID of the Dynamic Tag Group.
- match_
express_ strfilter_ relation The relationship between conditional expressions. Valid values:
and
,or
.- match_
expresses Sequence[GetDynamic Tag Groups Group Match Express] The label generates a matching expression that applies the grouping. See the following
Block match_express
.- status str
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag_
key str The tag key of the tag.
- dynamic
Tag StringRule Id The ID of the tag rule.
- id String
The ID of the Dynamic Tag 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 the following
Block match_express
.- status String
The status of the resource. Valid values:
RUNNING
,FINISH
.- tag
Key String The tag key of the tag.
GetDynamicTagGroupsGroupMatchExpress
- 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
.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.