add_resource_permissions
(**kwargs)¶Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.
See also: AWS API Documentation
Request Syntax
response = client.add_resource_permissions(
AuthenticationToken='string',
ResourceId='string',
Principals=[
{
'Id': 'string',
'Type': 'USER'|'GROUP'|'INVITE'|'ANONYMOUS'|'ORGANIZATION',
'Role': 'VIEWER'|'CONTRIBUTOR'|'OWNER'|'COOWNER'
},
],
NotificationOptions={
'SendEmail': True|False,
'EmailMessage': 'string'
}
)
[REQUIRED]
The ID of the resource.
[REQUIRED]
The users, groups, or organization being granted permission.
Describes the recipient type and ID, if available.
The ID of the recipient.
The type of the recipient.
The role of the recipient.
The notification options.
Boolean value to indicate an email notification should be sent to the recipients.
Text value to be included in the email body.
dict
Response Syntax
{
'ShareResults': [
{
'PrincipalId': 'string',
'InviteePrincipalId': 'string',
'Role': 'VIEWER'|'CONTRIBUTOR'|'OWNER'|'COOWNER',
'Status': 'SUCCESS'|'FAILURE',
'ShareId': 'string',
'StatusMessage': 'string'
},
]
}
Response Structure
(dict) --
ShareResults (list) --
The share results.
(dict) --
Describes the share results of a resource.
PrincipalId (string) --
The ID of the principal.
InviteePrincipalId (string) --
The ID of the invited user.
Role (string) --
The role.
Status (string) --
The status.
ShareId (string) --
The ID of the resource that was shared.
StatusMessage (string) --
The status message.
Exceptions
WorkDocs.Client.exceptions.UnauthorizedOperationException
WorkDocs.Client.exceptions.UnauthorizedResourceAccessException
WorkDocs.Client.exceptions.FailedDependencyException
WorkDocs.Client.exceptions.ServiceUnavailableException
WorkDocs.Client.exceptions.ProhibitedStateException