Method: labels.permissions.create
ラベルの権限を更新します。指定されたプリンシパルの権限が存在しない場合は、新しいラベル権限が作成されます。存在しない場合は、既存の権限が更新されます。権限はラベルリソース全体に影響します。権限は変更されず、公開する必要はありません。
HTTP リクエスト
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。ラベル権限の親ラベルリソース名が作成されます。形式: labels/{label}
|
クエリ パラメータ
パラメータ |
useAdminAccess |
boolean
ユーザーの管理者認証情報を使用するには、true に設定します。アクセスを許可する前に、サーバーがラベルの管理者であることを確認する。
|
リクエスト本文
リクエストの本文には LabelPermission
のインスタンスが含まれています。
レスポンスの本文
成功した場合、レスポンスの本文には、新しく作成された LabelPermission
のインスタンスが含まれます。
承認スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
詳しくは、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-03 UTC。
[null,null,["最終更新日 2024-09-03 UTC。"],[[["This API endpoint updates a Label's permissions, creating new ones if they don't exist and updating existing ones otherwise."],["Permissions apply to the entire Label resource, are not version-controlled, and don't need publishing."],["The request should be a `POST` to the provided URL, including the parent Label resource name as a path parameter."],["You can use query parameters to utilize admin credentials if the user has admin privileges for the Label."],["Authorization requires specific OAuth scopes related to Drive labels and potentially admin access."]]],["This document details updating a Label's permissions via a POST request to `https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions`. The `parent` path parameter specifies the Label, and `useAdminAccess` is a query parameter for admin credentials. The request body contains a `LabelPermission` instance; if successful, the response also contains a `LabelPermission` instance. Requires either `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` OAuth scopes.\n"]]