siteProtectionRule resource type
Namespace: microsoft.graph
Represents the properties of a protection rule associated with a sharePointProtectionPolicy.
Inherits from protectionRuleBase.
Methods
Method | Return type | Description |
---|---|---|
List | siteProtectionRule collection | Get a list of siteProtectionRule objects and their properties. |
Create | siteProtectionRule | Create a new siteProtectionRule. |
Get | siteProtectionRule | Read the properties and relationships of a siteProtectionRule. |
Delete | None | Delete a siteProtectionRule. |
Run | protectionRuleBase | Activate a site protection rule. |
Properties
Property | Type | Description |
---|---|---|
id | String | The unique identifier of the protection rule associated with the policy. |
createdBy | identitySet | The identity of the person who created the rule. |
createdDateTime | DateTimeOffset | The date and time that the rule was created. |
error | publicError | Contains error details if any operation on a rule expression fails. |
isAutoApplyEnabled | Boolean | true indicates that the protection rule is dynamic; false that it's static. Static rules run one time while dynamic rules listen to all changes in the system and update the protection unit list. Currently, only static rules are supported. |
lastModifiedBy | identitySet | Identity of the person who last modified the rule. |
lastModifiedDateTime | DateTimeOffset | Timestamp of the last modification to the rule. |
siteExpression | String | Contains a site expression. For examples, see siteExpression example. |
status | protectionRuleStatus | Status of the protection rule. The possible values are: draft , active , completed , completedWithErrors , unknownFutureValue . The draft member is currently unsupported. |
siteExpression examples
The following table shows the possible formats for the site expression.
Property | Operator | Example |
---|---|---|
displayName |
-contains |
((displayName -contains 'Finance') -or (displayName -contains 'Legal')) |
lastModifiedDateTime |
-ge |
(((displayName -contains 'Finance') -or (webUrl -contains 'Legal')) -and (lastModifiedDateTime -ge '2024-02-26T11:36:20Z')) |
webUrl |
-contains |
((displayName -contains 'Finance') -or (webUrl -contains 'Legal')) |
protectionRuleStatus values
Member | Description |
---|---|
draft | The initial status of the protection rule upon creation. The draft member is currently unsupported. |
active | The status of the protection rule upon using the /run API. |
completed | The status of the protection rule after it's successfully applied to the corresponding policy. |
completedWithErrors | The status of the protection rule after it's applied to the corresponding policy and any failures occurred. |
unknownFutureValue | Evolvable enumeration sentinel value. Don't use. |
Relationships
None.
JSON representation
The following JSON representation shows the resource type.
{
"@odata.type": "#microsoft.graph.siteProtectionRule",
"id": "String (identifier)",
"status": "String",
"createdDateTime": "String (timestamp)",
"createdBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"lastModifiedDateTime": "String (timestamp)",
"lastModifiedBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"error": {
"@odata.type": "microsoft.graph.publicError"
},
"isAutoApplyEnabled": "Boolean",
"siteExpression": "String"
}