Method: groups.memberships.modifyMembershipRoles

Modifies the MembershipRoles of a Membership.

HTTP request

POST https://cloudidentity.googleapis.com/v1/{name=groups/*/memberships/*}:modifyMembershipRoles

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Membership whose roles are to be modified.

Must be of the form groups/{group}/memberships/{membership}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "addRoles": [
    {
      object (MembershipRole)
    }
  ],
  "removeRoles": [
    string
  ],
  "updateRolesParams": [
    {
      object (UpdateMembershipRolesParams)
    }
  ]
}
Fields
addRoles[]

object (MembershipRole)

The MembershipRoles to be added.

Adding or removing roles in the same request as updating roles is not supported.

Must not be set if updateRolesParams is set.

removeRoles[]

string

The names of the MembershipRoles to be removed.

Adding or removing roles in the same request as updating roles is not supported.

It is not possible to remove the MEMBER MembershipRole. If you wish to delete a Membership, call MembershipsService.DeleteMembership instead.

Must not contain MEMBER. Must not be set if updateRolesParams is set.

updateRolesParams[]

object (UpdateMembershipRolesParams)

The MembershipRoles to be updated.

Updating roles in the same request as adding or removing roles is not supported.

Must not be set if either addRoles or removeRoles is set.

Response body

The response message for MembershipsService.ModifyMembershipRoles.

If successful, the response body contains data with the following structure:

JSON representation
{
  "membership": {
    object (Membership)
  }
}
Fields
membership

object (Membership)

The Membership resource after modifying its MembershipRoles.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-identity.groups
  • https://www.googleapis.com/auth/cloud-identity
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

UpdateMembershipRolesParams

The details of an update to a MembershipRole.

JSON representation
{
  "fieldMask": string,
  "membershipRole": {
    object (MembershipRole)
  }
}
Fields
fieldMask

string (FieldMask format)

The fully-qualified names of fields to update.

May only contain the field expiryDetail.expire_time.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

membershipRole

object (MembershipRole)

The MembershipRoles to be updated.

Only MEMBER MembershipRole can currently be updated.