Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.32.0 published on Wednesday, Jul 20, 2022 by Pulumi

getGroupMemberships

Use this data source to get list of the Cloud Identity Group Memberships within a given Group.

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

Example Usage

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var members = Output.Create(Gcp.CloudIdentity.GetGroupMemberships.InvokeAsync(new Gcp.CloudIdentity.GetGroupMembershipsArgs
        {
            Group = "groups/123eab45c6defghi",
        }));
    }

}
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.GetGroupMemberships(ctx, &cloudidentity.GetGroupMembershipsArgs{
			Group: "groups/123eab45c6defghi",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var members = Output.of(CloudidentityFunctions.getGroupMemberships(GetGroupMembershipsArgs.builder()
            .group("groups/123eab45c6defghi")
            .build()));

    }
}
import pulumi
import pulumi_gcp as gcp

members = gcp.cloudidentity.get_group_memberships(group="groups/123eab45c6defghi")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const members = pulumi.output(gcp.cloudidentity.getGroupMemberships({
    group: "groups/123eab45c6defghi",
}));
variables:
  members:
    Fn::Invoke:
      Function: gcp:cloudidentity:getGroupMemberships
      Arguments:
        group: groups/123eab45c6defghi

Using getGroupMemberships

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 getGroupMemberships(args: GetGroupMembershipsArgs, opts?: InvokeOptions): Promise<GetGroupMembershipsResult>
function getGroupMembershipsOutput(args: GetGroupMembershipsOutputArgs, opts?: InvokeOptions): Output<GetGroupMembershipsResult>
def get_group_memberships(group: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetGroupMembershipsResult
def get_group_memberships_output(group: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetGroupMembershipsResult]
func GetGroupMemberships(ctx *Context, args *GetGroupMembershipsArgs, opts ...InvokeOption) (*GetGroupMembershipsResult, error)
func GetGroupMembershipsOutput(ctx *Context, args *GetGroupMembershipsOutputArgs, opts ...InvokeOption) GetGroupMembershipsResultOutput

> Note: This function is named GetGroupMemberships in the Go SDK.

public static class GetGroupMemberships 
{
    public static Task<GetGroupMembershipsResult> InvokeAsync(GetGroupMembershipsArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupMembershipsResult> Invoke(GetGroupMembershipsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGroupMembershipsResult> getGroupMemberships(GetGroupMembershipsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gcp:cloudidentity/getGroupMemberships:getGroupMemberships
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

Group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

group String

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

group str

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

group String

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

getGroupMemberships Result

The following output properties are available:

Group string
Id string

The provider-assigned unique ID for this managed resource.

Memberships List<GetGroupMembershipsMembership>

The list of memberships under the given group. Structure is documented below.

Group string
Id string

The provider-assigned unique ID for this managed resource.

Memberships []GetGroupMembershipsMembership

The list of memberships under the given group. Structure is documented below.

group String
id String

The provider-assigned unique ID for this managed resource.

memberships List<GetGroupMembershipsMembership>

The list of memberships under the given group. Structure is documented below.

group string
id string

The provider-assigned unique ID for this managed resource.

memberships GetGroupMembershipsMembership[]

The list of memberships under the given group. Structure is documented below.

group str
id str

The provider-assigned unique ID for this managed resource.

memberships Sequence[GetGroupMembershipsMembership]

The list of memberships under the given group. Structure is documented below.

group String
id String

The provider-assigned unique ID for this managed resource.

memberships List<Property Map>

The list of memberships under the given group. Structure is documented below.

Supporting Types

GetGroupMembershipsMembership

CreateTime string
Group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

MemberKeys List<GetGroupMembershipsMembershipMemberKey>
Name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

PreferredMemberKeys List<GetGroupMembershipsMembershipPreferredMemberKey>
Roles List<GetGroupMembershipsMembershipRole>

The MembershipRoles that apply to the Membership. Structure is documented below.

Type string
UpdateTime string
CreateTime string
Group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

MemberKeys []GetGroupMembershipsMembershipMemberKey
Name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

PreferredMemberKeys []GetGroupMembershipsMembershipPreferredMemberKey
Roles []GetGroupMembershipsMembershipRole

The MembershipRoles that apply to the Membership. Structure is documented below.

Type string
UpdateTime string
createTime String
group String

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

memberKeys List<GetGroupMembershipsMembershipMemberKey>
name String

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

preferredMemberKeys List<GetGroupMembershipsMembershipPreferredMemberKey>
roles List<GetGroupMembershipsMembershipRole>

The MembershipRoles that apply to the Membership. Structure is documented below.

type String
updateTime String
createTime string
group string

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

memberKeys GetGroupMembershipsMembershipMemberKey[]
name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

preferredMemberKeys GetGroupMembershipsMembershipPreferredMemberKey[]
roles GetGroupMembershipsMembershipRole[]

The MembershipRoles that apply to the Membership. Structure is documented below.

type string
updateTime string
create_time str
group str

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

member_keys Sequence[GetGroupMembershipsMembershipMemberKey]
name str

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

preferred_member_keys Sequence[GetGroupMembershipsMembershipPreferredMemberKey]
roles Sequence[GetGroupMembershipsMembershipRole]

The MembershipRoles that apply to the Membership. Structure is documented below.

type str
update_time str
createTime String
group String

The parent Group resource under which to lookup the Membership names. Must be of the form groups/{group_id}.

memberKeys List<Property Map>
name String

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

preferredMemberKeys List<Property Map>
roles List<Property Map>

The MembershipRoles that apply to the Membership. Structure is documented below.

type String
updateTime String

GetGroupMembershipsMembershipMemberKey

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.

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.

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.

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.

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.

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.

GetGroupMembershipsMembershipPreferredMemberKey

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.

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.

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.

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.

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.

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.

GetGroupMembershipsMembershipRole

Name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

Name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

name String

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

name string

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

name str

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

name String

The name of the MembershipRole. One of OWNER, MANAGER, MEMBER.

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.