REST Resource: labels.permissions
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
リソース: LabelPermission
ラベルのプリンシパル(ユーザー、グループ、オーディエンス)に適用される権限。
JSON 表現 |
{
"name": string,
"email": string,
"role": enum (LabelRole ),
// Union field principal can be only one of the following:
"person": string,
"group": string,
"audience": string
// End of list of possible types for union field principal .
} |
フィールド |
name |
string
この権限のリソース名。
|
email |
string
ユーザーまたはグループ プリンシパルのメールアドレスを指定します。オーディエンス プリンシパルには入力されません。ユーザーとグループの権限は、メールアドレスを使用してのみ挿入できます。更新リクエストでメールアドレスが指定されている場合、プリンシパルは指定しないでください。
|
role |
enum (LabelRole )
プリンシパルが持つべきロール。
|
共用体フィールド principal 。この権限が適用されるプリンシパル。メール、ユーザー、グループ、オーディエンスのいずれかである必要があります。例: * people/12345 * groups/45678 * audiences/default principal は次のいずれかになります。 |
person |
string
人物リソース名。
|
group |
string
グループ リソース名。
|
audience |
string
ロールを付与するオーディエンス。マジック値 audiences/default を使用して、ラベルを所有する組織のコンテキストでデフォルトのユーザーにロールを適用できます。
|
LabelRole
ロールは、後続のロールと入れ子構造になっています。
列挙型 |
LABEL_ROLE_UNSPECIFIED |
不明なロール。 |
READER |
閲覧者は、ドライブ アイテムに適用されたラベルと関連するメタデータを読み取ることができます。 |
APPLIER |
適用者は、書き込みアクセス権を持つドライブ アイテムに関連付けられたメタデータを書き込むことができます。READER を意味します。 |
ORGANIZER |
主催者は、管理している共有ドライブでこのラベルを固定し、新しい適用者をラベルに追加できます。 |
EDITOR |
編集者は、ラベルの削除を含むあらゆる更新を行うことができます。ラベルを削除すると、関連付けられた Google ドライブ アイテムのメタデータも削除されます。APPLIER を意味します。 |
メソッド |
|
ラベルの権限を削除します。 |
|
ラベルの権限を更新します。 |
|
ラベルの権限を更新します。 |
|
ラベルの権限を削除します。 |
|
ラベルの権限を一覧表示します。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-05 UTC。
[null,null,["最終更新日 2025-08-05 UTC。"],[],[],null,["# REST Resource: labels.permissions\n\n- [Resource: LabelPermission](#LabelPermission)\n - [JSON representation](#LabelPermission.SCHEMA_REPRESENTATION)\n - [LabelRole](#LabelPermission.LabelRole)\n- [Methods](#METHODS_SUMMARY)\n\nResource: LabelPermission\n-------------------------\n\nThe permission that applies to a principal (user, group, audience) on a label.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"email\": string, \"role\": enum (/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole), // Union field `principal` can be only one of the following: \"person\": string, \"group\": string, \"audience\": string // End of list of possible types for union field `principal`. } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this permission. |\n| `email` | `string` Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified. |\n| `role` | `enum (`[LabelRole](/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole)`)` The role the principal should have. |\n| Union field `principal`. The principal this permission applies to. Must be either an email, user, group, or audience. Example: \\* `people/12345` \\* `groups/45678` \\* `audiences/default` `principal` can be only one of the following: ||\n| `person` | `string` Person resource name. |\n| `group` | `string` Group resource name. |\n| `audience` | `string` Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the label. |\n\n### LabelRole\n\nRoles are concentric with subsequent role.\n\n| Enums ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `LABEL_ROLE_UNSPECIFIED` | Unknown role. |\n| `READER` | A reader can read the label and associated metadata applied to Drive items. |\n| `APPLIER` | An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`. |\n| `ORGANIZER` | An organizer can pin this label in shared drives they manage and add new appliers to the label. |\n| `EDITOR` | Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|--------------------------------|\n| ### [batchDelete](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchDelete) | Deletes label permissions. |\n| ### [batchUpdate](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchUpdate) | Updates label permissions. |\n| ### [create](/workspace/drive/labels/reference/rest/v2/labels.permissions/create) | Updates a label's permissions. |\n| ### [delete](/workspace/drive/labels/reference/rest/v2/labels.permissions/delete) | Deletes a label's permission. |\n| ### [list](/workspace/drive/labels/reference/rest/v2/labels.permissions/list) | Lists a label's permissions. |"]]