1. Packages
  2. Googleworkspace Provider
  3. API Docs
  4. getGroups
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;
Copy
import pulumi
import pulumi_googleworkspace as googleworkspace

my_domain_groups = googleworkspace.get_groups()
pulumi.export("numGroups", len(my_domain_groups.groups))
Copy
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
	})
}
Copy
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,
    };
});
Copy
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());
    }
}
Copy
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>
Copy
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]
Copy
func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: googleworkspace:index/getGroups:getGroups
  arguments:
    # arguments dictionary
Copy

The 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<GetGroupsGroup>
A list of Group resources.
Id string
The ID of this resource.
Groups []GetGroupsGroup
A list of Group resources.
Id string
The ID of this resource.
groups List<GetGroupsGroup>
A list of Group resources.
id String
The ID of this resource.
groups GetGroupsGroup[]
A list of Group resources.
id string
The ID of this resource.
groups Sequence[GetGroupsGroup]
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 This property is required. bool
Value is true if this group was created by an administrator rather than a user.
Aliases This property is required. List<string>
asps.list of group's email addresses.
Description This property is required. 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.
DirectMembersCount This property is required. double
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 This property is required. string
Etag This property is required. string
ETag of the resource.
Id This property is required. string
The ID of this resource.
Name This property is required. string
The group's display name.
NonEditableAliases This property is required. List<string>
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 This property is required. bool
Value is true if this group was created by an administrator rather than a user.
Aliases This property is required. []string
asps.list of group's email addresses.
Description This property is required. 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.
DirectMembersCount This property is required. float64
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 This property is required. string
Etag This property is required. string
ETag of the resource.
Id This property is required. string
The ID of this resource.
Name This property is required. string
The group's display name.
NonEditableAliases This property is required. []string
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 This property is required. Boolean
Value is true if this group was created by an administrator rather than a user.
aliases This property is required. List<String>
asps.list of group's email addresses.
description This property is required. 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.
directMembersCount This property is required. Double
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 This property is required. String
etag This property is required. String
ETag of the resource.
id This property is required. String
The ID of this resource.
name This property is required. String
The group's display name.
nonEditableAliases This property is required. List<String>
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 This property is required. boolean
Value is true if this group was created by an administrator rather than a user.
aliases This property is required. string[]
asps.list of group's email addresses.
description This property is required. 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.
directMembersCount This property is required. number
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 This property is required. string
etag This property is required. string
ETag of the resource.
id This property is required. string
The ID of this resource.
name This property is required. string
The group's display name.
nonEditableAliases This property is required. string[]
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 This property is required. bool
Value is true if this group was created by an administrator rather than a user.
aliases This property is required. Sequence[str]
asps.list of group's email addresses.
description This property is required. 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_count This property is required. float
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 This property is required. str
etag This property is required. str
ETag of the resource.
id This property is required. str
The ID of this resource.
name This property is required. str
The group's display name.
non_editable_aliases This property is required. Sequence[str]
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 This property is required. Boolean
Value is true if this group was created by an administrator rather than a user.
aliases This property is required. List<String>
asps.list of group's email addresses.
description This property is required. 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.
directMembersCount This property is required. Number
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 This property is required. String
etag This property is required. String
ETag of the resource.
id This property is required. String
The ID of this resource.
name This property is required. String
The group's display name.
nonEditableAliases This property is required. List<String>
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 googleworkspace Terraform Provider.
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp