1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudidentity
  5. GroupMembership
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.cloudidentity.GroupMembership

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    A Membership defines a relationship between a Group and an entity belonging to that Group, referred to as a “member”.

    To get more information about GroupMembership, see:

    Warning: If you are using User ADCs (Application Default Credentials) with this resource, you must specify a billing_project and set user_project_override to true in the provider configuration. Otherwise the Cloud Identity API will return a 403 error. Your account must have the serviceusage.services.use permission on the billing_project you defined.

    Example Usage

    Cloud Identity Group Membership

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @group = new Gcp.CloudIdentity.Group("group", new()
        {
            DisplayName = "my-identity-group",
            Parent = "customers/A01b123xz",
            GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
            {
                Id = "my-identity-group@example.com",
            },
            Labels = 
            {
                { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
            },
        });
    
        var child_group = new Gcp.CloudIdentity.Group("child-group", new()
        {
            DisplayName = "my-identity-group-child",
            Parent = "customers/A01b123xz",
            GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
            {
                Id = "my-identity-group-child@example.com",
            },
            Labels = 
            {
                { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
            },
        });
    
        var cloudIdentityGroupMembershipBasic = new Gcp.CloudIdentity.GroupMembership("cloudIdentityGroupMembershipBasic", new()
        {
            Group = @group.Id,
            PreferredMemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipPreferredMemberKeyArgs
            {
                Id = child_group.GroupKey.Apply(groupKey => groupKey.Id),
            },
            Roles = new[]
            {
                new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
                {
                    Name = "MEMBER",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudidentity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		group, err := cloudidentity.NewGroup(ctx, "group", &cloudidentity.GroupArgs{
    			DisplayName: pulumi.String("my-identity-group"),
    			Parent:      pulumi.String("customers/A01b123xz"),
    			GroupKey: &cloudidentity.GroupGroupKeyArgs{
    				Id: pulumi.String("my-identity-group@example.com"),
    			},
    			Labels: pulumi.StringMap{
    				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudidentity.NewGroup(ctx, "child-group", &cloudidentity.GroupArgs{
    			DisplayName: pulumi.String("my-identity-group-child"),
    			Parent:      pulumi.String("customers/A01b123xz"),
    			GroupKey: &cloudidentity.GroupGroupKeyArgs{
    				Id: pulumi.String("my-identity-group-child@example.com"),
    			},
    			Labels: pulumi.StringMap{
    				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudidentity.NewGroupMembership(ctx, "cloudIdentityGroupMembershipBasic", &cloudidentity.GroupMembershipArgs{
    			Group: group.ID(),
    			PreferredMemberKey: &cloudidentity.GroupMembershipPreferredMemberKeyArgs{
    				Id: child_group.GroupKey.ApplyT(func(groupKey cloudidentity.GroupGroupKey) (*string, error) {
    					return &groupKey.Id, nil
    				}).(pulumi.StringPtrOutput),
    			},
    			Roles: cloudidentity.GroupMembershipRoleArray{
    				&cloudidentity.GroupMembershipRoleArgs{
    					Name: pulumi.String("MEMBER"),
    				},
    			},
    		})
    		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.Group;
    import com.pulumi.gcp.cloudidentity.GroupArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupGroupKeyArgs;
    import com.pulumi.gcp.cloudidentity.GroupMembership;
    import com.pulumi.gcp.cloudidentity.GroupMembershipArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipPreferredMemberKeyArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipRoleArgs;
    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) {
            var group = new Group("group", GroupArgs.builder()        
                .displayName("my-identity-group")
                .parent("customers/A01b123xz")
                .groupKey(GroupGroupKeyArgs.builder()
                    .id("my-identity-group@example.com")
                    .build())
                .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
                .build());
    
            var child_group = new Group("child-group", GroupArgs.builder()        
                .displayName("my-identity-group-child")
                .parent("customers/A01b123xz")
                .groupKey(GroupGroupKeyArgs.builder()
                    .id("my-identity-group-child@example.com")
                    .build())
                .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
                .build());
    
            var cloudIdentityGroupMembershipBasic = new GroupMembership("cloudIdentityGroupMembershipBasic", GroupMembershipArgs.builder()        
                .group(group.id())
                .preferredMemberKey(GroupMembershipPreferredMemberKeyArgs.builder()
                    .id(child_group.groupKey().applyValue(groupKey -> groupKey.id()))
                    .build())
                .roles(GroupMembershipRoleArgs.builder()
                    .name("MEMBER")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    group = gcp.cloudidentity.Group("group",
        display_name="my-identity-group",
        parent="customers/A01b123xz",
        group_key=gcp.cloudidentity.GroupGroupKeyArgs(
            id="my-identity-group@example.com",
        ),
        labels={
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        })
    child_group = gcp.cloudidentity.Group("child-group",
        display_name="my-identity-group-child",
        parent="customers/A01b123xz",
        group_key=gcp.cloudidentity.GroupGroupKeyArgs(
            id="my-identity-group-child@example.com",
        ),
        labels={
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        })
    cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloudIdentityGroupMembershipBasic",
        group=group.id,
        preferred_member_key=gcp.cloudidentity.GroupMembershipPreferredMemberKeyArgs(
            id=child_group.group_key.id,
        ),
        roles=[gcp.cloudidentity.GroupMembershipRoleArgs(
            name="MEMBER",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const group = new gcp.cloudidentity.Group("group", {
        displayName: "my-identity-group",
        parent: "customers/A01b123xz",
        groupKey: {
            id: "my-identity-group@example.com",
        },
        labels: {
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        },
    });
    const child_group = new gcp.cloudidentity.Group("child-group", {
        displayName: "my-identity-group-child",
        parent: "customers/A01b123xz",
        groupKey: {
            id: "my-identity-group-child@example.com",
        },
        labels: {
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        },
    });
    const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloudIdentityGroupMembershipBasic", {
        group: group.id,
        preferredMemberKey: {
            id: child_group.groupKey.apply(groupKey => groupKey.id),
        },
        roles: [{
            name: "MEMBER",
        }],
    });
    
    resources:
      group:
        type: gcp:cloudidentity:Group
        properties:
          displayName: my-identity-group
          parent: customers/A01b123xz
          groupKey:
            id: my-identity-group@example.com
          labels:
            cloudidentity.googleapis.com/groups.discussion_forum:
      child-group:
        type: gcp:cloudidentity:Group
        properties:
          displayName: my-identity-group-child
          parent: customers/A01b123xz
          groupKey:
            id: my-identity-group-child@example.com
          labels:
            cloudidentity.googleapis.com/groups.discussion_forum:
      cloudIdentityGroupMembershipBasic:
        type: gcp:cloudidentity:GroupMembership
        properties:
          group: ${group.id}
          preferredMemberKey:
            id: ${["child-group"].groupKey.id}
          roles:
            - name: MEMBER
    

    Cloud Identity Group Membership User

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @group = new Gcp.CloudIdentity.Group("group", new()
        {
            DisplayName = "my-identity-group",
            Parent = "customers/A01b123xz",
            GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
            {
                Id = "my-identity-group@example.com",
            },
            Labels = 
            {
                { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
            },
        });
    
        var cloudIdentityGroupMembershipBasic = new Gcp.CloudIdentity.GroupMembership("cloudIdentityGroupMembershipBasic", new()
        {
            Group = @group.Id,
            PreferredMemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipPreferredMemberKeyArgs
            {
                Id = "cloud_identity_user@example.com",
            },
            Roles = new[]
            {
                new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
                {
                    Name = "MEMBER",
                },
                new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
                {
                    Name = "MANAGER",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudidentity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		group, err := cloudidentity.NewGroup(ctx, "group", &cloudidentity.GroupArgs{
    			DisplayName: pulumi.String("my-identity-group"),
    			Parent:      pulumi.String("customers/A01b123xz"),
    			GroupKey: &cloudidentity.GroupGroupKeyArgs{
    				Id: pulumi.String("my-identity-group@example.com"),
    			},
    			Labels: pulumi.StringMap{
    				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudidentity.NewGroupMembership(ctx, "cloudIdentityGroupMembershipBasic", &cloudidentity.GroupMembershipArgs{
    			Group: group.ID(),
    			PreferredMemberKey: &cloudidentity.GroupMembershipPreferredMemberKeyArgs{
    				Id: pulumi.String("cloud_identity_user@example.com"),
    			},
    			Roles: cloudidentity.GroupMembershipRoleArray{
    				&cloudidentity.GroupMembershipRoleArgs{
    					Name: pulumi.String("MEMBER"),
    				},
    				&cloudidentity.GroupMembershipRoleArgs{
    					Name: pulumi.String("MANAGER"),
    				},
    			},
    		})
    		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.Group;
    import com.pulumi.gcp.cloudidentity.GroupArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupGroupKeyArgs;
    import com.pulumi.gcp.cloudidentity.GroupMembership;
    import com.pulumi.gcp.cloudidentity.GroupMembershipArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipPreferredMemberKeyArgs;
    import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipRoleArgs;
    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) {
            var group = new Group("group", GroupArgs.builder()        
                .displayName("my-identity-group")
                .parent("customers/A01b123xz")
                .groupKey(GroupGroupKeyArgs.builder()
                    .id("my-identity-group@example.com")
                    .build())
                .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
                .build());
    
            var cloudIdentityGroupMembershipBasic = new GroupMembership("cloudIdentityGroupMembershipBasic", GroupMembershipArgs.builder()        
                .group(group.id())
                .preferredMemberKey(GroupMembershipPreferredMemberKeyArgs.builder()
                    .id("cloud_identity_user@example.com")
                    .build())
                .roles(            
                    GroupMembershipRoleArgs.builder()
                        .name("MEMBER")
                        .build(),
                    GroupMembershipRoleArgs.builder()
                        .name("MANAGER")
                        .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    group = gcp.cloudidentity.Group("group",
        display_name="my-identity-group",
        parent="customers/A01b123xz",
        group_key=gcp.cloudidentity.GroupGroupKeyArgs(
            id="my-identity-group@example.com",
        ),
        labels={
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        })
    cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloudIdentityGroupMembershipBasic",
        group=group.id,
        preferred_member_key=gcp.cloudidentity.GroupMembershipPreferredMemberKeyArgs(
            id="cloud_identity_user@example.com",
        ),
        roles=[
            gcp.cloudidentity.GroupMembershipRoleArgs(
                name="MEMBER",
            ),
            gcp.cloudidentity.GroupMembershipRoleArgs(
                name="MANAGER",
            ),
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const group = new gcp.cloudidentity.Group("group", {
        displayName: "my-identity-group",
        parent: "customers/A01b123xz",
        groupKey: {
            id: "my-identity-group@example.com",
        },
        labels: {
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        },
    });
    const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloudIdentityGroupMembershipBasic", {
        group: group.id,
        preferredMemberKey: {
            id: "cloud_identity_user@example.com",
        },
        roles: [
            {
                name: "MEMBER",
            },
            {
                name: "MANAGER",
            },
        ],
    });
    
    resources:
      group:
        type: gcp:cloudidentity:Group
        properties:
          displayName: my-identity-group
          parent: customers/A01b123xz
          groupKey:
            id: my-identity-group@example.com
          labels:
            cloudidentity.googleapis.com/groups.discussion_forum:
      cloudIdentityGroupMembershipBasic:
        type: gcp:cloudidentity:GroupMembership
        properties:
          group: ${group.id}
          preferredMemberKey:
            id: cloud_identity_user@example.com
          roles:
            - name: MEMBER
            - name: MANAGER
    

    Create GroupMembership Resource

    new GroupMembership(name: string, args: GroupMembershipArgs, opts?: CustomResourceOptions);
    @overload
    def GroupMembership(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        group: Optional[str] = None,
                        member_key: Optional[GroupMembershipMemberKeyArgs] = None,
                        preferred_member_key: Optional[GroupMembershipPreferredMemberKeyArgs] = None,
                        roles: Optional[Sequence[GroupMembershipRoleArgs]] = None)
    @overload
    def GroupMembership(resource_name: str,
                        args: GroupMembershipArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewGroupMembership(ctx *Context, name string, args GroupMembershipArgs, opts ...ResourceOption) (*GroupMembership, error)
    public GroupMembership(string name, GroupMembershipArgs args, CustomResourceOptions? opts = null)
    public GroupMembership(String name, GroupMembershipArgs args)
    public GroupMembership(String name, GroupMembershipArgs args, CustomResourceOptions options)
    
    type: gcp:cloudidentity:GroupMembership
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args GroupMembershipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args GroupMembershipArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args GroupMembershipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GroupMembershipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GroupMembershipArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    GroupMembership Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GroupMembership resource accepts the following input properties:

    Group string

    The name of the Group to create this membership in.

    Roles List<GroupMembershipRole>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    MemberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    PreferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    Group string

    The name of the Group to create this membership in.

    Roles []GroupMembershipRoleArgs

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    MemberKey GroupMembershipMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    PreferredMemberKey GroupMembershipPreferredMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    group String

    The name of the Group to create this membership in.

    roles List<GroupMembershipRole>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    memberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    preferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    group string

    The name of the Group to create this membership in.

    roles GroupMembershipRole[]

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    memberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    preferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    group str

    The name of the Group to create this membership in.

    roles Sequence[GroupMembershipRoleArgs]

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    member_key GroupMembershipMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    preferred_member_key GroupMembershipPreferredMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    group String

    The name of the Group to create this membership in.

    roles List<Property Map>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    memberKey Property Map

    EntityKey of the member. Structure is documented below.

    preferredMemberKey Property Map

    EntityKey of the member. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GroupMembership resource produces the following output properties:

    CreateTime string

    The time when the Membership was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    Type string

    The type of the membership.

    UpdateTime string

    The time when the Membership was last updated.

    CreateTime string

    The time when the Membership was created.

    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    Type string

    The type of the membership.

    UpdateTime string

    The time when the Membership was last updated.

    createTime String

    The time when the Membership was created.

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    type String

    The type of the membership.

    updateTime String

    The time when the Membership was last updated.

    createTime string

    The time when the Membership was created.

    id string

    The provider-assigned unique ID for this managed resource.

    name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    type string

    The type of the membership.

    updateTime string

    The time when the Membership was last updated.

    create_time str

    The time when the Membership was created.

    id str

    The provider-assigned unique ID for this managed resource.

    name str

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    type str

    The type of the membership.

    update_time str

    The time when the Membership was last updated.

    createTime String

    The time when the Membership was created.

    id String

    The provider-assigned unique ID for this managed resource.

    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    type String

    The type of the membership.

    updateTime String

    The time when the Membership was last updated.

    Look up Existing GroupMembership Resource

    Get an existing GroupMembership resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: GroupMembershipState, opts?: CustomResourceOptions): GroupMembership
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            group: Optional[str] = None,
            member_key: Optional[GroupMembershipMemberKeyArgs] = None,
            name: Optional[str] = None,
            preferred_member_key: Optional[GroupMembershipPreferredMemberKeyArgs] = None,
            roles: Optional[Sequence[GroupMembershipRoleArgs]] = None,
            type: Optional[str] = None,
            update_time: Optional[str] = None) -> GroupMembership
    func GetGroupMembership(ctx *Context, name string, id IDInput, state *GroupMembershipState, opts ...ResourceOption) (*GroupMembership, error)
    public static GroupMembership Get(string name, Input<string> id, GroupMembershipState? state, CustomResourceOptions? opts = null)
    public static GroupMembership get(String name, Output<String> id, GroupMembershipState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateTime string

    The time when the Membership was created.

    Group string

    The name of the Group to create this membership in.

    MemberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    PreferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    Roles List<GroupMembershipRole>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    Type string

    The type of the membership.

    UpdateTime string

    The time when the Membership was last updated.

    CreateTime string

    The time when the Membership was created.

    Group string

    The name of the Group to create this membership in.

    MemberKey GroupMembershipMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    PreferredMemberKey GroupMembershipPreferredMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    Roles []GroupMembershipRoleArgs

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    Type string

    The type of the membership.

    UpdateTime string

    The time when the Membership was last updated.

    createTime String

    The time when the Membership was created.

    group String

    The name of the Group to create this membership in.

    memberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    preferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    roles List<GroupMembershipRole>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    type String

    The type of the membership.

    updateTime String

    The time when the Membership was last updated.

    createTime string

    The time when the Membership was created.

    group string

    The name of the Group to create this membership in.

    memberKey GroupMembershipMemberKey

    EntityKey of the member. Structure is documented below.

    name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    preferredMemberKey GroupMembershipPreferredMemberKey

    EntityKey of the member. Structure is documented below.

    roles GroupMembershipRole[]

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    type string

    The type of the membership.

    updateTime string

    The time when the Membership was last updated.

    create_time str

    The time when the Membership was created.

    group str

    The name of the Group to create this membership in.

    member_key GroupMembershipMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    name str

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    preferred_member_key GroupMembershipPreferredMemberKeyArgs

    EntityKey of the member. Structure is documented below.

    roles Sequence[GroupMembershipRoleArgs]

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    type str

    The type of the membership.

    update_time str

    The time when the Membership was last updated.

    createTime String

    The time when the Membership was created.

    group String

    The name of the Group to create this membership in.

    memberKey Property Map

    EntityKey of the member. Structure is documented below.

    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    preferredMemberKey Property Map

    EntityKey of the member. Structure is documented below.

    roles List<Property Map>

    The MembershipRoles that apply to the Membership. Must not contain duplicate MembershipRoles with the same name. Structure is documented below.

    type String

    The type of the membership.

    updateTime String

    The time when the Membership was last updated.

    Supporting Types

    GroupMembershipMemberKey, GroupMembershipMemberKeyArgs

    Id string

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

    Namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    Namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace String

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace str

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace String

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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}.

    GroupMembershipPreferredMemberKey, GroupMembershipPreferredMemberKeyArgs

    Id string

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

    Namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    Namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace String

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace string

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace str

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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 must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace.

    namespace String

    The namespace in which the entity exists. If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. If specified, 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}.

    GroupMembershipRole, GroupMembershipRoleArgs

    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    Name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    name string

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    name str

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    name String

    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.


    Import

    GroupMembership can be imported using any of these accepted formats* {{name}} In Terraform v1.5.0 and later, use an import block to import GroupMembership using one of the formats above. For exampletf import {

    id = “{{name}}”

    to = google_cloud_identity_group_membership.default }

     $ pulumi import gcp:cloudidentity/groupMembership:GroupMembership When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), GroupMembership can be imported using one of the formats above. For example
    
     $ pulumi import gcp:cloudidentity/groupMembership:GroupMembership default {{name}}
    

    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.

    gcp logo
    Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi