1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudidentity
  5. GroupMembership
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi

gcp.cloudidentity.GroupMembership

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.10.0 published on Wednesday, Nov 20, 2024 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

    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("cloud_identity_group_membership_basic", {
        group: group.id,
        preferredMemberKey: {
            id: child_group.groupKey.apply(groupKey => groupKey.id),
        },
        roles: [{
            name: "MEMBER",
        }],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    group = gcp.cloudidentity.Group("group",
        display_name="my-identity-group",
        parent="customers/A01b123xz",
        group_key={
            "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={
            "id": "my-identity-group-child@example.com",
        },
        labels={
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        })
    cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic",
        group=group.id,
        preferred_member_key={
            "id": child_group.group_key.id,
        },
        roles=[{
            "name": "MEMBER",
        }])
    
    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 {
    		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, "cloud_identity_group_membership_basic", &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
    	})
    }
    
    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("cloud_identity_group_membership_basic", 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 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());
    
        }
    }
    
    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
        name: cloud_identity_group_membership_basic
        properties:
          group: ${group.id}
          preferredMemberKey:
            id: ${["child-group"].groupKey.id}
          roles:
            - name: MEMBER
    

    Cloud Identity Group Membership User

    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("cloud_identity_group_membership_basic", {
        group: group.id,
        preferredMemberKey: {
            id: "cloud_identity_user@example.com",
        },
        roles: [
            {
                name: "MEMBER",
            },
            {
                name: "MANAGER",
            },
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    group = gcp.cloudidentity.Group("group",
        display_name="my-identity-group",
        parent="customers/A01b123xz",
        group_key={
            "id": "my-identity-group@example.com",
        },
        labels={
            "cloudidentity.googleapis.com/groups.discussion_forum": "",
        })
    cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic",
        group=group.id,
        preferred_member_key={
            "id": "cloud_identity_user@example.com",
        },
        roles=[
            {
                "name": "MEMBER",
            },
            {
                "name": "MANAGER",
            },
        ])
    
    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 {
    		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, "cloud_identity_group_membership_basic", &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
    	})
    }
    
    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("cloud_identity_group_membership_basic", 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 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());
    
        }
    }
    
    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
        name: cloud_identity_group_membership_basic
        properties:
          group: ${group.id}
          preferredMemberKey:
            id: cloud_identity_user@example.com
          roles:
            - name: MEMBER
            - name: MANAGER
    

    Create GroupMembership Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GroupMembership(name: string, args: GroupMembershipArgs, opts?: CustomResourceOptions);
    @overload
    def GroupMembership(resource_name: str,
                        args: GroupMembershipArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def GroupMembership(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        group: Optional[str] = None,
                        roles: Optional[Sequence[GroupMembershipRoleArgs]] = None,
                        member_key: Optional[GroupMembershipMemberKeyArgs] = None,
                        preferred_member_key: Optional[GroupMembershipPreferredMemberKeyArgs] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var groupMembershipResource = new Gcp.CloudIdentity.GroupMembership("groupMembershipResource", new()
    {
        Group = "string",
        Roles = new[]
        {
            new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
            {
                Name = "string",
                ExpiryDetail = new Gcp.CloudIdentity.Inputs.GroupMembershipRoleExpiryDetailArgs
                {
                    ExpireTime = "string",
                },
            },
        },
        MemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipMemberKeyArgs
        {
            Id = "string",
            Namespace = "string",
        },
        PreferredMemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipPreferredMemberKeyArgs
        {
            Id = "string",
            Namespace = "string",
        },
    });
    
    example, err := cloudidentity.NewGroupMembership(ctx, "groupMembershipResource", &cloudidentity.GroupMembershipArgs{
    	Group: pulumi.String("string"),
    	Roles: cloudidentity.GroupMembershipRoleArray{
    		&cloudidentity.GroupMembershipRoleArgs{
    			Name: pulumi.String("string"),
    			ExpiryDetail: &cloudidentity.GroupMembershipRoleExpiryDetailArgs{
    				ExpireTime: pulumi.String("string"),
    			},
    		},
    	},
    	MemberKey: &cloudidentity.GroupMembershipMemberKeyArgs{
    		Id:        pulumi.String("string"),
    		Namespace: pulumi.String("string"),
    	},
    	PreferredMemberKey: &cloudidentity.GroupMembershipPreferredMemberKeyArgs{
    		Id:        pulumi.String("string"),
    		Namespace: pulumi.String("string"),
    	},
    })
    
    var groupMembershipResource = new GroupMembership("groupMembershipResource", GroupMembershipArgs.builder()
        .group("string")
        .roles(GroupMembershipRoleArgs.builder()
            .name("string")
            .expiryDetail(GroupMembershipRoleExpiryDetailArgs.builder()
                .expireTime("string")
                .build())
            .build())
        .memberKey(GroupMembershipMemberKeyArgs.builder()
            .id("string")
            .namespace("string")
            .build())
        .preferredMemberKey(GroupMembershipPreferredMemberKeyArgs.builder()
            .id("string")
            .namespace("string")
            .build())
        .build());
    
    group_membership_resource = gcp.cloudidentity.GroupMembership("groupMembershipResource",
        group="string",
        roles=[{
            "name": "string",
            "expiry_detail": {
                "expire_time": "string",
            },
        }],
        member_key={
            "id": "string",
            "namespace": "string",
        },
        preferred_member_key={
            "id": "string",
            "namespace": "string",
        })
    
    const groupMembershipResource = new gcp.cloudidentity.GroupMembership("groupMembershipResource", {
        group: "string",
        roles: [{
            name: "string",
            expiryDetail: {
                expireTime: "string",
            },
        }],
        memberKey: {
            id: "string",
            namespace: "string",
        },
        preferredMemberKey: {
            id: "string",
            namespace: "string",
        },
    });
    
    type: gcp:cloudidentity:GroupMembership
    properties:
        group: string
        memberKey:
            id: string
            namespace: string
        preferredMemberKey:
            id: string
            namespace: string
        roles:
            - expiryDetail:
                expireTime: string
              name: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    PreferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    PreferredMemberKey GroupMembershipPreferredMemberKeyArgs
    EntityKey of the member.
    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.
    preferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    preferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    preferred_member_key GroupMembershipPreferredMemberKeyArgs
    EntityKey of the member.
    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.
    preferredMemberKey Property Map
    EntityKey of the member.

    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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 resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    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.
    Name string
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    PreferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    Name string
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    PreferredMemberKey GroupMembershipPreferredMemberKeyArgs
    EntityKey of the member.
    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.
    name String
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    preferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    name string
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    preferredMemberKey GroupMembershipPreferredMemberKey
    EntityKey of the member.
    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.
    name str
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    preferred_member_key GroupMembershipPreferredMemberKeyArgs
    EntityKey of the member.
    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.
    name String
    The resource name of the Membership, of the form groups/{group_id}/memberships/{membership_id}.
    preferredMemberKey Property Map
    EntityKey of the member.
    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.
    ExpiryDetail GroupMembershipRoleExpiryDetail
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.
    Name string
    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.
    ExpiryDetail GroupMembershipRoleExpiryDetail
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.
    name String
    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.
    expiryDetail GroupMembershipRoleExpiryDetail
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.
    name string
    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.
    expiryDetail GroupMembershipRoleExpiryDetail
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.
    name str
    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.
    expiry_detail GroupMembershipRoleExpiryDetail
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.
    name String
    The name of the MembershipRole. Must be one of OWNER, MANAGER, MEMBER. Possible values are: OWNER, MANAGER, MEMBER.
    expiryDetail Property Map
    The MembershipRole expiry details, only supported for MEMBER role. Other roles cannot be accompanied with MEMBER role having expiry. Structure is documented below.

    GroupMembershipRoleExpiryDetail, GroupMembershipRoleExpiryDetailArgs

    ExpireTime string
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    ExpireTime string
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    expireTime String
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    expireTime string
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    expire_time str
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    expireTime String
    The time at which the MembershipRole will expire. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


    Import

    GroupMembership can be imported using any of these accepted formats:

    • {{name}}

    When using the pulumi import command, GroupMembership can be imported using one of the formats above. For example:

    $ pulumi import gcp:cloudidentity/groupMembership:GroupMembership default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v8.10.0 published on Wednesday, Nov 20, 2024 by Pulumi