GetUserRetentionPolicyTags 操作
查找有关 GetUserRetentionPolicyTags EWS 操作的信息。
GetUserRetentionPolicyTags 操作获取通过系统策略与用户关联或由用户应用的所有默认标记、系统文件夹和个人标记的列表。
Exchange Server 2013 中引入了此操作。
使用 GetUserRetentionPolicyTags 操作
此操作返回显示名称、保留 ID、保留期、保留类型、保留操作和说明标记,以及 IsVisible、 OptedInto 和 IsArchive 属性的值。
GetUserRetentionPolicyTags 操作 SOAP 标头
GetUserRetentionPolicyTags 操作可以使用下表中列出的 SOAP 标头。
标头名称 | 元素 | 说明 |
---|---|---|
RequestVersion |
RequestServerVersion |
标识操作请求的架构版本。 这适用于请求。 |
ServerVersion |
ServerVersionInfo |
标识响应请求的服务器版本。 这适用于响应。 |
GetUserRetentionPolicyTags 操作请求示例
下面的 GetUserRetentionPolicyTags 操作请求示例演示如何获取当前用户的标记列表。
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
<m:GetUserRetentionPolicyTags />
</soap:Body>
</soap:Envelope>
请求 SOAP 正文包含以下元素:
成功的 GetUserRetentionPolicyTags 操作响应
以下示例显示了对 GetUserRetentionPolicyTags 操作请求的成功响应。
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15"
MinorVersion="0"
MajorBuildNumber="179"
MinorBuildNumber="0"
Version="Exchange2013"
xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetUserRetentionPolicyTagsResponse ResponseClass="Success"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<ResponseCode>NoError</ResponseCode>
<RetentionPolicyTags>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>1 Year Delete</DisplayName>
<RetentionId>e66252f9-794f-4b36-b55e-d6d95fdf87a3</RetentionId>
<RetentionPeriod>365</RetentionPeriod>
<Type>Personal</Type>
<RetentionAction>DeleteAndAllowRecovery</RetentionAction>
<Description/>
<IsVisible>true</IsVisible>
<OptedInto>false</OptedInto>
<IsArchive>false</IsArchive>
</RetentionPolicyTag>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>Personal 1 year move to archive</DisplayName>
<RetentionId>b2a29464-649c-4174-932b-6aaac9811c89</RetentionId>
<RetentionPeriod>365</RetentionPeriod>
<Type>Personal</Type>
<RetentionAction>MoveToArchive</RetentionAction>
<Description/>
<IsVisible>true</IsVisible>
<OptedInto>false</OptedInto>
<IsArchive>true</IsArchive>
</RetentionPolicyTag>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>Sent Items</DisplayName>
<RetentionId>b0d32f1b-fbd0-4c1d-ba3e-ddd1086ea1d3</RetentionId>
<RetentionPeriod>365</RetentionPeriod>
<Type>SentItems</Type>
<RetentionAction>DeleteAndAllowRecovery</RetentionAction>
<Description/>
<IsVisible>false</IsVisible>
<OptedInto>false</OptedInto>
<IsArchive>false</IsArchive>
</RetentionPolicyTag>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>Default 1 year delete</DisplayName>
<RetentionId>29fc9b9d-98b0-4c01-acf8-3996e2afce98</RetentionId>
<RetentionPeriod>365</RetentionPeriod>
<Type>All</Type>
<RetentionAction>DeleteAndAllowRecovery</RetentionAction>
<Description/>
<IsVisible>false</IsVisible>
<OptedInto>false</OptedInto>
<IsArchive>false</IsArchive>
</RetentionPolicyTag>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>Two Year Retention</DisplayName>
<RetentionId>a1a38957-2557-404e-9f32-53d77c948f62</RetentionId>
<RetentionPeriod>730</RetentionPeriod>
<Type>Personal</Type>
<RetentionAction>DeleteAndAllowRecovery</RetentionAction>
<Description>Use this tag for all items to be retained for two years.</Description>
<IsVisible>true</IsVisible>
<OptedInto>true</OptedInto>
<IsArchive>false</IsArchive>
</RetentionPolicyTag>
<RetentionPolicyTag xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<DisplayName>Default two year move to archive</DisplayName>
<RetentionId>75bc8dbe-a0e8-4e09-9fa3-fd4c21f49318</RetentionId>
<RetentionPeriod>730</RetentionPeriod>
<Type>All</Type>
<RetentionAction>MoveToArchive</RetentionAction>
<Description/>
<IsVisible>false</IsVisible>
<OptedInto>false</OptedInto>
<IsArchive>true</IsArchive>
</RetentionPolicyTag>
</RetentionPolicyTags>
</GetUserRetentionPolicyTagsResponse>
</s:Body>
</s:Envelope>
响应 SOAP 正文包含以下元素:
GetUserRetentionPolicyTags 操作错误响应
有关 EWS 通用的错误代码,请参阅 ResponseCode。