Method: labels.updateLabelCopyMode
更新标签的 CopyMode
。对此政策所做的更改不会进行修订,也无需发布,且会立即生效。
HTTP 请求
POST https://drivelabels.googleapis.com/v2beta/{name=labels/*}:updateLabelCopyMode
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。要更新的标签的资源名称。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"copyMode": enum (CopyMode ),
"useAdminAccess": boolean,
"languageCode": string,
"view": enum (LabelView )
} |
字段 |
copyMode |
enum (CopyMode )
必需。指明在复制云端硬盘内容时应如何复制已应用的标签和字段值。
|
useAdminAccess |
boolean
设置为 true 才能使用用户的管理员凭据。服务器会先验证用户是否是该标签的管理员,然后才会允许其访问。
|
languageCode |
string
用于评估本地化字段标签的 BCP-47 语言代码。如果未指定,系统将使用默认配置语言中的值。
|
view |
enum (LabelView )
指定后,系统只会返回属于指定视图的特定字段。
|
响应正文
如果成功,则响应正文包含一个 Label
实例。
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
有关详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-11。
[null,null,["最后更新时间 (UTC):2024-10-11。"],[[["Updates a Label's `CopyMode` with changes taking effect immediately and without requiring publishing."],["Utilizes an HTTP POST request to `https://drivelabels.googleapis.com/v2beta/{name=labels/*}:updateLabelCopyMode` to update the Label's CopyMode."],["Requires specifying the Label's resource name in the path parameter and providing details like `copyMode`, `useAdminAccess`, `languageCode`, and `view` in the request body."],["Upon successful execution, the response includes the updated Label details."],["Needs authorization with either `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` scope."]]],["This document details updating a Label's `CopyMode` via a `POST` request to a specific URL (`https://drivelabels.googleapis.com/v2beta/{name=labels/*}:updateLabelCopyMode`). The request requires the Label's resource name as a path parameter. The request body, in JSON, includes the `copyMode` (required), optional `useAdminAccess`, `languageCode`, and `view` fields. Authorization requires `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` scopes. A successful response returns a Label instance. Changes take effect immediately.\n"]]