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.
- Name
Regex string A regex string to filter results by group name.
- Output
File 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.
Ali Cloud. Dns. Outputs. Get Groups Group> 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.
- Name
Regex string - Output
File string
- groups
List[Get
Groups Group] 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.
- 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
alicloudTerraform Provider.