Method: licenseAssignments.patch
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用同一商品中的其他 SKU 重新分配用户的商品 SKU。此方法支持修补语义。
HTTP 请求
PATCH https://licensing.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}
网址采用 gRPC 转码语法。
路径参数
参数 |
productId |
string
商品的唯一标识符。如需详细了解此版本 API 中的商品,请参阅商品和 SKU。
|
skuId |
string
商品 SKU 的唯一标识符。如需详细了解此版本 API 中的可用 SKU,请参阅产品和 SKU。
|
userId |
string
用户当前的主电子邮件地址。如果用户的电子邮件地址发生变化,请在 API 请求中使用新电子邮件地址。 由于 userId 可能会发生变化,因此请勿将 userId 值用作永久性数据的键。如果当前用户的电子邮件地址发生变化,此密钥可能会失效。 如果 userId 被暂停,许可状态也会发生变化。
|
请求正文
请求正文包含一个 LicenseAssignment
实例。
响应正文
如果成功,则响应正文包含一个 LicenseAssignment
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/apps.licensing
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: licenseAssignments.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReassign a user's product SKU with a different SKU in the same product. This method supports patch semantics.\n\n### HTTP request\n\n`PATCH https://licensing.googleapis.com/apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `productId` | `string` A product's unique identifier. For more information about products in this version of the API, see [Products and SKUs](https://developers.google.com/workspace/admin/licensing/v1/how-tos/products). |\n| `skuId` | `string` A product SKU's unique identifier. For more information about available SKUs in this version of the API, see [Products and SKUs](https://developers.google.com/workspace/admin/licensing/v1/how-tos/products). |\n| `userId` | `string` The user's current primary email address. If the user's email address changes, use the new email address in your API requests. Since a `userId` is subject to change, do not use a `userId` value as a key for persistent data. This key could break if the current user's email address changes. If the `userId` is suspended, the license status changes. |\n\n### Request body\n\nThe request body contains an instance of [LicenseAssignment](/workspace/admin/licensing/reference/rest/v1/licenseAssignments#LicenseAssignment).\n\n### Response body\n\nIf successful, the response body contains an instance of [LicenseAssignment](/workspace/admin/licensing/reference/rest/v1/licenseAssignments#LicenseAssignment).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/apps.licensing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]