Google Cloud (GCP) Classic

v6.39.0 published on Wednesday, Sep 28, 2022 by Pulumi

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 = pulumi.output(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
DisplayName string
GroupKeys List<GetGroupsGroupGroupKey>
InitialGroupConfig string
Labels Dictionary<string, string>
Name string
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
DisplayName string
GroupKeys []GetGroupsGroupGroupKey
InitialGroupConfig string
Labels map[string]string
Name string
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
displayName String
groupKeys List<GetGroupsGroupGroupKey>
initialGroupConfig String
labels Map<String,String>
name String
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
displayName string
groupKeys GetGroupsGroupGroupKey[]
initialGroupConfig string
labels {[key: string]: string}
name string
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
display_name str
group_keys Sequence[GetGroupsGroupGroupKey]
initial_group_config str
labels Mapping[str, str]
name str
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
displayName String
groupKeys List<Property Map>
initialGroupConfig String
labels Map<String>
name String
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
Namespace string
Id string
Namespace string
id String
namespace String
id string
namespace string
id str
namespace str
id String
namespace String

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

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