Skip to main content

groups

Creates, updates, deletes, gets or lists a groups resource.

Overview

Namegroups
TypeResource
Idgoogle.cloudidentity.groups

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the Group. Shall be of the form groups/{group}.
additionalGroupKeysarrayOutput only. Additional group keys associated with the Group.
createTimestring (google-datetime)Output only. The time when the Group was created.
descriptionstringAn extended description to help users determine the purpose of a Group. Must not be longer than 4,096 characters.
displayNamestringThe display name of the Group.
dynamicGroupMetadataobjectOptional. Dynamic group metadata like queries and status. (id: DynamicGroupMetadata)
groupKeyobjectRequired. The EntityKey of the Group. (id: EntityKey)
labelsobjectRequired. One or more label entries that apply to the Group. Labels contain a key with an empty value. Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. Google Groups can be locked. To lock a group, add a label with a key of cloudidentity.googleapis.com/groups.locked and an empty value. Doing so locks the group. To unlock the group, remove this label.
parentstringRequired. Immutable. The resource name of the entity under which this Group resides in the Cloud Identity resource hierarchy. Must be of the form identitysources/{identity_source} for external identity-mapped groups or customers/{customer_id} for Google Groups. The customer_id must begin with "C" (for example, 'C046psxkn'). [Find your customer ID.] (https://support.google.com/cloudidentity/answer/10070793)
updateTimestring (google-datetime)Output only. The time when the Group was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectgroupsIdRetrieves a Group.
listselectparent, view, pageSize, pageTokenLists the Group resources under a customer or namespace.
createinsertinitialGroupConfigCreates a Group.
patchupdategroupsIdupdateMaskUpdates a Group.
deletedeletegroupsIdDeletes a Group.
lookupexecgroupKey.id, groupKey.namespaceLooks up the resource name of a Group by its EntityKey.
searchexecquery, view, pageSize, pageTokenSearches for Group resources matching a specified query.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
groupsIdstring
groupKey.idstring
groupKey.namespacestring
initialGroupConfigstring
pageSizeinteger (int32)
pageTokenstring
parentstring
querystring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

Retrieves a Group.

SELECT
name,
additionalGroupKeys,
createTime,
description,
displayName,
dynamicGroupMetadata,
groupKey,
labels,
parent,
updateTime
FROM google.cloudidentity.groups
WHERE groupsId = '{{ groupsId }}' -- required;

INSERT examples

Creates a Group.

INSERT INTO google.cloudidentity.groups (
data__groupKey,
data__parent,
data__displayName,
data__description,
data__labels,
data__dynamicGroupMetadata,
initialGroupConfig
)
SELECT
'{{ groupKey }}',
'{{ parent }}',
'{{ displayName }}',
'{{ description }}',
'{{ labels }}',
'{{ dynamicGroupMetadata }}',
'{{ initialGroupConfig }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a Group.

UPDATE google.cloudidentity.groups
SET
data__groupKey = '{{ groupKey }}',
data__parent = '{{ parent }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__dynamicGroupMetadata = '{{ dynamicGroupMetadata }}'
WHERE
groupsId = '{{ groupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a Group.

DELETE FROM google.cloudidentity.groups
WHERE groupsId = '{{ groupsId }}' --required;

Lifecycle Methods

Looks up the resource name of a Group by its EntityKey.

EXEC google.cloudidentity.groups.lookup 
@groupKey.id='{{ groupKey.id }}',
@groupKey.namespace='{{ groupKey.namespace }}';