messageRule resource type
Namespace: microsoft.graph
Represents a rule that applies to messages in the Inbox of a user.
In Outlook, you can set up rules for incoming messages in the Inbox to carry out specific actions upon certain conditions.
Programmatically, you can access rules through the messageRules navigation property of the Inbox folder. Each rule is represented by this messageRule resource, available rule actions are represented by the messageRuleActions complex type, and available rule conditions and exceptions are represented by the messageRulePredicates complex type.
Methods
Method | Return Type | Description |
---|---|---|
List rules | messageRule collection | Get all the messageRule objects defined for the user's Inbox. |
Get rule | messageRule | Read the properties and relationships of a messageRule object. |
Create | messageRule | Create a messageRule object by specifying a set of conditions and actions. |
Update | messageRule | Change writable properties on a messageRule object and save the changes. |
Delete | None | Delete the specified messageRule object. |
Properties
Property | Type | Description |
---|---|---|
actions | messageRuleActions | Actions to be taken on a message when the corresponding conditions are fulfilled. |
conditions | messageRulePredicates | Conditions that when fulfilled trigger the corresponding actions for that rule. |
displayName | String | The display name of the rule. |
exceptions | messageRulePredicates | Exception conditions for the rule. |
hasError | Boolean | Indicates whether the rule is in an error condition. Read-only. |
id | String | The unique identifier of the rule. Read-only. |
isEnabled | Boolean | Indicates whether the rule is enabled to be applied to messages. |
isReadOnly | Boolean | Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API. |
sequence | Int32 | Indicates the order in which the rule is executed, among other rules. |
JSON representation
The following JSON representation shows the resource type.
{
"actions": {"@odata.type": "microsoft.graph.messageRuleActions"},
"conditions": {"@odata.type": "microsoft.graph.messageRulePredicates"},
"displayName": "String",
"exceptions": {"@odata.type": "microsoft.graph.messageRulePredicates"},
"hasError": "Boolean",
"id": "String",
"isEnabled": "Boolean",
"isReadOnly": "Boolean",
"sequence": "Int32"
}
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기