googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp
googleworkspace.getGroupMembers
Explore with Pulumi AI
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as googleworkspace from "@pulumi/googleworkspace";
const salesGroup = googleworkspace.getGroup({
email: "sales@example.com",
});
const salesGroupMembers = salesGroup.then(salesGroup => googleworkspace.getGroupMembers({
groupId: salesGroup.id,
}));
export const groupMembers = salesGroupMembers.then(salesGroupMembers => salesGroupMembers.members);
import pulumi
import pulumi_googleworkspace as googleworkspace
sales_group = googleworkspace.get_group(email="sales@example.com")
sales_group_members = googleworkspace.get_group_members(group_id=sales_group.id)
pulumi.export("groupMembers", sales_group_members.members)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/googleworkspace/googleworkspace"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
salesGroup, err := googleworkspace.LookupGroup(ctx, &googleworkspace.LookupGroupArgs{
Email: pulumi.StringRef("sales@example.com"),
}, nil)
if err != nil {
return err
}
salesGroupMembers, err := googleworkspace.LookupGroupMembers(ctx, &googleworkspace.LookupGroupMembersArgs{
GroupId: salesGroup.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("groupMembers", salesGroupMembers.Members)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Googleworkspace = Pulumi.Googleworkspace;
return await Deployment.RunAsync(() =>
{
var salesGroup = Googleworkspace.GetGroup.Invoke(new()
{
Email = "sales@example.com",
});
var salesGroupMembers = Googleworkspace.GetGroupMembers.Invoke(new()
{
GroupId = salesGroup.Apply(getGroupResult => getGroupResult.Id),
});
return new Dictionary<string, object?>
{
["groupMembers"] = salesGroupMembers.Apply(getGroupMembersResult => getGroupMembersResult.Members),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.googleworkspace.GoogleworkspaceFunctions;
import com.pulumi.googleworkspace.inputs.GetGroupArgs;
import com.pulumi.googleworkspace.inputs.GetGroupMembersArgs;
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) {
final var salesGroup = GoogleworkspaceFunctions.getGroup(GetGroupArgs.builder()
.email("sales@example.com")
.build());
final var salesGroupMembers = GoogleworkspaceFunctions.getGroupMembers(GetGroupMembersArgs.builder()
.groupId(salesGroup.applyValue(getGroupResult -> getGroupResult.id()))
.build());
ctx.export("groupMembers", salesGroupMembers.applyValue(getGroupMembersResult -> getGroupMembersResult.members()));
}
}
variables:
salesGroup:
fn::invoke:
function: googleworkspace:getGroup
arguments:
email: sales@example.com
salesGroupMembers:
fn::invoke:
function: googleworkspace:getGroupMembers
arguments:
groupId: ${salesGroup.id}
outputs:
groupMembers: ${salesGroupMembers.members}
Using getGroupMembers
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 getGroupMembers(args: GetGroupMembersArgs, opts?: InvokeOptions): Promise<GetGroupMembersResult>
function getGroupMembersOutput(args: GetGroupMembersOutputArgs, opts?: InvokeOptions): Output<GetGroupMembersResult>
def get_group_members(group_id: Optional[str] = None,
include_derived_membership: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetGroupMembersResult
def get_group_members_output(group_id: Optional[pulumi.Input[str]] = None,
include_derived_membership: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetGroupMembersResult]
func LookupGroupMembers(ctx *Context, args *LookupGroupMembersArgs, opts ...InvokeOption) (*LookupGroupMembersResult, error)
func LookupGroupMembersOutput(ctx *Context, args *LookupGroupMembersOutputArgs, opts ...InvokeOption) LookupGroupMembersResultOutput
> Note: This function is named LookupGroupMembers
in the Go SDK.
public static class GetGroupMembers
{
public static Task<GetGroupMembersResult> InvokeAsync(GetGroupMembersArgs args, InvokeOptions? opts = null)
public static Output<GetGroupMembersResult> Invoke(GetGroupMembersInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGroupMembersResult> getGroupMembers(GetGroupMembersArgs args, InvokeOptions options)
public static Output<GetGroupMembersResult> getGroupMembers(GetGroupMembersArgs args, InvokeOptions options)
fn::invoke:
function: googleworkspace:index/getGroupMembers:getGroupMembers
arguments:
# arguments dictionary
The following arguments are supported:
- Group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- Include
Derived boolMembership - If true, lists indirect group memberships
- Group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- Include
Derived boolMembership - If true, lists indirect group memberships
- group
Id String - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- include
Derived BooleanMembership - If true, lists indirect group memberships
- group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- include
Derived booleanMembership - If true, lists indirect group memberships
- group_
id str - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- include_
derived_ boolmembership - If true, lists indirect group memberships
- group
Id String - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- include
Derived BooleanMembership - If true, lists indirect group memberships
getGroupMembers Result
The following output properties are available:
- Etag string
- ETag of the resource.
- Group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- Id string
- The ID of this resource.
- Members
List<Get
Group Members Member> - The members of the group
- Include
Derived boolMembership - If true, lists indirect group memberships
- Etag string
- ETag of the resource.
- Group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- Id string
- The ID of this resource.
- Members
[]Get
Group Members Member - The members of the group
- Include
Derived boolMembership - If true, lists indirect group memberships
- etag String
- ETag of the resource.
- group
Id String - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- id String
- The ID of this resource.
- members
List<Get
Group Members Member> - The members of the group
- include
Derived BooleanMembership - If true, lists indirect group memberships
- etag string
- ETag of the resource.
- group
Id string - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- id string
- The ID of this resource.
- members
Get
Group Members Member[] - The members of the group
- include
Derived booleanMembership - If true, lists indirect group memberships
- etag str
- ETag of the resource.
- group_
id str - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- id str
- The ID of this resource.
- members
Sequence[Get
Group Members Member] - The members of the group
- include_
derived_ boolmembership - If true, lists indirect group memberships
- etag String
- ETag of the resource.
- group
Id String - Identifies the group in the API request. The value can be the group's email address, group alias, or the unique group ID.
- id String
- The ID of this resource.
- members List<Property Map>
- The members of the group
- include
Derived BooleanMembership - If true, lists indirect group memberships
Supporting Types
GetGroupMembersMember
Package Details
- Repository
- googleworkspace hashicorp/terraform-provider-googleworkspace
- License
- Notes
- This Pulumi package is based on the
googleworkspace
Terraform Provider.
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp