GetGroups
This data source provides a list of RAM 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.Ram.GetGroups.InvokeAsync(new AliCloud.Ram.GetGroupsArgs
{
NameRegex = "^group[0-9]*",
OutputFile = "groups.txt",
UserName = "user1",
}));
this.FirstGroupName = groupsDs.Apply(groupsDs => groupsDs.Groups[0].Name);
}
[Output("firstGroupName")]
public Output<string> FirstGroupName { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
groups_ds = alicloud.ram.get_groups(name_regex="^group[0-9]*",
output_file="groups.txt",
user_name="user1")
pulumi.export("firstGroupName", groups_ds.groups[0]["name"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const groupsDs = pulumi.output(alicloud.ram.getGroups({
nameRegex: "^group[0-9]*",
outputFile: "groups.txt",
userName: "user1",
}, { async: true }));
export const firstGroupName = groupsDs.groups[0].name;Using GetGroups
function getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>function get_groups(name_regex=None, output_file=None, policy_name=None, policy_type=None, user_name=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:
- Name
Regex string A regex string to filter the returned groups by their names.
- Output
File string - Policy
Name string Filter the results by a specific policy name. If you set this parameter without setting
policy_type, it will be automatically set toSystem.- Policy
Type string Filter the results by a specific policy type. Valid items are
CustomandSystem. If you set this parameter, you must setpolicy_nameas well.- User
Name string Filter the results by a specific the user name.
- Name
Regex string A regex string to filter the returned groups by their names.
- Output
File string - Policy
Name string Filter the results by a specific policy name. If you set this parameter without setting
policy_type, it will be automatically set toSystem.- Policy
Type string Filter the results by a specific policy type. Valid items are
CustomandSystem. If you set this parameter, you must setpolicy_nameas well.- User
Name string Filter the results by a specific the user name.
- name
Regex string A regex string to filter the returned groups by their names.
- output
File string - policy
Name string Filter the results by a specific policy name. If you set this parameter without setting
policy_type, it will be automatically set toSystem.- policy
Type string Filter the results by a specific policy type. Valid items are
CustomandSystem. If you set this parameter, you must setpolicy_nameas well.- user
Name string Filter the results by a specific the user name.
- name_
regex str A regex string to filter the returned groups by their names.
- output_
file str - policy_
name str Filter the results by a specific policy name. If you set this parameter without setting
policy_type, it will be automatically set toSystem.- policy_
type str Filter the results by a specific policy type. Valid items are
CustomandSystem. If you set this parameter, you must setpolicy_nameas well.- user_
name str Filter the results by a specific the user name.
GetGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Ram. 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.
- Names List<string>
A list of ram group names.
- Name
Regex string - Output
File string - Policy
Name string - Policy
Type string - User
Name string
- Groups
[]Get
Groups Group A list of groups. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Names []string
A list of ram group names.
- Name
Regex string - Output
File string - Policy
Name string - Policy
Type string - User
Name string
- groups
Get
Groups Group[] A list of groups. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- names string[]
A list of ram group names.
- name
Regex string - output
File string - policy
Name string - policy
Type string - user
Name 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.
- names List[str]
A list of ram group names.
- name_
regex str - output_
file str - policy_
name str - policy_
type str - user_
name 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.