gcp.cloudidentity.getGroups
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const groups = gcp.cloudidentity.getGroups({
    parent: "customers/A01b123xz",
});
import pulumi
import pulumi_gcp as gcp
groups = gcp.cloudidentity.get_groups(parent="customers/A01b123xz")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var groups = Gcp.CloudIdentity.GetGroups.Invoke(new()
    {
        Parent = "customers/A01b123xz",
    });
});
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());
    }
}
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)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:cloudidentity/getGroups:getGroups
  arguments:
    # arguments dictionaryThe 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<GetGroups Group> 
- 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
[]GetGroups Group 
- 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<GetGroups Group> 
- 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
GetGroups Group[] 
- 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[GetGroups Group] 
- 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  
- AdditionalGroup List<GetKeys Groups Group Additional Group Key> 
- Additional group keys associated with the Group
- CreateTime string
- The time when the Group was created.
- Description string
- An extended description to help users determine the purpose of a Group.
- DisplayName string
- The display name of the Group.
- GroupKeys List<GetGroups Group Group Key> 
- EntityKey of the Group. Structure is documented below.
- InitialGroup stringConfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
- AdditionalGroup []GetKeys Groups Group Additional Group Key 
- Additional group keys associated with the Group
- CreateTime string
- The time when the Group was created.
- Description string
- An extended description to help users determine the purpose of a Group.
- DisplayName string
- The display name of the Group.
- GroupKeys []GetGroups Group Group Key 
- EntityKey of the Group. Structure is documented below.
- InitialGroup stringConfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
- additionalGroup List<GetKeys Groups Group Additional Group Key> 
- Additional group keys associated with the Group
- createTime String
- The time when the Group was created.
- description String
- An extended description to help users determine the purpose of a Group.
- displayName String
- The display name of the Group.
- groupKeys List<GetGroups Group Group Key> 
- EntityKey of the Group. Structure is documented below.
- initialGroup StringConfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
- additionalGroup GetKeys Groups Group Additional Group Key[] 
- Additional group keys associated with the Group
- createTime string
- The time when the Group was created.
- description string
- An extended description to help users determine the purpose of a Group.
- displayName string
- The display name of the Group.
- groupKeys GetGroups Group Group Key[] 
- EntityKey of the Group. Structure is documented below.
- initialGroup stringConfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
- additional_group_ Sequence[Getkeys Groups Group Additional Group Key] 
- Additional group keys associated with the Group
- create_time str
- The time when the Group was created.
- 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[GetGroups Group Group Key] 
- EntityKey of the Group. Structure is documented below.
- initial_group_ strconfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
- additionalGroup List<Property Map>Keys 
- Additional group keys associated with the Group
- createTime String
- The time when the Group was created.
- 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.
- initialGroup StringConfig 
- The initial configuration options for creating a Group. - See the API reference for possible values. Default value: "EMPTY" Possible values: ["INITIAL_GROUP_CONFIG_UNSPECIFIED", "WITH_INITIAL_OWNER", "EMPTY"] 
- 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_idis 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
- The time when the Group was last updated.
GetGroupsGroupAdditionalGroupKey     
- 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}.
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-betaTerraform Provider.