REST Resource: corpora.permissions

Resource: Permission

Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus).

A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains.

There are three concentric roles. Each role is a superset of the previous role's permitted operations:

  • reader can use the resource (e.g. tuned model, corpus) for inference
  • writer has reader's permissions and additionally can edit and share
  • owner has writer's permissions and additionally can delete
JSON representation
{
  "name": string,
  "granteeType": enum (GranteeType),
  "emailAddress": string,
  "role": enum (Role)
}
Fields
name

string

Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tunedModel}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only.

granteeType

enum (GranteeType)

Optional. Immutable. The type of the grantee.

emailAddress

string

Optional. Immutable. The email address of the user of group which this permission refers. Field is not set when permission's grantee type is EVERYONE.

role

enum (Role)

Required. The role granted by this permission.

GranteeType

Defines types of the grantee of this permission.

Enums
GRANTEE_TYPE_UNSPECIFIED The default value. This value is unused.
USER Represents a user. When set, you must provide emailAddress for the user.
GROUP Represents a group. When set, you must provide emailAddress for the group.
EVERYONE Represents access to everyone. No extra information is required.

Role

Defines the role granted by this permission.

Enums
ROLE_UNSPECIFIED The default value. This value is unused.
OWNER Owner can use, update, share and delete the resource.
WRITER Writer can use, update and share the resource.
READER Reader can use the resource.

Methods

create

Create a permission to a specific resource.

delete

Deletes the permission.

get

Gets information about a specific Permission.

list

Lists permissions for the specific resource.

patch

Updates the permission.