printerShare 资源类型
命名空间:microsoft.graph
重要
Microsoft Graph版本下的 /beta API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
表示用户和打印应用程序可发现的打印机。
方法
| 方法 | 返回类型 | Description |
|---|---|---|
| List | printerShare 集合 | 获取租户中的打印机共享列表。 |
| Get | printerShare | 读取 printerShare 对象的属性和关系。 |
| 更新 | printerShare | 更新 printerShare 对象。 |
| 删除 | 无 | 取消共享打印机。 |
| 列出作业 | printJob 集合 | 获取打印机Share 排队处理的打印作业列表。 |
| 创建作业 | printJob | 为 printerShare 创建新的打印作业。 若要开始打印作业,请使用 “开始”。 |
| 列出 allowedUsers | user 集合 | 检索已被授予访问权限的用户列表,以便将打印作业提交到关联的打印机共享。 |
| 添加 allowedUser | 无 | 授予指定的用户访问权限,以便将打印作业提交到关联的打印机共享。 |
| 删除 allowedUser | 无 | 从指定用户撤消打印机共享访问权限。 |
| 列出 allowedGroups | group 集合 | 检索已授予访问权限的组列表,以便将打印作业提交到关联的打印机共享。 |
| 添加 allowedGroup | 无 | 授予指定的组访问权限,以便将打印作业提交到关联的打印机共享。 |
| 删除 allowedGroup | 无 | 从指定组撤消打印机共享访问权限。 |
属性
| 属性 | 类型 | 说明 |
|---|---|---|
| id | String | printerShare 的标识符。 只读。 |
| displayName | 字符串 | 打印客户端应显示的打印机共享的名称。 |
| createdDateTime | DateTimeOffset | 创建打印机共享时的 DateTimeOffset。 只读。 |
| manufacturer | String | 与此打印机共享关联的打印机报告的制造商。 只读。 |
| model | String | 与此打印机共享关联的打印机报告的模型名称。 只读。 |
| isAcceptingJobs | Boolean | 与此打印机共享关联的打印机当前是否接受新的打印作业。 |
| defaults | printerDefaults | 与此打印机共享关联的打印机的默认打印设置。 |
| capabilities | printerCapabilities | 与此打印机共享关联的打印机的功能。 |
| 位置 | printerLocation | 与此打印机共享关联的打印机的物理和/或组织位置。 |
| 状态 | printerStatus | 与此打印机共享关联的打印机的处理状态(包括任何错误)。 只读。 |
| allowAllUsers | Boolean | 如果为 true,则将向所有用户和组授予对此打印机共享的访问权限。 这会取代 allowedUsers 和 allowedGroups 导航属性定义的允许列表。 |
关系
| 关系 | 类型 | Description |
|---|---|---|
| 打印机 | 打印机 | 此打印机共享的打印机与之相关。 |
| allowedUsers | user 集合 | 有权使用打印机打印的用户。 |
| allowedGroups | 组 | 用户有权使用打印机打印的组。 |
| jobs | printJob 集合 | 与此打印机共享关联的打印机排队打印的作业列表。 |
JSON 表示形式
下面是资源的 JSON 表示形式。
{
"id": "String (identifier)",
"displayName": "String",
"manufacturer": "String",
"model": "String",
"createdDateTime": "String (timestamp)",
"isAcceptingJobs": true,
"allowAllUsers": false,
"location": {"@odata.type": "microsoft.graph.printerLocation"},
"status": {"@odata.type": "microsoft.graph.printerStatus"},
"defaults": {"@odata.type": "microsoft.graph.printerDefaults"},
"capabilities": {"@odata.type": "microsoft.graph.printerCapabilities"}
}
反馈
提交和查看相关反馈