REST Resource: labels.permissions
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zasób: LabelPermission
Uprawnienia, które mają zastosowanie do podmiotu (użytkownika, grupy, odbiorców) w przypadku etykiety.
Zapis 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 .
} |
Pola |
name |
string
Nazwa zasobu tego uprawnienia.
|
email |
string
Określa adres e-mail użytkownika lub grupy. Nie wypełniane w przypadku podmiotów powiązanych z odbiorcami. Uprawnienia użytkowników i grup można wstawiać tylko za pomocą adresu e-mail. W przypadku próśb o aktualizację, jeśli podano adres e-mail, nie należy podawać podmiotu.
|
role |
enum (LabelRole )
Rola, którą powinien mieć podmiot zabezpieczeń.
|
Pole unii principal . Podmiot zabezpieczeń, do którego odnosi się to uprawnienie. Musi to być adres e-mail, użytkownik, grupa lub odbiorcy. Przykład: * people/12345 * groups/45678 * audiences/default principal może mieć tylko jedną z tych wartości: |
person |
string
Nazwa zasobu osoby.
|
group |
string
Nazwa zasobu grupy.
|
audience |
string
Odbiorcy, którym chcesz przyznać rolę. Wartość magiczna audiences/default może być używana do przypisywania roli domyślnej grupie odbiorców w kontekście organizacji, która jest właścicielem etykiety.
|
LabelRole
Role są koncentryczne z kolejną rolą.
Wartości w polu enum |
LABEL_ROLE_UNSPECIFIED |
Nieznana rola. |
READER |
Czytelnik może odczytać etykietę i powiązane metadane zastosowane do elementów na Dysku. |
APPLIER |
Osoba, która stosuje etykiety, może zapisywać powiązane metadane w elementach na Dysku, do których ma też uprawnienia do zapisu. Implikuje READER . |
ORGANIZER |
Organizator może przypiąć tę etykietę na dyskach współdzielonych, którymi zarządza, i dodać do niej nowych użytkowników. |
EDITOR |
Edytujący mogą wprowadzać dowolne zmiany, w tym usuwać etykiety, co powoduje też usunięcie powiązanych metadanych elementów na Dysku. Implikuje APPLIER . |
Metody |
|
Usuwa uprawnienia dotyczące etykiety. |
|
Aktualizuje uprawnienia dotyczące etykiety. |
|
Aktualizuje uprawnienia etykiety. |
|
Usuwa uprawnienia etykiety. |
|
Wyświetla uprawnienia etykiety. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-05 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]