GetGroups

This data source provides a list of DNS Domain Groups in an Alibaba Cloud account according to the specified filters.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var groupsDs = Output.Create(AliCloud.Dns.GetGroups.InvokeAsync(new AliCloud.Dns.GetGroupsArgs
        {
            NameRegex = "^y[A-Za-z]+",
            OutputFile = "groups.txt",
        }));
        this.FirstGroupName = groupsDs.Apply(groupsDs => groupsDs.Groups[0].GroupName);
    }

    [Output("firstGroupName")]
    public Output<string> FirstGroupName { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

groups_ds = alicloud.dns.get_groups(name_regex="^y[A-Za-z]+",
    output_file="groups.txt")
pulumi.export("firstGroupName", groups_ds.groups[0]["group_name"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const groupsDs = pulumi.output(alicloud.dns.getGroups({
    nameRegex: "^y[A-Za-z]+",
    outputFile: "groups.txt",
}, { async: true }));

export const firstGroupName = groupsDs.groups[0].groupName;

Using GetGroups

function getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
function  get_groups(ids=None, name_regex=None, output_file=None, opts=None)
func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
public static class GetGroups {
    public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Ids List<string>

A list of group IDs.

NameRegex string

A regex string to filter results by group name.

OutputFile string
Ids []string

A list of group IDs.

NameRegex string

A regex string to filter results by group name.

OutputFile string
ids string[]

A list of group IDs.

nameRegex string

A regex string to filter results by group name.

outputFile string
ids List[str]

A list of group IDs.

name_regex str

A regex string to filter results by group name.

output_file str

GetGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.Dns.Outputs.GetGroupsGroup>

A list of groups. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of group IDs.

Names List<string>

A list of group names.

NameRegex string
OutputFile string
Groups []GetGroupsGroup

A list of groups. Each element contains the following attributes:

Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of group IDs.

Names []string

A list of group names.

NameRegex string
OutputFile string
groups GetGroupsGroup[]

A list of groups. Each element contains the following attributes:

id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of group IDs.

names string[]

A list of group names.

nameRegex string
outputFile string
groups List[GetGroupsGroup]

A list of groups. Each element contains the following attributes:

id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of group IDs.

names List[str]

A list of group names.

name_regex str
output_file str

Supporting Types

GetGroupsGroup

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

GroupId string

Id of the group.

GroupName string

Name of the group.

GroupId string

Id of the group.

GroupName string

Name of the group.

groupId string

Id of the group.

groupName string

Name of the group.

group_id str

Id of the group.

group_name str

Name of the group.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.