Share via


SPAuditEventType Enumeration

Specifies types of events, for a particular site collection, site, list, folder, or list item, that are auditable by using the SPAudit class.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

Public Enumeration SPAuditEventType

Dim instance As SPAuditEventType
public enum SPAuditEventType

Members

Member name Description
CheckOut Check-out of the object.
CheckIn Check-in of the object.
View Viewing of the object by a user.
Delete Deletion of the object.
Update Changing the properties of an object or creating an object.
ProfileChange Change in a profile that is associated with the object.
ChildDelete Deletion of one of the child objects of the object.
SchemaChange Change in the schema of the object.
Undelete Restoration of an object from the Recycle Bin.
Workflow Access of the object as part of a workflow.
Copy Copying of the object.
Move Move of the object.
AuditMaskChange A change in the types of events that are audited for the object.
Search Search on the object.
ChildMove Move of one of the child objects of the object.
SecGroupCreate Creation of a user group for a SharePoint site collection.
SecGroupDelete Deletion of a group that is associated with a SharePoint site collection.
SecGroupMemberAdd Addition of a new member to a group that is associated with a SharePoint site collection.
SecGroupMemberDel Deletion of a member from a group that is associated with a SharePoint site collection.
SecRoleDefCreate Creation of a new role (that is, permission level) definition associated with the object.
SecRoleDefDelete Removal of a role (that is, permission level) definition associated with the object.
SecRoleDefModify Changing a role (that is, permission level) definition associated with an object.
SecRoleDefBreakInherit Turning off inheritance of role (that is, permission level) definitions from the parent of the object.
SecRoleBindUpdate Changing the permissions of a user or group for the object.
SecRoleBindInherit Turning on inheritance of security settings from the parent of the object.
SecRoleBindBreakInherit Turning off inheritance of security settings from the parent of the object.
EventsDeleted Deletion of audited events that are connected with the object from the SharePoint database.
Custom Custom action or event.

Remarks

Contrast this enumeration with SPAuditMaskType, which enumerates events and actions that are audited for a particular object.

Most values are relevant only to certain types of objects. For example, a site collection cannot be checked in or checked out.

Examples

The following example (from Item-Level Auditing with SharePoint Server 2007) shows this enumeration in use.

SPList list = site.Lists[new Guid(ListId)];
SPListItem item = list.Items.GetItemById(Convert.ToInt32(ItemId));
item.Audit.WriteAuditEvent(SPAuditEventType.Custom, 
                           "CustomViewAuditEvent",  // SoureName
                           "<myXml>MyData</myXml>"  // Any arbitrary XML data
                           );

See Also

Reference

Microsoft.SharePoint Namespace

Other Resources

Item-Level Auditing with SharePoint Server 2007