permissions
Creates, updates, deletes, gets or lists a permissions resource.
Overview
| Name | permissions |
| Type | Resource |
| Id | gemini.tuned_models.permissions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only. |
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. |
granteeType | string | Optional. Immutable. The type of the grantee. (GRANTEE_TYPE_UNSPECIFIED, USER, GROUP, EVERYONE) |
role | string | Required. The role granted by this permission. (ROLE_UNSPECIFIED, OWNER, WRITER, READER) |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The permission name. A unique name will be generated on create. Examples: tunedModels/{tuned_model}/permissions/{permission} corpora/{corpus}/permissions/{permission} Output only. |
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. |
granteeType | string | Optional. Immutable. The type of the grantee. (GRANTEE_TYPE_UNSPECIFIED, USER, GROUP, EVERYONE) |
role | string | Required. The role granted by this permission. (ROLE_UNSPECIFIED, OWNER, WRITER, READER) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | tunedModelsId, permissionsId | Gets information about a specific Permission. | |
list | select | tunedModelsId | Lists permissions for the specific resource. | |
create | insert | tunedModelsId | Create a permission to a specific resource. | |
patch | update | tunedModelsId, permissionsId | updateMask | Updates the permission. |
delete | delete | tunedModelsId, permissionsId | Deletes the permission. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
permissionsId | string | |
tunedModelsId | string | |
updateMask | string (google-fieldmask) | Required. The list of fields to update. Accepted ones: - role (Permission.role field) |
SELECT examples
- get
- list
Gets information about a specific Permission.
SELECT
name,
emailAddress,
granteeType,
role
FROM gemini.tuned_models.permissions
WHERE tunedModelsId = '{{ tunedModelsId }}' -- required
AND permissionsId = '{{ permissionsId }}' -- required
;
Lists permissions for the specific resource.
SELECT
name,
emailAddress,
granteeType,
role
FROM gemini.tuned_models.permissions
WHERE tunedModelsId = '{{ tunedModelsId }}' -- required
;
INSERT examples
- create
- Manifest
Create a permission to a specific resource.
INSERT INTO gemini.tuned_models.permissions (
emailAddress,
granteeType,
role,
tunedModelsId
)
SELECT
'{{ emailAddress }}',
'{{ granteeType }}',
'{{ role }}',
'{{ tunedModelsId }}'
RETURNING
name,
emailAddress,
granteeType,
role
;
# Description fields are for documentation purposes
- name: permissions
props:
- name: tunedModelsId
value: "{{ tunedModelsId }}"
description: Required parameter for the permissions resource.
- name: emailAddress
value: "{{ emailAddress }}"
description: |
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.
- name: granteeType
value: "{{ granteeType }}"
description: |
Optional. Immutable. The type of the grantee.
valid_values: ['GRANTEE_TYPE_UNSPECIFIED', 'USER', 'GROUP', 'EVERYONE']
- name: role
value: "{{ role }}"
description: |
Required. The role granted by this permission.
valid_values: ['ROLE_UNSPECIFIED', 'OWNER', 'WRITER', 'READER']
UPDATE examples
- patch
Updates the permission.
UPDATE gemini.tuned_models.permissions
SET
emailAddress = '{{ emailAddress }}',
granteeType = '{{ granteeType }}',
role = '{{ role }}'
WHERE
tunedModelsId = '{{ tunedModelsId }}' --required
WHERE permissionsId = '{{ permissionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
emailAddress,
granteeType,
role;
DELETE examples
- delete
Deletes the permission.
DELETE FROM gemini.tuned_models.permissions
WHERE tunedModelsId = '{{ tunedModelsId }}' --required
AND permissionsId = '{{ permissionsId }}' --required
;