Returns the aliases Resource.
Delete Group
Retrieve Group
Create Group
list(customer=None, domain=None, pageToken=None, maxResults=None, userKey=None)
Retrieve all groups in a domain (paginated)
list_next(previous_request, previous_response)
Retrieves the next page of results.
Update Group. This method supports patch semantics.
Update Group
delete(groupKey)
Delete Group Args: groupKey: string, Email or immutable Id of the group (required)
get(groupKey)
Retrieve Group Args: groupKey: string, Email or immutable Id of the group (required) Returns: An object of the form: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], }
insert(body)
Create Group Args: body: object, The request body. (required) The object takes the form of: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], } Returns: An object of the form: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], }
list(customer=None, domain=None, pageToken=None, maxResults=None, userKey=None)
Retrieve all groups in a domain (paginated) Args: customer: string, Immutable ID of the G Suite account. In case of multi-domain, to fetch all groups for a customer, fill this field instead of domain. domain: string, Name of the domain. Fill this field to get groups from only this domain. To return all groups in a multi-domain fill customer field instead. pageToken: string, Token to specify next page in the list maxResults: integer, Maximum number of results to return. Default is 200 userKey: string, Email or immutable Id of the user if only those groups are to be listed, the given user is a member of. If Id, it should match with id of user object Returns: An object of the form: { # JSON response template for List Groups operation in Directory API. "nextPageToken": "A String", # Token used to access next page of this result. "kind": "admin#directory#groups", # Kind of resource this is. "etag": "A String", # ETag of the resource. "groups": [ # List of group objects. { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], }, ], }
list_next(previous_request, previous_response)
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(groupKey, body)
Update Group. This method supports patch semantics. Args: groupKey: string, Email or immutable Id of the group. If Id, it should match with id of group object (required) body: object, The request body. (required) The object takes the form of: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], } Returns: An object of the form: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], }
update(groupKey, body)
Update Group Args: groupKey: string, Email or immutable Id of the group. If Id, it should match with id of group object (required) body: object, The request body. (required) The object takes the form of: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], } Returns: An object of the form: { # JSON template for Group resource in Directory API. "nonEditableAliases": [ # List of non editable aliases (Read-only) "A String", ], "kind": "admin#directory#group", # Kind of resource this is. "description": "A String", # Description of the group "name": "A String", # Group name "adminCreated": True or False, # Is the group created by admin (Read-only) * "directMembersCount": "A String", # Group direct members count "id": "A String", # Unique identifier of Group (Read-only) "etag": "A String", # ETag of the resource. "email": "A String", # Email of Group "aliases": [ # List of aliases (Read-only) "A String", ], }