printerShare 资源类型

命名空间:microsoft.graph

重要

Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

表示可供用户和打印应用程序发现的打印机。

方法

方法 返回类型 Description
List printerShare 集合 获取租户中的打印机共享列表。
Get printerShare 读取 printerShare 对象的属性和关系。
更新 printerShare 更新 printerShare 对象。
删除 取消共享打印机。
列出作业 printJob 集合 获取由 printerShare 排队等待处理的打印作业的列表。
创建作业 printJob 为 printerShare 创建新的打印作业。 若要开始打印作业,请使用 start
列出 allowedUsers user 集合 检索有权将打印作业提交到关联的打印机共享的用户的列表。
添加 allowedUser 向指定的用户授予将打印作业提交到关联的打印机共享的权限。
删除 allowedUser 从指定用户撤消打印机共享访问权限。
列出 allowedGroups group 集合 检索已被授予将打印作业提交到关联的打印机共享的访问权限的组列表。
添加 allowedGroup 向指定的组授予将打印作业提交到关联的打印机共享的权限。
删除 allowedGroup 从指定组撤消打印机共享访问权限。
列出 recentPrinterShares printerShare 集合 获取已登录用户最近使用的 printerShares 的列表。

属性

属性 类型 说明
allowAllUsers 布尔值 如果为 true,则向所有用户和组授予对此打印机共享的访问权限。 这将取代 allowedUsersallowedGroups 导航属性定义的允许列表。
capabilities printerCapabilities 与此打印机共享关联的打印机的功能。
createdDateTime DateTimeOffset 创建打印机共享时的 DateTimeOffset。 此为只读属性。
defaults printerDefaults 与此打印机共享关联的打印机的默认打印设置。
displayName String 打印客户端应显示的打印机共享的名称。
id String printerShare 的标识符。 此为只读属性。
isAcceptingJobs 布尔值 与此打印机共享关联的打印机当前是否接受新的打印作业。
位置 printerLocation 与此打印机关联的打印机的物理和/或组织位置共享。
manufacturer 字符串 与此打印机共享关联的打印机报告的制造商。 此为只读属性。
model String 与此打印机共享关联的打印机报告的型号名称。 此为只读属性。
status printerStatus 与此打印机共享关联的打印机的处理状态,包括任何错误。 此为只读属性。
观点 printerShareViewpoint 已登录用户查看的打印机共享的其他数据。

关系

关系 类型 说明
allowedGroups 用户有权使用打印机进行打印的组。
allowedUsers user 集合 有权使用打印机进行打印的用户。
jobs printJob 集合 由与此打印机共享关联的打印机排队打印的作业列表。
打印机 打印机 此打印机共享的相关打印机。

JSON 表示形式

下面是资源的 JSON 表示形式。

{
  "allowAllUsers": "Boolean",
  "capabilities": {"@odata.type": "microsoft.graph.printerCapabilities"},
  "createdDateTime": "String (timestamp)",
  "defaults": {"@odata.type": "microsoft.graph.printerDefaults"},
  "displayName": "String",
  "id": "String (identifier)",
  "isAcceptingJobs": "Boolean",
  "location": {"@odata.type": "microsoft.graph.printerLocation"},
  "manufacturer": "String",
  "model": "String",
  "status": {"@odata.type": "microsoft.graph.printerStatus"},
  "viewPoint": {"@odata.type": "microsoft.graph.printerShareViewpoint"}
}