googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp
googleworkspace.getGroups
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 my-domain-groups = googleworkspace.getGroups({});
export const numGroups = my_domain_groups.then(my_domain_groups => my_domain_groups.groups).length;
import pulumi
import pulumi_googleworkspace as googleworkspace
my_domain_groups = googleworkspace.get_groups()
pulumi.export("numGroups", len(my_domain_groups.groups))
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 {
		my_domain_groups, err := googleworkspace.GetGroups(ctx, &googleworkspace.GetGroupsArgs{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("numGroups", pulumi.Int(len(my_domain_groups.Groups)))
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Googleworkspace = Pulumi.Googleworkspace;
return await Deployment.RunAsync(() => 
{
    var my_domain_groups = Googleworkspace.GetGroups.Invoke();
    return new Dictionary<string, object?>
    {
        ["numGroups"] = my_domain_groups.Apply(my_domain_groups => my_domain_groups.Apply(getGroupsResult => getGroupsResult.Groups)).Length,
    };
});
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.GetGroupsArgs;
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 my-domain-groups = GoogleworkspaceFunctions.getGroups();
        ctx.export("numGroups", my_domain_groups.groups().length());
    }
}
Coming soon!
Using getGroups
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 getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
function getGroupsOutput(args: GetGroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupsResult>def get_groups(id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput> Note: This function is named GetGroups in the Go SDK.
public static class GetGroups 
{
    public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupsResult> Invoke(GetGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: googleworkspace:index/getGroups:getGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Id string
- The ID of this resource.
- Id string
- The ID of this resource.
- id String
- The ID of this resource.
- id string
- The ID of this resource.
- id str
- The ID of this resource.
- id String
- The ID of this resource.
getGroups Result
The following output properties are available:
- Groups
List<GetGroups Group> 
- A list of Group resources.
- Id string
- The ID of this resource.
- Groups
[]GetGroups Group 
- A list of Group resources.
- Id string
- The ID of this resource.
- groups
List<GetGroups Group> 
- A list of Group resources.
- id String
- The ID of this resource.
- groups
GetGroups Group[] 
- A list of Group resources.
- id string
- The ID of this resource.
- groups
Sequence[GetGroups Group] 
- A list of Group resources.
- id str
- The ID of this resource.
- groups List<Property Map>
- A list of Group resources.
- id String
- The ID of this resource.
Supporting Types
GetGroupsGroup  
- AdminCreated bool
- Value is true if this group was created by an administrator rather than a user.
- Aliases List<string>
- asps.list of group's email addresses.
- Description string
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- DirectMembers doubleCount 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- Email string
- Etag string
- ETag of the resource.
- Id string
- The ID of this resource.
- Name string
- The group's display name.
- NonEditable List<string>Aliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
- AdminCreated bool
- Value is true if this group was created by an administrator rather than a user.
- Aliases []string
- asps.list of group's email addresses.
- Description string
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- DirectMembers float64Count 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- Email string
- Etag string
- ETag of the resource.
- Id string
- The ID of this resource.
- Name string
- The group's display name.
- NonEditable []stringAliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
- adminCreated Boolean
- Value is true if this group was created by an administrator rather than a user.
- aliases List<String>
- asps.list of group's email addresses.
- description String
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- directMembers DoubleCount 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- email String
- etag String
- ETag of the resource.
- id String
- The ID of this resource.
- name String
- The group's display name.
- nonEditable List<String>Aliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
- adminCreated boolean
- Value is true if this group was created by an administrator rather than a user.
- aliases string[]
- asps.list of group's email addresses.
- description string
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- directMembers numberCount 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- email string
- etag string
- ETag of the resource.
- id string
- The ID of this resource.
- name string
- The group's display name.
- nonEditable string[]Aliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
- admin_created bool
- Value is true if this group was created by an administrator rather than a user.
- aliases Sequence[str]
- asps.list of group's email addresses.
- description str
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- direct_members_ floatcount 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- email str
- etag str
- ETag of the resource.
- id str
- The ID of this resource.
- name str
- The group's display name.
- non_editable_ Sequence[str]aliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
- adminCreated Boolean
- Value is true if this group was created by an administrator rather than a user.
- aliases List<String>
- asps.list of group's email addresses.
- description String
- An extended description to help users determine the purpose of a group.For example, you can include information about who should join the group,the types of messages to send to the group, links to FAQs about the group, or related groups.
- directMembers NumberCount 
- The number of users that are direct members of the group.If a group is a member (child) of this group (the parent),members of the child group are not counted in the directMembersCount property of the parent group.
- email String
- etag String
- ETag of the resource.
- id String
- The ID of this resource.
- name String
- The group's display name.
- nonEditable List<String>Aliases 
- asps.list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group.
Package Details
- Repository
- googleworkspace hashicorp/terraform-provider-googleworkspace
- License
- Notes
- This Pulumi package is based on the googleworkspaceTerraform Provider.
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp