Amazon WorkDocs

2017/11/20 - Amazon WorkDocs - 1 new10 updated api methods

Changes  Update workdocs client to latest version

DescribeGroups (new) Link ¶

Describes the groups specified by query.

See also: AWS API Documentation

Request Syntax

client.describe_groups(
    AuthenticationToken='string',
    SearchQuery='string',
    OrganizationId='string',
    Marker='string',
    Limit=123
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type SearchQuery:

string

param SearchQuery:

[REQUIRED]

A query to describe groups by group name.

type OrganizationId:

string

param OrganizationId:

The ID of the organization.

type Marker:

string

param Marker:

The marker for the next set of results. (You received this marker from a previous call.)

type Limit:

integer

param Limit:

The maximum number of items to return with this call.

rtype:

dict

returns:

Response Syntax

{
    'Groups': [
        {
            'Id': 'string',
            'Name': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • Groups (list) --

      The list of groups.

      • (dict) --

        Describes the metadata of a user group.

        • Id (string) --

          The ID of the user group.

        • Name (string) --

          The name of the group.

    • Marker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

ActivateUser (updated) Link ¶
Changes (response)
{'User': {'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}}

Activates the specified user. Only active users can access Amazon WorkDocs.

See also: AWS API Documentation

Request Syntax

client.activate_user(
    UserId='string',
    AuthenticationToken='string'
)
type UserId:

string

param UserId:

[REQUIRED]

The ID of the user.

type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
        '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

  • (dict) --

    • User (dict) --

      The user information.

      • Id (string) --

        The ID of the user.

      • Username (string) --

        The login name of the user.

      • EmailAddress (string) --

        The email address of the user.

      • GivenName (string) --

        The given name of the user.

      • Surname (string) --

        The surname of the user.

      • OrganizationId (string) --

        The ID of the organization.

      • RootFolderId (string) --

        The ID of the root folder.

      • RecycleBinFolderId (string) --

        The ID of the recycle bin folder.

      • Status (string) --

        The status of the user.

      • Type (string) --

        The type of user.

      • CreatedTimestamp (datetime) --

        The time when the user was created.

      • ModifiedTimestamp (datetime) --

        The time when the user was modified.

      • TimeZoneId (string) --

        The time zone ID of the user.

      • Locale (string) --

        The locale of the user.

      • Storage (dict) --

        The storage for the user.

        • StorageUtilizedInBytes (integer) --

          The amount of storage used, in bytes.

        • StorageRule (dict) --

          The storage for a user.

          • StorageAllocatedInBytes (integer) --

            The amount of storage allocated, in bytes.

          • StorageType (string) --

            The type of storage.

AddResourcePermissions (updated) Link ¶
Changes (request)
{'NotificationOptions': {'EmailMessage': 'string', 'SendEmail': 'boolean'}}

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

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'
    }
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type ResourceId:

string

param ResourceId:

[REQUIRED]

The ID of the resource.

type Principals:

list

param Principals:

[REQUIRED]

The users, groups, or organization being granted permission.

  • (dict) --

    Describes the recipient type and ID, if available.

    • Id (string) -- [REQUIRED]

      The ID of the recipient.

    • Type (string) -- [REQUIRED]

      The type of the recipient.

    • Role (string) -- [REQUIRED]

      The role of the recipient.

type NotificationOptions:

dict

param NotificationOptions:

The notification options.

  • SendEmail (boolean) --

    Boolean value to indicate an email notification should be sent to the receipients.

  • EmailMessage (string) --

    Text value to be included in the email body.

rtype:

dict

returns:

Response Syntax

{
    'ShareResults': [
        {
            'PrincipalId': '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.

        • Role (string) --

          The role.

        • Status (string) --

          The status.

        • ShareId (string) --

          The ID of the resource that was shared.

        • StatusMessage (string) --

          The status message.

CreateComment (updated) Link ¶
Changes (response)
{'Comment': {'Contributor': {'Type': {'MINIMALUSER',
                                      'POWERUSER',
                                      'WORKSPACESUSER'}}}}

Adds a new comment to the specified document version.

See also: AWS API Documentation

Request Syntax

client.create_comment(
    AuthenticationToken='string',
    DocumentId='string',
    VersionId='string',
    ParentId='string',
    ThreadId='string',
    Text='string',
    Visibility='PUBLIC'|'PRIVATE',
    NotifyCollaborators=True|False
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type DocumentId:

string

param DocumentId:

[REQUIRED]

The ID of the document.

type VersionId:

string

param VersionId:

[REQUIRED]

The ID of the document version.

type ParentId:

string

param ParentId:

The ID of the parent comment.

type ThreadId:

string

param ThreadId:

The ID of the root comment in the thread.

type Text:

string

param Text:

[REQUIRED]

The text of the comment.

type Visibility:

string

param Visibility:

The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

type NotifyCollaborators:

boolean

param NotifyCollaborators:

Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
            '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

  • (dict) --

    • Comment (dict) --

      The comment that has been created.

      • CommentId (string) --

        The ID of the comment.

      • ParentId (string) --

        The ID of the parent comment.

      • ThreadId (string) --

        The ID of the root comment in the thread.

      • Text (string) --

        The text of the comment.

      • Contributor (dict) --

        The details of the user who made the comment.

        • Id (string) --

          The ID of the user.

        • Username (string) --

          The login name of the user.

        • EmailAddress (string) --

          The email address of the user.

        • GivenName (string) --

          The given name of the user.

        • Surname (string) --

          The surname of the user.

        • OrganizationId (string) --

          The ID of the organization.

        • RootFolderId (string) --

          The ID of the root folder.

        • RecycleBinFolderId (string) --

          The ID of the recycle bin folder.

        • Status (string) --

          The status of the user.

        • Type (string) --

          The type of user.

        • CreatedTimestamp (datetime) --

          The time when the user was created.

        • ModifiedTimestamp (datetime) --

          The time when the user was modified.

        • TimeZoneId (string) --

          The time zone ID of the user.

        • Locale (string) --

          The locale of the user.

        • Storage (dict) --

          The storage for the user.

          • StorageUtilizedInBytes (integer) --

            The amount of storage used, in bytes.

          • StorageRule (dict) --

            The storage for a user.

            • StorageAllocatedInBytes (integer) --

              The amount of storage allocated, in bytes.

            • StorageType (string) --

              The type of storage.

      • CreatedTimestamp (datetime) --

        The time that the comment was created.

      • Status (string) --

        The status of the comment.

      • Visibility (string) --

        The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

      • RecipientId (string) --

        If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.

CreateUser (updated) Link ¶
Changes (response)
{'User': {'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}}

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

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'
)
type OrganizationId:

string

param OrganizationId:

The ID of the organization.

type Username:

string

param Username:

[REQUIRED]

The login name of the user.

type EmailAddress:

string

param EmailAddress:

The email address of the user.

type GivenName:

string

param GivenName:

[REQUIRED]

The given name of the user.

type Surname:

string

param Surname:

[REQUIRED]

The surname of the user.

type Password:

string

param Password:

[REQUIRED]

The password of the user.

type TimeZoneId:

string

param TimeZoneId:

The time zone ID of the user.

type StorageRule:

dict

param StorageRule:

The amount of storage for the user.

  • StorageAllocatedInBytes (integer) --

    The amount of storage allocated, in bytes.

  • StorageType (string) --

    The type of storage.

type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
        '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

  • (dict) --

    • User (dict) --

      The user information.

      • Id (string) --

        The ID of the user.

      • Username (string) --

        The login name of the user.

      • EmailAddress (string) --

        The email address of the user.

      • GivenName (string) --

        The given name of the user.

      • Surname (string) --

        The surname of the user.

      • OrganizationId (string) --

        The ID of the organization.

      • RootFolderId (string) --

        The ID of the root folder.

      • RecycleBinFolderId (string) --

        The ID of the recycle bin folder.

      • Status (string) --

        The status of the user.

      • Type (string) --

        The type of user.

      • CreatedTimestamp (datetime) --

        The time when the user was created.

      • ModifiedTimestamp (datetime) --

        The time when the user was modified.

      • TimeZoneId (string) --

        The time zone ID of the user.

      • Locale (string) --

        The locale of the user.

      • Storage (dict) --

        The storage for the user.

        • StorageUtilizedInBytes (integer) --

          The amount of storage used, in bytes.

        • StorageRule (dict) --

          The storage for a user.

          • StorageAllocatedInBytes (integer) --

            The amount of storage allocated, in bytes.

          • StorageType (string) --

            The type of storage.

DescribeActivities (updated) Link ¶
Changes (response)
{'UserActivities': {'CommentMetadata': {'Contributor': {'Type': {'MINIMALUSER',
                                                                 'POWERUSER',
                                                                 'WORKSPACESUSER'}}}}}

Describes the user activities in a specified time period.

See also: AWS API Documentation

Request Syntax

client.describe_activities(
    AuthenticationToken='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    OrganizationId='string',
    UserId='string',
    Limit=123,
    Marker='string'
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type StartTime:

datetime

param StartTime:

The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.

type EndTime:

datetime

param EndTime:

The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.

type OrganizationId:

string

param OrganizationId:

The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.

type UserId:

string

param UserId:

The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.

type Limit:

integer

param Limit:

The maximum number of items to return.

type Marker:

string

param Marker:

The marker for the next set of results.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
                    '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

  • (dict) --

    • UserActivities (list) --

      The list of activities for the specified user and time period.

      • (dict) --

        Describes the activity information.

        • Type (string) --

          The activity type.

        • TimeStamp (datetime) --

          The timestamp when the action was performed.

        • OrganizationId (string) --

          The ID of the organization.

        • Initiator (dict) --

          The user who performed the action.

          • Id (string) --

            The ID of the user.

          • Username (string) --

            The name of the user.

          • GivenName (string) --

            The given name of the user before a rename operation.

          • Surname (string) --

            The surname of the user.

          • EmailAddress (string) --

            The email address of the user.

        • Participants (dict) --

          The list of users or groups impacted by this action. This is an optional field and is filled for the following sharing activities: DOCUMENT_SHARED, DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.

          • Users (list) --

            The list of users.

            • (dict) --

              Describes the metadata of the user.

              • Id (string) --

                The ID of the user.

              • Username (string) --

                The name of the user.

              • GivenName (string) --

                The given name of the user before a rename operation.

              • Surname (string) --

                The surname of the user.

              • EmailAddress (string) --

                The email address of the user.

          • Groups (list) --

            The list of user groups.

            • (dict) --

              Describes the metadata of a user group.

              • Id (string) --

                The ID of the user group.

              • Name (string) --

                The name of the group.

        • ResourceMetadata (dict) --

          The metadata of the resource involved in the user action.

          • Type (string) --

            The type of resource.

          • Name (string) --

            The name of the resource.

          • OriginalName (string) --

            The original name of the resource before a rename operation.

          • Id (string) --

            The ID of the resource.

          • VersionId (string) --

            The version ID of the resource. This is an optional field and is filled for action on document version.

          • Owner (dict) --

            The owner of the resource.

            • Id (string) --

              The ID of the user.

            • Username (string) --

              The name of the user.

            • GivenName (string) --

              The given name of the user before a rename operation.

            • Surname (string) --

              The surname of the user.

            • EmailAddress (string) --

              The email address of the user.

          • ParentId (string) --

            The parent ID of the resource before a rename operation.

        • OriginalParent (dict) --

          The original parent of the resource. This is an optional field and is filled for move activities.

          • Type (string) --

            The type of resource.

          • Name (string) --

            The name of the resource.

          • OriginalName (string) --

            The original name of the resource before a rename operation.

          • Id (string) --

            The ID of the resource.

          • VersionId (string) --

            The version ID of the resource. This is an optional field and is filled for action on document version.

          • Owner (dict) --

            The owner of the resource.

            • Id (string) --

              The ID of the user.

            • Username (string) --

              The name of the user.

            • GivenName (string) --

              The given name of the user before a rename operation.

            • Surname (string) --

              The surname of the user.

            • EmailAddress (string) --

              The email address of the user.

          • ParentId (string) --

            The parent ID of the resource before a rename operation.

        • CommentMetadata (dict) --

          Metadata of the commenting activity. This is an optional field and is filled for commenting activities.

          • CommentId (string) --

            The ID of the comment.

          • Contributor (dict) --

            The user who made the comment.

            • Id (string) --

              The ID of the user.

            • Username (string) --

              The login name of the user.

            • EmailAddress (string) --

              The email address of the user.

            • GivenName (string) --

              The given name of the user.

            • Surname (string) --

              The surname of the user.

            • OrganizationId (string) --

              The ID of the organization.

            • RootFolderId (string) --

              The ID of the root folder.

            • RecycleBinFolderId (string) --

              The ID of the recycle bin folder.

            • Status (string) --

              The status of the user.

            • Type (string) --

              The type of user.

            • CreatedTimestamp (datetime) --

              The time when the user was created.

            • ModifiedTimestamp (datetime) --

              The time when the user was modified.

            • TimeZoneId (string) --

              The time zone ID of the user.

            • Locale (string) --

              The locale of the user.

            • Storage (dict) --

              The storage for the user.

              • StorageUtilizedInBytes (integer) --

                The amount of storage used, in bytes.

              • StorageRule (dict) --

                The storage for a user.

                • StorageAllocatedInBytes (integer) --

                  The amount of storage allocated, in bytes.

                • StorageType (string) --

                  The type of storage.

          • CreatedTimestamp (datetime) --

            The timestamp that the comment was created.

          • CommentStatus (string) --

            The status of the comment.

          • RecipientId (string) --

            The ID of the user being replied to.

    • Marker (string) --

      The marker for the next set of results.

DescribeComments (updated) Link ¶
Changes (response)
{'Comments': {'Contributor': {'Type': {'MINIMALUSER',
                                       'POWERUSER',
                                       'WORKSPACESUSER'}}}}

List all the comments for the specified document version.

See also: AWS API Documentation

Request Syntax

client.describe_comments(
    AuthenticationToken='string',
    DocumentId='string',
    VersionId='string',
    Limit=123,
    Marker='string'
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type DocumentId:

string

param DocumentId:

[REQUIRED]

The ID of the document.

type VersionId:

string

param VersionId:

[REQUIRED]

The ID of the document version.

type Limit:

integer

param Limit:

The maximum number of items to return.

type Marker:

string

param Marker:

The marker for the next set of results. This marker was received from a previous call.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
                '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

  • (dict) --

    • Comments (list) --

      The list of comments for the specified document version.

      • (dict) --

        Describes a comment.

        • CommentId (string) --

          The ID of the comment.

        • ParentId (string) --

          The ID of the parent comment.

        • ThreadId (string) --

          The ID of the root comment in the thread.

        • Text (string) --

          The text of the comment.

        • Contributor (dict) --

          The details of the user who made the comment.

          • Id (string) --

            The ID of the user.

          • Username (string) --

            The login name of the user.

          • EmailAddress (string) --

            The email address of the user.

          • GivenName (string) --

            The given name of the user.

          • Surname (string) --

            The surname of the user.

          • OrganizationId (string) --

            The ID of the organization.

          • RootFolderId (string) --

            The ID of the root folder.

          • RecycleBinFolderId (string) --

            The ID of the recycle bin folder.

          • Status (string) --

            The status of the user.

          • Type (string) --

            The type of user.

          • CreatedTimestamp (datetime) --

            The time when the user was created.

          • ModifiedTimestamp (datetime) --

            The time when the user was modified.

          • TimeZoneId (string) --

            The time zone ID of the user.

          • Locale (string) --

            The locale of the user.

          • Storage (dict) --

            The storage for the user.

            • StorageUtilizedInBytes (integer) --

              The amount of storage used, in bytes.

            • StorageRule (dict) --

              The storage for a user.

              • StorageAllocatedInBytes (integer) --

                The amount of storage allocated, in bytes.

              • StorageType (string) --

                The type of storage.

        • CreatedTimestamp (datetime) --

          The time that the comment was created.

        • Status (string) --

          The status of the comment.

        • Visibility (string) --

          The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

        • RecipientId (string) --

          If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.

    • Marker (string) --

      The marker for the next set of results. This marker was received from a previous call.

DescribeResourcePermissions (updated) Link ¶
Changes (request)
{'PrincipalId': 'string'}

Describes the permissions of a specified resource.

See also: AWS API Documentation

Request Syntax

client.describe_resource_permissions(
    AuthenticationToken='string',
    ResourceId='string',
    PrincipalId='string',
    Limit=123,
    Marker='string'
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type ResourceId:

string

param ResourceId:

[REQUIRED]

The ID of the resource.

type PrincipalId:

string

param PrincipalId:

The ID of the principal to filter permissions by.

type Limit:

integer

param Limit:

The maximum number of items to return with this call.

type Marker:

string

param Marker:

The marker for the next set of results. (You received this marker from a previous call)

rtype:

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

  • (dict) --

    • Principals (list) --

      The principals.

      • (dict) --

        Describes a resource.

        • Id (string) --

          The ID of the resource.

        • Type (string) --

          The type of resource.

        • Roles (list) --

          The permission information for the resource.

          • (dict) --

            Describes the permissions.

            • Role (string) --

              The role of the user.

            • Type (string) --

              The type of permissions.

    • Marker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

DescribeUsers (updated) Link ¶
Changes (response)
{'Users': {'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}}

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

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'
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type OrganizationId:

string

param OrganizationId:

The ID of the organization.

type UserIds:

string

param UserIds:

The IDs of the users.

type Query:

string

param Query:

A query to filter users by user name.

type Include:

string

param Include:

The state of the users. Specify "ALL" to include inactive users.

type Order:

string

param Order:

The order for the results.

type Sort:

string

param Sort:

The sorting criteria.

type Marker:

string

param Marker:

The marker for the next set of results. (You received this marker from a previous call.)

type Limit:

integer

param Limit:

The maximum number of items to return.

type Fields:

string

param Fields:

A comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
            '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

  • (dict) --

    • Users (list) --

      The users.

      • (dict) --

        Describes a user.

        • Id (string) --

          The ID of the user.

        • Username (string) --

          The login name of the user.

        • EmailAddress (string) --

          The email address of the user.

        • GivenName (string) --

          The given name of the user.

        • Surname (string) --

          The surname of the user.

        • OrganizationId (string) --

          The ID of the organization.

        • RootFolderId (string) --

          The ID of the root folder.

        • RecycleBinFolderId (string) --

          The ID of the recycle bin folder.

        • Status (string) --

          The status of the user.

        • Type (string) --

          The type of user.

        • CreatedTimestamp (datetime) --

          The time when the user was created.

        • ModifiedTimestamp (datetime) --

          The time when the user was modified.

        • TimeZoneId (string) --

          The time zone ID of the user.

        • Locale (string) --

          The locale of the user.

        • Storage (dict) --

          The storage for the user.

          • StorageUtilizedInBytes (integer) --

            The amount of storage used, in bytes.

          • StorageRule (dict) --

            The storage for a user.

            • StorageAllocatedInBytes (integer) --

              The amount of storage allocated, in bytes.

            • StorageType (string) --

              The type of storage.

    • TotalNumberOfUsers (integer) --

      The total number of users included in the results.

    • Marker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

GetCurrentUser (updated) Link ¶
Changes (response)
{'User': {'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}}

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

client.get_current_user(
    AuthenticationToken='string'
)
type AuthenticationToken:

string

param AuthenticationToken:

[REQUIRED]

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
        '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

  • (dict) --

    • User (dict) --

      Metadata of the user.

      • Id (string) --

        The ID of the user.

      • Username (string) --

        The login name of the user.

      • EmailAddress (string) --

        The email address of the user.

      • GivenName (string) --

        The given name of the user.

      • Surname (string) --

        The surname of the user.

      • OrganizationId (string) --

        The ID of the organization.

      • RootFolderId (string) --

        The ID of the root folder.

      • RecycleBinFolderId (string) --

        The ID of the recycle bin folder.

      • Status (string) --

        The status of the user.

      • Type (string) --

        The type of user.

      • CreatedTimestamp (datetime) --

        The time when the user was created.

      • ModifiedTimestamp (datetime) --

        The time when the user was modified.

      • TimeZoneId (string) --

        The time zone ID of the user.

      • Locale (string) --

        The locale of the user.

      • Storage (dict) --

        The storage for the user.

        • StorageUtilizedInBytes (integer) --

          The amount of storage used, in bytes.

        • StorageRule (dict) --

          The storage for a user.

          • StorageAllocatedInBytes (integer) --

            The amount of storage allocated, in bytes.

          • StorageType (string) --

            The type of storage.

UpdateUser (updated) Link ¶
Changes (request, response)
Request
{'GrantPoweruserPrivileges': 'TRUE | FALSE',
 'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}
Response
{'User': {'Type': {'WORKSPACESUSER', 'POWERUSER', 'MINIMALUSER'}}}

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

client.update_user(
    AuthenticationToken='string',
    UserId='string',
    GivenName='string',
    Surname='string',
    Type='USER'|'ADMIN'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
    StorageRule={
        'StorageAllocatedInBytes': 123,
        'StorageType': 'UNLIMITED'|'QUOTA'
    },
    TimeZoneId='string',
    Locale='en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
    GrantPoweruserPrivileges='TRUE'|'FALSE'
)
type AuthenticationToken:

string

param AuthenticationToken:

Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.

type UserId:

string

param UserId:

[REQUIRED]

The ID of the user.

type GivenName:

string

param GivenName:

The given name of the user.

type Surname:

string

param Surname:

The surname of the user.

type Type:

string

param Type:

The type of the user.

type StorageRule:

dict

param StorageRule:

The amount of storage for the user.

  • StorageAllocatedInBytes (integer) --

    The amount of storage allocated, in bytes.

  • StorageType (string) --

    The type of storage.

type TimeZoneId:

string

param TimeZoneId:

The time zone ID of the user.

type Locale:

string

param Locale:

The locale of the user.

type GrantPoweruserPrivileges:

string

param GrantPoweruserPrivileges:

Boolean value to determine whether the user is granted Poweruser privileges.

rtype:

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'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
        '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

  • (dict) --

    • User (dict) --

      The user information.

      • Id (string) --

        The ID of the user.

      • Username (string) --

        The login name of the user.

      • EmailAddress (string) --

        The email address of the user.

      • GivenName (string) --

        The given name of the user.

      • Surname (string) --

        The surname of the user.

      • OrganizationId (string) --

        The ID of the organization.

      • RootFolderId (string) --

        The ID of the root folder.

      • RecycleBinFolderId (string) --

        The ID of the recycle bin folder.

      • Status (string) --

        The status of the user.

      • Type (string) --

        The type of user.

      • CreatedTimestamp (datetime) --

        The time when the user was created.

      • ModifiedTimestamp (datetime) --

        The time when the user was modified.

      • TimeZoneId (string) --

        The time zone ID of the user.

      • Locale (string) --

        The locale of the user.

      • Storage (dict) --

        The storage for the user.

        • StorageUtilizedInBytes (integer) --

          The amount of storage used, in bytes.

        • StorageRule (dict) --

          The storage for a user.

          • StorageAllocatedInBytes (integer) --

            The amount of storage allocated, in bytes.

          • StorageType (string) --

            The type of storage.