Table of Contents
WorkDocs.Client¶A low-level client representing Amazon WorkDocs:
client = session.create_client('workdocs')
These are the available methods:
abort_document_version_upload()activate_user()add_resource_permissions()can_paginate()create_comment()create_custom_metadata()create_folder()create_labels()create_notification_subscription()create_user()deactivate_user()delete_comment()delete_custom_metadata()delete_document()delete_folder()delete_folder_contents()delete_labels()delete_notification_subscription()delete_user()describe_activities()describe_comments()describe_document_versions()describe_folder_contents()describe_notification_subscriptions()describe_resource_permissions()describe_root_folders()describe_users()generate_presigned_url()get_current_user()get_document()get_document_path()get_document_version()get_folder()get_folder_path()get_paginator()get_waiter()initiate_document_version_upload()remove_all_resource_permissions()remove_resource_permission()update_document()update_document_version()update_folder()update_user()abort_document_version_upload(**kwargs)¶Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload . The client should make this call only when it no longer intends to upload the document version, or fails to do so.
See also: AWS API Documentation
Request Syntax
response = client.abort_document_version_upload(
AuthenticationToken='string',
DocumentId='string',
VersionId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
activate_user(**kwargs)¶Activates the specified user. Only active users can access Amazon WorkDocs.
See also: AWS API Documentation
Request Syntax
response = client.activate_user(
UserId='string',
AuthenticationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'User': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
}
}
Response Structure
|
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'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ShareResults': [
{
'PrincipalId': 'string',
'Role': 'VIEWER'|'CONTRIBUTOR'|'OWNER'|'COOWNER',
'Status': 'SUCCESS'|'FAILURE',
'ShareId': 'string',
'StatusMessage': 'string'
},
]
}
Response Structure
|
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
create_comment(**kwargs)¶Adds a new comment to the specified document version.
See also: AWS API Documentation
Request Syntax
response = client.create_comment(
AuthenticationToken='string',
DocumentId='string',
VersionId='string',
ParentId='string',
ThreadId='string',
Text='string',
Visibility='PUBLIC'|'PRIVATE',
NotifyCollaborators=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Comment': {
'CommentId': 'string',
'ParentId': 'string',
'ThreadId': 'string',
'Text': 'string',
'Contributor': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
'CreatedTimestamp': datetime(2015, 1, 1),
'Status': 'DRAFT'|'PUBLISHED'|'DELETED',
'Visibility': 'PUBLIC'|'PRIVATE',
'RecipientId': 'string'
}
}
Response Structure
|
create_custom_metadata(**kwargs)¶Adds one or more custom properties to the specified resource (a folder, document, or version).
See also: AWS API Documentation
Request Syntax
response = client.create_custom_metadata(
AuthenticationToken='string',
ResourceId='string',
VersionId='string',
CustomMetadata={
'string': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
create_folder(**kwargs)¶Creates a folder with the specified name and parent folder.
See also: AWS API Documentation
Request Syntax
response = client.create_folder(
AuthenticationToken='string',
Name='string',
ParentFolderId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Metadata': {
'Id': 'string',
'Name': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Signature': 'string',
'Labels': [
'string',
],
'Size': 123,
'LatestVersionSize': 123
}
}
Response Structure
|
create_labels(**kwargs)¶Adds the specified list of labels to the given resource (a document or folder)
See also: AWS API Documentation
Request Syntax
response = client.create_labels(
ResourceId='string',
Labels=[
'string',
],
AuthenticationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
create_notification_subscription(**kwargs)¶Configure WorkDocs to use Amazon SNS notifications.
The endpoint receives a confirmation message, and must confirm the subscription. For more information, see Confirm the Subscription in the Amazon Simple Notification Service Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_notification_subscription(
OrganizationId='string',
Endpoint='string',
Protocol='HTTPS',
SubscriptionType='ALL'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Subscription': {
'SubscriptionId': 'string',
'EndPoint': 'string',
'Protocol': 'HTTPS'
}
}
Response Structure
|
create_user(**kwargs)¶Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is “ACTIVE”. New users can access Amazon WorkDocs.
See also: AWS API Documentation
Request Syntax
response = client.create_user(
OrganizationId='string',
Username='string',
EmailAddress='string',
GivenName='string',
Surname='string',
Password='string',
TimeZoneId='string',
StorageRule={
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
},
AuthenticationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'User': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
}
}
Response Structure
|
deactivate_user(**kwargs)¶Deactivates the specified user, which revokes the user’s access to Amazon WorkDocs.
See also: AWS API Documentation
Request Syntax
response = client.deactivate_user(
UserId='string',
AuthenticationToken='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_comment(**kwargs)¶Deletes the specified comment from the document version.
See also: AWS API Documentation
Request Syntax
response = client.delete_comment(
AuthenticationToken='string',
DocumentId='string',
VersionId='string',
CommentId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_custom_metadata(**kwargs)¶Deletes custom metadata from the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.delete_custom_metadata(
AuthenticationToken='string',
ResourceId='string',
VersionId='string',
Keys=[
'string',
],
DeleteAll=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_document(**kwargs)¶Permanently deletes the specified document and its associated metadata.
See also: AWS API Documentation
Request Syntax
response = client.delete_document(
AuthenticationToken='string',
DocumentId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_folder(**kwargs)¶Permanently deletes the specified folder and its contents.
See also: AWS API Documentation
Request Syntax
response = client.delete_folder(
AuthenticationToken='string',
FolderId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_folder_contents(**kwargs)¶Deletes the contents of the specified folder.
See also: AWS API Documentation
Request Syntax
response = client.delete_folder_contents(
AuthenticationToken='string',
FolderId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_labels(**kwargs)¶Deletes the specified list of labels from a resource.
See also: AWS API Documentation
Request Syntax
response = client.delete_labels(
ResourceId='string',
AuthenticationToken='string',
Labels=[
'string',
],
DeleteAll=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_notification_subscription(**kwargs)¶Deletes the specified subscription from the specified organization.
See also: AWS API Documentation
Request Syntax
response = client.delete_notification_subscription(
SubscriptionId='string',
OrganizationId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_user(**kwargs)¶Deletes the specified user from a Simple AD or Microsoft AD directory.
See also: AWS API Documentation
Request Syntax
response = client.delete_user(
AuthenticationToken='string',
UserId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
describe_activities(**kwargs)¶Describes the user activities in a specified time period.
See also: AWS API Documentation
Request Syntax
response = client.describe_activities(
AuthenticationToken='string',
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
OrganizationId='string',
UserId='string',
Limit=123,
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserActivities': [
{
'Type': 'DOCUMENT_CHECKED_IN'|'DOCUMENT_CHECKED_OUT'|'DOCUMENT_RENAMED'|'DOCUMENT_VERSION_UPLOADED'|'DOCUMENT_VERSION_DELETED'|'DOCUMENT_RECYCLED'|'DOCUMENT_RESTORED'|'DOCUMENT_REVERTED'|'DOCUMENT_SHARED'|'DOCUMENT_UNSHARED'|'DOCUMENT_SHARE_PERMISSION_CHANGED'|'DOCUMENT_SHAREABLE_LINK_CREATED'|'DOCUMENT_SHAREABLE_LINK_REMOVED'|'DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED'|'DOCUMENT_MOVED'|'DOCUMENT_COMMENT_ADDED'|'DOCUMENT_COMMENT_DELETED'|'DOCUMENT_ANNOTATION_ADDED'|'DOCUMENT_ANNOTATION_DELETED'|'FOLDER_CREATED'|'FOLDER_DELETED'|'FOLDER_RENAMED'|'FOLDER_RECYCLED'|'FOLDER_RESTORED'|'FOLDER_SHARED'|'FOLDER_UNSHARED'|'FOLDER_SHARE_PERMISSION_CHANGED'|'FOLDER_SHAREABLE_LINK_CREATED'|'FOLDER_SHAREABLE_LINK_REMOVED'|'FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED'|'FOLDER_MOVED',
'TimeStamp': datetime(2015, 1, 1),
'OrganizationId': 'string',
'Initiator': {
'Id': 'string',
'Username': 'string',
'GivenName': 'string',
'Surname': 'string',
'EmailAddress': 'string'
},
'Participants': {
'Users': [
{
'Id': 'string',
'Username': 'string',
'GivenName': 'string',
'Surname': 'string',
'EmailAddress': 'string'
},
],
'Groups': [
{
'Id': 'string',
'Name': 'string'
},
]
},
'ResourceMetadata': {
'Type': 'FOLDER'|'DOCUMENT',
'Name': 'string',
'OriginalName': 'string',
'Id': 'string',
'VersionId': 'string',
'Owner': {
'Id': 'string',
'Username': 'string',
'GivenName': 'string',
'Surname': 'string',
'EmailAddress': 'string'
},
'ParentId': 'string'
},
'OriginalParent': {
'Type': 'FOLDER'|'DOCUMENT',
'Name': 'string',
'OriginalName': 'string',
'Id': 'string',
'VersionId': 'string',
'Owner': {
'Id': 'string',
'Username': 'string',
'GivenName': 'string',
'Surname': 'string',
'EmailAddress': 'string'
},
'ParentId': 'string'
},
'CommentMetadata': {
'CommentId': 'string',
'Contributor': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
'CreatedTimestamp': datetime(2015, 1, 1),
'CommentStatus': 'DRAFT'|'PUBLISHED'|'DELETED',
'RecipientId': 'string'
}
},
],
'Marker': 'string'
}
Response Structure
|
describe_comments(**kwargs)¶List all the comments for the specified document version.
See also: AWS API Documentation
Request Syntax
response = client.describe_comments(
AuthenticationToken='string',
DocumentId='string',
VersionId='string',
Limit=123,
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Comments': [
{
'CommentId': 'string',
'ParentId': 'string',
'ThreadId': 'string',
'Text': 'string',
'Contributor': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
'CreatedTimestamp': datetime(2015, 1, 1),
'Status': 'DRAFT'|'PUBLISHED'|'DELETED',
'Visibility': 'PUBLIC'|'PRIVATE',
'RecipientId': 'string'
},
],
'Marker': 'string'
}
Response Structure
|
describe_document_versions(**kwargs)¶Retrieves the document versions for the specified document.
By default, only active versions are returned.
See also: AWS API Documentation
Request Syntax
response = client.describe_document_versions(
AuthenticationToken='string',
DocumentId='string',
Marker='string',
Limit=123,
Include='string',
Fields='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'DocumentVersions': [
{
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
],
'Marker': 'string'
}
Response Structure
|
describe_folder_contents(**kwargs)¶Describes the contents of the specified folder, including its documents and subfolders.
By default, Amazon WorkDocs returns the first 100 active document and folder metadata items. If there are more results, the response includes a marker that you can use to request the next set of results. You can also request initialized documents.
See also: AWS API Documentation
Request Syntax
response = client.describe_folder_contents(
AuthenticationToken='string',
FolderId='string',
Sort='DATE'|'NAME',
Order='ASCENDING'|'DESCENDING',
Limit=123,
Marker='string',
Type='ALL'|'DOCUMENT'|'FOLDER',
Include='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Folders': [
{
'Id': 'string',
'Name': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Signature': 'string',
'Labels': [
'string',
],
'Size': 123,
'LatestVersionSize': 123
},
],
'Documents': [
{
'Id': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'LatestVersionMetadata': {
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Labels': [
'string',
]
},
],
'Marker': 'string'
}
Response Structure
|
describe_notification_subscriptions(**kwargs)¶Lists the specified notification subscriptions.
See also: AWS API Documentation
Request Syntax
response = client.describe_notification_subscriptions(
OrganizationId='string',
Marker='string',
Limit=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Subscriptions': [
{
'SubscriptionId': 'string',
'EndPoint': 'string',
'Protocol': 'HTTPS'
},
],
'Marker': 'string'
}
Response Structure
|
describe_resource_permissions(**kwargs)¶Describes the permissions of a specified resource.
See also: AWS API Documentation
Request Syntax
response = client.describe_resource_permissions(
AuthenticationToken='string',
ResourceId='string',
Limit=123,
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Principals': [
{
'Id': 'string',
'Type': 'USER'|'GROUP'|'INVITE'|'ANONYMOUS'|'ORGANIZATION',
'Roles': [
{
'Role': 'VIEWER'|'CONTRIBUTOR'|'OWNER'|'COOWNER',
'Type': 'DIRECT'|'INHERITED'
},
]
},
],
'Marker': 'string'
}
Response Structure
|
describe_root_folders(**kwargs)¶Describes the current user’s special folders; the RootFolder and the RecyleBin . RootFolder is the root of user’s files and folders and RecyleBin is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.
See also: AWS API Documentation
Request Syntax
response = client.describe_root_folders(
AuthenticationToken='string',
Limit=123,
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Folders': [
{
'Id': 'string',
'Name': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Signature': 'string',
'Labels': [
'string',
],
'Size': 123,
'LatestVersionSize': 123
},
],
'Marker': 'string'
}
Response Structure
|
describe_users(**kwargs)¶Describes the specified users. You can describe all users or filter the results (for example, by status or organization).
By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.
See also: AWS API Documentation
Request Syntax
response = client.describe_users(
AuthenticationToken='string',
OrganizationId='string',
UserIds='string',
Query='string',
Include='ALL'|'ACTIVE_PENDING',
Order='ASCENDING'|'DESCENDING',
Sort='USER_NAME'|'FULL_NAME'|'STORAGE_LIMIT'|'USER_STATUS'|'STORAGE_USED',
Marker='string',
Limit=123,
Fields='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Users': [
{
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
],
'TotalNumberOfUsers': 123,
'Marker': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_current_user(**kwargs)¶Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.
See also: AWS API Documentation
Request Syntax
response = client.get_current_user(
AuthenticationToken='string'
)
| Parameters: | AuthenticationToken (string) – [REQUIRED] Amazon WorkDocs authentication token. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'User': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
}
}
Response Structure
|
get_document(**kwargs)¶Retrieves details of a document.
See also: AWS API Documentation
Request Syntax
response = client.get_document(
AuthenticationToken='string',
DocumentId='string',
IncludeCustomMetadata=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Metadata': {
'Id': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'LatestVersionMetadata': {
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Labels': [
'string',
]
},
'CustomMetadata': {
'string': 'string'
}
}
Response Structure
|
get_document_path(**kwargs)¶Retrieves the path information (the hierarchy from the root folder) for the requested document.
By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested document and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the names of the parent folders.
See also: AWS API Documentation
Request Syntax
response = client.get_document_path(
AuthenticationToken='string',
DocumentId='string',
Limit=123,
Fields='string',
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Path': {
'Components': [
{
'Id': 'string',
'Name': 'string'
},
]
}
}
Response Structure
|
get_document_version(**kwargs)¶Retrieves version metadata for the specified document.
See also: AWS API Documentation
Request Syntax
response = client.get_document_version(
AuthenticationToken='string',
DocumentId='string',
VersionId='string',
Fields='string',
IncludeCustomMetadata=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Metadata': {
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
'CustomMetadata': {
'string': 'string'
}
}
Response Structure
|
get_folder(**kwargs)¶Retrieves the metadata of the specified folder.
See also: AWS API Documentation
Request Syntax
response = client.get_folder(
AuthenticationToken='string',
FolderId='string',
IncludeCustomMetadata=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Metadata': {
'Id': 'string',
'Name': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Signature': 'string',
'Labels': [
'string',
],
'Size': 123,
'LatestVersionSize': 123
},
'CustomMetadata': {
'string': 'string'
}
}
Response Structure
|
get_folder_path(**kwargs)¶Retrieves the path information (the hierarchy from the root folder) for the specified folder.
By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested folder and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the parent folder names.
See also: AWS API Documentation
Request Syntax
response = client.get_folder_path(
AuthenticationToken='string',
FolderId='string',
Limit=123,
Fields='string',
Marker='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Path': {
'Components': [
{
'Id': 'string',
'Name': 'string'
},
]
}
}
Response Structure
|
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶initiate_document_version_upload(**kwargs)¶Creates a new document object and version object.
The client specifies the parent folder ID and name of the document to upload. The ID is optionally specified when creating a new version of an existing document. This is the first step to upload a document. Next, upload the document to the URL returned from the call, and then call UpdateDocumentVersion .
To cancel the document upload, call AbortDocumentVersionUpload .
See also: AWS API Documentation
Request Syntax
response = client.initiate_document_version_upload(
AuthenticationToken='string',
Id='string',
Name='string',
ContentCreatedTimestamp=datetime(2015, 1, 1),
ContentModifiedTimestamp=datetime(2015, 1, 1),
ContentType='string',
DocumentSizeInBytes=123,
ParentFolderId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Metadata': {
'Id': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'LatestVersionMetadata': {
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Labels': [
'string',
]
},
'UploadMetadata': {
'UploadUrl': 'string',
'SignedHeaders': {
'string': 'string'
}
}
}
Response Structure
|
remove_all_resource_permissions(**kwargs)¶Removes all the permissions from the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.remove_all_resource_permissions(
AuthenticationToken='string',
ResourceId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
remove_resource_permission(**kwargs)¶Removes the permission for the specified principal from the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.remove_resource_permission(
AuthenticationToken='string',
ResourceId='string',
PrincipalId='string',
PrincipalType='USER'|'GROUP'|'INVITE'|'ANONYMOUS'|'ORGANIZATION'
)
| Parameters: |
|
|---|---|
| Returns: | None |
update_document(**kwargs)¶Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.
See also: AWS API Documentation
Request Syntax
response = client.update_document(
AuthenticationToken='string',
DocumentId='string',
Name='string',
ParentFolderId='string',
ResourceState='ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED'
)
| Parameters: |
|
|---|---|
| Returns: | None |
update_document_version(**kwargs)¶Changes the status of the document version to ACTIVE.
Amazon WorkDocs also sets its document container to ACTIVE. This is the last step in a document upload, after the client uploads the document to an S3-presigned URL returned by InitiateDocumentVersionUpload .
See also: AWS API Documentation
Request Syntax
response = client.update_document_version(
AuthenticationToken='string',
DocumentId='string',
VersionId='string',
VersionStatus='ACTIVE'
)
| Parameters: |
|
|---|---|
| Returns: | None |
update_folder(**kwargs)¶Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.
See also: AWS API Documentation
Request Syntax
response = client.update_folder(
AuthenticationToken='string',
FolderId='string',
Name='string',
ParentFolderId='string',
ResourceState='ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED'
)
| Parameters: |
|
|---|---|
| Returns: | None |
update_user(**kwargs)¶Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.
See also: AWS API Documentation
Request Syntax
response = client.update_user(
AuthenticationToken='string',
UserId='string',
GivenName='string',
Surname='string',
Type='USER'|'ADMIN',
StorageRule={
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
},
TimeZoneId='string',
Locale='en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'User': {
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
}
}
Response Structure
|
The available paginators are:
WorkDocs.Paginator.DescribeDocumentVersionsWorkDocs.Paginator.DescribeFolderContentsWorkDocs.Paginator.DescribeUsersWorkDocs.Paginator.DescribeDocumentVersions¶paginator = client.get_paginator('describe_document_versions')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from WorkDocs.Client.describe_document_versions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
AuthenticationToken='string',
DocumentId='string',
Include='string',
Fields='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'DocumentVersions': [
{
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
|
WorkDocs.Paginator.DescribeFolderContents¶paginator = client.get_paginator('describe_folder_contents')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from WorkDocs.Client.describe_folder_contents().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
AuthenticationToken='string',
FolderId='string',
Sort='DATE'|'NAME',
Order='ASCENDING'|'DESCENDING',
Type='ALL'|'DOCUMENT'|'FOLDER',
Include='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Folders': [
{
'Id': 'string',
'Name': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Signature': 'string',
'Labels': [
'string',
],
'Size': 123,
'LatestVersionSize': 123
},
],
'Documents': [
{
'Id': 'string',
'CreatorId': 'string',
'ParentFolderId': 'string',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'LatestVersionMetadata': {
'Id': 'string',
'Name': 'string',
'ContentType': 'string',
'Size': 123,
'Signature': 'string',
'Status': 'INITIALIZED'|'ACTIVE',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'ContentCreatedTimestamp': datetime(2015, 1, 1),
'ContentModifiedTimestamp': datetime(2015, 1, 1),
'CreatorId': 'string',
'Thumbnail': {
'string': 'string'
},
'Source': {
'string': 'string'
}
},
'ResourceState': 'ACTIVE'|'RESTORING'|'RECYCLING'|'RECYCLED',
'Labels': [
'string',
]
},
],
'NextToken': 'string'
}
Response Structure
|
WorkDocs.Paginator.DescribeUsers¶paginator = client.get_paginator('describe_users')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from WorkDocs.Client.describe_users().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
AuthenticationToken='string',
OrganizationId='string',
UserIds='string',
Query='string',
Include='ALL'|'ACTIVE_PENDING',
Order='ASCENDING'|'DESCENDING',
Sort='USER_NAME'|'FULL_NAME'|'STORAGE_LIMIT'|'USER_STATUS'|'STORAGE_USED',
Fields='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Users': [
{
'Id': 'string',
'Username': 'string',
'EmailAddress': 'string',
'GivenName': 'string',
'Surname': 'string',
'OrganizationId': 'string',
'RootFolderId': 'string',
'RecycleBinFolderId': 'string',
'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
'Type': 'USER'|'ADMIN',
'CreatedTimestamp': datetime(2015, 1, 1),
'ModifiedTimestamp': datetime(2015, 1, 1),
'TimeZoneId': 'string',
'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
'Storage': {
'StorageUtilizedInBytes': 123,
'StorageRule': {
'StorageAllocatedInBytes': 123,
'StorageType': 'UNLIMITED'|'QUOTA'
}
}
},
],
'TotalNumberOfUsers': 123,
'NextToken': 'string'
}
Response Structure
|