Create
|
|||||
|
|
Creates a permission for a file or shared drive
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- See, edit, create, and delete all of your Google Drive files
- View and manage Google Drive files and folders that you have opened or created with this app
Input
This building block consumes 28 input parameters
Name | Format | Description |
---|---|---|
fileId Required |
STRING |
The ID of the file or shared drive |
emailMessage |
STRING |
A plain text custom message to include in the notification email |
sendNotificationEmail |
BOOLEAN |
Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers |
supportsAllDrives |
BOOLEAN |
Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives |
supportsTeamDrives |
BOOLEAN |
Deprecated use supportsAllDrives instead |
transferOwnership |
BOOLEAN |
Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect |
useDomainAdminAccess |
BOOLEAN |
Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs |
allowFileDiscovery |
BOOLEAN |
Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
deleted |
BOOLEAN |
Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
displayName |
STRING |
A displayable name for users, groups or domains |
domain |
STRING |
The domain to which this permission refers |
emailAddress |
STRING |
The email address of the user or group to which this permission refers |
expirationTime |
DATE_TIME |
The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
id |
STRING |
The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissionDetails[] |
OBJECT |
|
permissionDetails[].inherited |
BOOLEAN |
Whether this permission is inherited. This field is always populated. This is an output-only field |
permissionDetails[].inheritedFrom |
STRING |
The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive |
permissionDetails[].permissionType |
STRING |
The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].role |
STRING |
The primary role for this user. While new values may be added in the future, the following are currently possible:
|
photoLink |
STRING |
A link to the user's profile photo, if available |
role |
STRING |
The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
teamDrivePermissionDetails[] |
OBJECT |
|
teamDrivePermissionDetails[].inherited |
BOOLEAN |
Deprecated - use permissionDetails/inherited instead |
teamDrivePermissionDetails[].inheritedFrom |
STRING |
Deprecated - use permissionDetails/inheritedFrom instead |
teamDrivePermissionDetails[].role |
STRING |
Deprecated - use permissionDetails/role instead |
teamDrivePermissionDetails[].teamDrivePermissionType |
STRING |
Deprecated - use permissionDetails/permissionType instead |
type |
STRING |
The type of the grantee. Valid values are:
|
= Parameter name
= Format
fileId STRING Required The ID of the file or shared drive |
emailMessage STRING A plain text custom message to include in the notification email |
sendNotificationEmail BOOLEAN Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers |
supportsAllDrives BOOLEAN Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives |
supportsTeamDrives BOOLEAN Deprecated use supportsAllDrives instead |
transferOwnership BOOLEAN Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect |
useDomainAdminAccess BOOLEAN Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs |
allowFileDiscovery BOOLEAN Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
deleted BOOLEAN Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
displayName STRING A displayable name for users, groups or domains |
domain STRING The domain to which this permission refers |
emailAddress STRING The email address of the user or group to which this permission refers |
expirationTime DATE_TIME The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
id STRING The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissionDetails[] OBJECT |
permissionDetails[].inherited BOOLEAN Whether this permission is inherited. This field is always populated. This is an output-only field |
permissionDetails[].inheritedFrom STRING The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive |
permissionDetails[].permissionType STRING The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].role STRING The primary role for this user. While new values may be added in the future, the following are currently possible:
|
photoLink STRING A link to the user's profile photo, if available |
role STRING The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
teamDrivePermissionDetails[] OBJECT |
teamDrivePermissionDetails[].inherited BOOLEAN Deprecated - use permissionDetails/inherited instead |
teamDrivePermissionDetails[].inheritedFrom STRING Deprecated - use permissionDetails/inheritedFrom instead |
teamDrivePermissionDetails[].role STRING Deprecated - use permissionDetails/role instead |
teamDrivePermissionDetails[].teamDrivePermissionType STRING Deprecated - use permissionDetails/permissionType instead |
type STRING The type of the grantee. Valid values are:
|
Output
This building block provides 21 output parameters
Name | Format | Description |
---|---|---|
allowFileDiscovery |
BOOLEAN |
Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
deleted |
BOOLEAN |
Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
displayName |
STRING |
A displayable name for users, groups or domains |
domain |
STRING |
The domain to which this permission refers |
emailAddress |
STRING |
The email address of the user or group to which this permission refers |
expirationTime |
DATE_TIME |
The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
id |
STRING |
The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissionDetails[] |
OBJECT |
|
permissionDetails[].inherited |
BOOLEAN |
Whether this permission is inherited. This field is always populated. This is an output-only field |
permissionDetails[].inheritedFrom |
STRING |
The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive |
permissionDetails[].permissionType |
STRING |
The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].role |
STRING |
The primary role for this user. While new values may be added in the future, the following are currently possible:
|
photoLink |
STRING |
A link to the user's profile photo, if available |
role |
STRING |
The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
teamDrivePermissionDetails[] |
OBJECT |
|
teamDrivePermissionDetails[].inherited |
BOOLEAN |
Deprecated - use permissionDetails/inherited instead |
teamDrivePermissionDetails[].inheritedFrom |
STRING |
Deprecated - use permissionDetails/inheritedFrom instead |
teamDrivePermissionDetails[].role |
STRING |
Deprecated - use permissionDetails/role instead |
teamDrivePermissionDetails[].teamDrivePermissionType |
STRING |
Deprecated - use permissionDetails/permissionType instead |
type |
STRING |
The type of the grantee. Valid values are:
|
= Parameter name
= Format
allowFileDiscovery BOOLEAN Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
deleted BOOLEAN Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
displayName STRING A displayable name for users, groups or domains |
domain STRING The domain to which this permission refers |
emailAddress STRING The email address of the user or group to which this permission refers |
expirationTime DATE_TIME The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
id STRING The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissionDetails[] OBJECT |
permissionDetails[].inherited BOOLEAN Whether this permission is inherited. This field is always populated. This is an output-only field |
permissionDetails[].inheritedFrom STRING The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the shared drive |
permissionDetails[].permissionType STRING The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].role STRING The primary role for this user. While new values may be added in the future, the following are currently possible:
|
photoLink STRING A link to the user's profile photo, if available |
role STRING The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
teamDrivePermissionDetails[] OBJECT |
teamDrivePermissionDetails[].inherited BOOLEAN Deprecated - use permissionDetails/inherited instead |
teamDrivePermissionDetails[].inheritedFrom STRING Deprecated - use permissionDetails/inheritedFrom instead |
teamDrivePermissionDetails[].role STRING Deprecated - use permissionDetails/role instead |
teamDrivePermissionDetails[].teamDrivePermissionType STRING Deprecated - use permissionDetails/permissionType instead |
type STRING The type of the grantee. Valid values are:
|