gcp logo
Google Cloud Classic v6.49.0, Feb 1 23

gcp.cloudidentity.getGroups

Use this data source to get list of the Cloud Identity Groups under a customer or namespace.

https://cloud.google.com/identity/docs/concepts/overview#groups

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var groups = Gcp.CloudIdentity.GetGroups.Invoke(new()
    {
        Parent = "customers/A01b123xz",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudidentity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudidentity.GetGroups(ctx, &cloudidentity.GetGroupsArgs{
			Parent: "customers/A01b123xz",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudidentity.CloudidentityFunctions;
import com.pulumi.gcp.cloudidentity.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 groups = CloudidentityFunctions.getGroups(GetGroupsArgs.builder()
            .parent("customers/A01b123xz")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

groups = gcp.cloudidentity.get_groups(parent="customers/A01b123xz")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const groups = gcp.cloudidentity.getGroups({
    parent: "customers/A01b123xz",
});
variables:
  groups:
    fn::invoke:
      Function: gcp:cloudidentity:getGroups
      Arguments:
        parent: customers/A01b123xz

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(parent: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(parent: 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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:cloudidentity/getGroups:getGroups
  arguments:
    # arguments dictionary

The following arguments are supported:

Parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

Parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

parent String

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

parent str

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

parent String

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

getGroups Result

The following output properties are available:

Groups List<GetGroupsGroup>

The list of groups under the provided customer or namespace. Structure is documented below.

Id string

The provider-assigned unique ID for this managed resource.

Parent string
Groups []GetGroupsGroup

The list of groups under the provided customer or namespace. Structure is documented below.

Id string

The provider-assigned unique ID for this managed resource.

Parent string
groups List<GetGroupsGroup>

The list of groups under the provided customer or namespace. Structure is documented below.

id String

The provider-assigned unique ID for this managed resource.

parent String
groups GetGroupsGroup[]

The list of groups under the provided customer or namespace. Structure is documented below.

id string

The provider-assigned unique ID for this managed resource.

parent string
groups Sequence[GetGroupsGroup]

The list of groups under the provided customer or namespace. Structure is documented below.

id str

The provider-assigned unique ID for this managed resource.

parent str
groups List<Property Map>

The list of groups under the provided customer or namespace. Structure is documented below.

id String

The provider-assigned unique ID for this managed resource.

parent String

Supporting Types

GetGroupsGroup

CreateTime string
Description string

An extended description to help users determine the purpose of a Group.

DisplayName string

The display name of the Group.

GroupKeys List<GetGroupsGroupGroupKey>

EntityKey of the Group. Structure is documented below.

InitialGroupConfig string
Labels Dictionary<string, string>

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

Name string

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

Parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

UpdateTime string
CreateTime string
Description string

An extended description to help users determine the purpose of a Group.

DisplayName string

The display name of the Group.

GroupKeys []GetGroupsGroupGroupKey

EntityKey of the Group. Structure is documented below.

InitialGroupConfig string
Labels map[string]string

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

Name string

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

Parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

UpdateTime string
createTime String
description String

An extended description to help users determine the purpose of a Group.

displayName String

The display name of the Group.

groupKeys List<GetGroupsGroupGroupKey>

EntityKey of the Group. Structure is documented below.

initialGroupConfig String
labels Map<String,String>

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

name String

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

parent String

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

updateTime String
createTime string
description string

An extended description to help users determine the purpose of a Group.

displayName string

The display name of the Group.

groupKeys GetGroupsGroupGroupKey[]

EntityKey of the Group. Structure is documented below.

initialGroupConfig string
labels {[key: string]: string}

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

name string

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

parent string

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

updateTime string
create_time str
description str

An extended description to help users determine the purpose of a Group.

display_name str

The display name of the Group.

group_keys Sequence[GetGroupsGroupGroupKey]

EntityKey of the Group. Structure is documented below.

initial_group_config str
labels Mapping[str, str]

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

name str

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

parent str

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

update_time str
createTime String
description String

An extended description to help users determine the purpose of a Group.

displayName String

The display name of the Group.

groupKeys List<Property Map>

EntityKey of the Group. Structure is documented below.

initialGroupConfig String
labels Map<String>

The labels that apply to the Group. Contains 'cloudidentity.googleapis.com/groups.discussion_forum': '' if the Group is a Google Group or 'system/groups/external': '' if the Group is an external-identity-mapped group.

name String

Resource name of the Group in the format: groups/{group_id}, where group_id is the unique ID assigned to the Group.

parent String

The parent resource under which to list all Groups. Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups.

updateTime String

GetGroupsGroupGroupKey

Id string

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

Namespace string

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

Id string

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

Namespace string

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

id String

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

namespace String

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

id string

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

namespace string

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

id str

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

namespace str

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

id String

The ID of the entity. For Google-managed entities, the id is the email address of an existing group or user. For external-identity-mapped entities, the id is a string conforming to the Identity Source's requirements.

namespace String

The namespace in which the entity exists. If not populated, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If populated, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.