SDK for PHP 3.x

Client: Aws\WorkDocs\WorkDocsClient
Service ID: workdocs
Version: 2016-05-01

This page describes the parameters and results for the operations of the Amazon WorkDocs (2016-05-01), and shows how to use the Aws\WorkDocs\WorkDocsClient object to call the described operations. This documentation is specific to the 2016-05-01 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

AbortDocumentVersionUpload ( array $params = [] )
Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload.
ActivateUser ( array $params = [] )
Activates the specified user.
AddResourcePermissions ( array $params = [] )
Creates a set of permissions for the specified folder or document.
CreateComment ( array $params = [] )
Adds a new comment to the specified document version.
CreateCustomMetadata ( array $params = [] )
Adds one or more custom properties to the specified resource (a folder, document, or version).
CreateFolder ( array $params = [] )
Creates a folder with the specified name and parent folder.
CreateLabels ( array $params = [] )
Adds the specified list of labels to the given resource (a document or folder)
CreateNotificationSubscription ( array $params = [] )
Configure Amazon WorkDocs to use Amazon SNS notifications.
CreateUser ( array $params = [] )
Creates a user in a Simple AD or Microsoft AD directory.
DeactivateUser ( array $params = [] )
Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.
DeleteComment ( array $params = [] )
Deletes the specified comment from the document version.
DeleteCustomMetadata ( array $params = [] )
Deletes custom metadata from the specified resource.
DeleteDocument ( array $params = [] )
Permanently deletes the specified document and its associated metadata.
DeleteDocumentVersion ( array $params = [] )
Deletes a specific version of a document.
DeleteFolder ( array $params = [] )
Permanently deletes the specified folder and its contents.
DeleteFolderContents ( array $params = [] )
Deletes the contents of the specified folder.
DeleteLabels ( array $params = [] )
Deletes the specified list of labels from a resource.
DeleteNotificationSubscription ( array $params = [] )
Deletes the specified subscription from the specified organization.
DeleteUser ( array $params = [] )
Deletes the specified user from a Simple AD or Microsoft AD directory.
DescribeActivities ( array $params = [] )
Describes the user activities in a specified time period.
DescribeComments ( array $params = [] )
List all the comments for the specified document version.
DescribeDocumentVersions ( array $params = [] )
Retrieves the document versions for the specified document.
DescribeFolderContents ( array $params = [] )
Describes the contents of the specified folder, including its documents and subfolders.
DescribeGroups ( array $params = [] )
Describes the groups specified by the query.
DescribeNotificationSubscriptions ( array $params = [] )
Lists the specified notification subscriptions.
DescribeResourcePermissions ( array $params = [] )
Describes the permissions of a specified resource.
DescribeRootFolders ( array $params = [] )
Describes the current user's special folders; the RootFolder and the RecycleBin.
DescribeUsers ( array $params = [] )
Describes the specified users.
GetCurrentUser ( array $params = [] )
Retrieves details of the current user for whom the authentication token was generated.
GetDocument ( array $params = [] )
Retrieves details of a document.
GetDocumentPath ( array $params = [] )
Retrieves the path information (the hierarchy from the root folder) for the requested document.
GetDocumentVersion ( array $params = [] )
Retrieves version metadata for the specified document.
GetFolder ( array $params = [] )
Retrieves the metadata of the specified folder.
GetFolderPath ( array $params = [] )
Retrieves the path information (the hierarchy from the root folder) for the specified folder.
GetResources ( array $params = [] )
Retrieves a collection of resources, including folders and documents.
InitiateDocumentVersionUpload ( array $params = [] )
Creates a new document object and version object.
RemoveAllResourcePermissions ( array $params = [] )
Removes all the permissions from the specified resource.
RemoveResourcePermission ( array $params = [] )
Removes the permission for the specified principal from the specified resource.
RestoreDocumentVersions ( array $params = [] )
Recovers a deleted version of an Amazon WorkDocs document.
SearchResources ( array $params = [] )
Searches metadata and the content of folders, documents, document versions, and comments.
UpdateDocument ( array $params = [] )
Updates the specified attributes of a document.
UpdateDocumentVersion ( array $params = [] )
Changes the status of the document version to ACTIVE.
UpdateFolder ( array $params = [] )
Updates the specified attributes of the specified folder.
UpdateUser ( array $params = [] )
Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

DescribeActivities
DescribeComments
DescribeDocumentVersions
DescribeFolderContents
DescribeGroups
DescribeNotificationSubscriptions
DescribeResourcePermissions
DescribeRootFolders
DescribeUsers
SearchResources

Operations

AbortDocumentVersionUpload

$result = $client->abortDocumentVersionUpload([/* ... */]);
$promise = $client->abortDocumentVersionUploadAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->abortDocumentVersionUpload([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'VersionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

VersionId
Required: Yes
Type: string

The ID of the version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ConcurrentModificationException:

The resource hierarchy is changing.

ActivateUser

$result = $client->activateUser([/* ... */]);
$promise = $client->activateUserAsync([/* ... */]);

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

Parameter Syntax

$result = $client->activateUser([
    'AuthenticationToken' => '<string>',
    'UserId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

UserId
Required: Yes
Type: string

The ID of the user.

Result Syntax

[
    'User' => [
        'CreatedTimestamp' => <DateTime>,
        'EmailAddress' => '<string>',
        'GivenName' => '<string>',
        'Id' => '<string>',
        'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
        'ModifiedTimestamp' => <DateTime>,
        'OrganizationId' => '<string>',
        'RecycleBinFolderId' => '<string>',
        'RootFolderId' => '<string>',
        'Status' => 'ACTIVE|INACTIVE|PENDING',
        'Storage' => [
            'StorageRule' => [
                'StorageAllocatedInBytes' => <integer>,
                'StorageType' => 'UNLIMITED|QUOTA',
            ],
            'StorageUtilizedInBytes' => <integer>,
        ],
        'Surname' => '<string>',
        'TimeZoneId' => '<string>',
        'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
        'Username' => '<string>',
    ],
]

Result Details

Members
User
Type: User structure

The user information.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

AddResourcePermissions

$result = $client->addResourcePermissions([/* ... */]);
$promise = $client->addResourcePermissionsAsync([/* ... */]);

Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.

Parameter Syntax

$result = $client->addResourcePermissions([
    'AuthenticationToken' => '<string>',
    'NotificationOptions' => [
        'EmailMessage' => '<string>',
        'SendEmail' => true || false,
    ],
    'Principals' => [ // REQUIRED
        [
            'Id' => '<string>', // REQUIRED
            'Role' => 'VIEWER|CONTRIBUTOR|OWNER|COOWNER', // REQUIRED
            'Type' => 'USER|GROUP|INVITE|ANONYMOUS|ORGANIZATION', // REQUIRED
        ],
        // ...
    ],
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

NotificationOptions
Type: NotificationOptions structure

The notification options.

Principals
Required: Yes
Type: Array of SharePrincipal structures

The users, groups, or organization being granted permission.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[
    'ShareResults' => [
        [
            'InviteePrincipalId' => '<string>',
            'PrincipalId' => '<string>',
            'Role' => 'VIEWER|CONTRIBUTOR|OWNER|COOWNER',
            'ShareId' => '<string>',
            'Status' => 'SUCCESS|FAILURE',
            'StatusMessage' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ShareResults
Type: Array of ShareResult structures

The share results.

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

CreateComment

$result = $client->createComment([/* ... */]);
$promise = $client->createCommentAsync([/* ... */]);

Adds a new comment to the specified document version.

Parameter Syntax

$result = $client->createComment([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'NotifyCollaborators' => true || false,
    'ParentId' => '<string>',
    'Text' => '<string>', // REQUIRED
    'ThreadId' => '<string>',
    'VersionId' => '<string>', // REQUIRED
    'Visibility' => 'PUBLIC|PRIVATE',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

NotifyCollaborators
Type: boolean

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

ParentId
Type: string

The ID of the parent comment.

Text
Required: Yes
Type: string

The text of the comment.

ThreadId
Type: string

The ID of the root comment in the thread.

VersionId
Required: Yes
Type: string

The ID of the document version.

Visibility
Type: 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.

Result Syntax

[
    'Comment' => [
        'CommentId' => '<string>',
        'Contributor' => [
            'CreatedTimestamp' => <DateTime>,
            'EmailAddress' => '<string>',
            'GivenName' => '<string>',
            'Id' => '<string>',
            'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
            'ModifiedTimestamp' => <DateTime>,
            'OrganizationId' => '<string>',
            'RecycleBinFolderId' => '<string>',
            'RootFolderId' => '<string>',
            'Status' => 'ACTIVE|INACTIVE|PENDING',
            'Storage' => [
                'StorageRule' => [
                    'StorageAllocatedInBytes' => <integer>,
                    'StorageType' => 'UNLIMITED|QUOTA',
                ],
                'StorageUtilizedInBytes' => <integer>,
            ],
            'Surname' => '<string>',
            'TimeZoneId' => '<string>',
            'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
            'Username' => '<string>',
        ],
        'CreatedTimestamp' => <DateTime>,
        'ParentId' => '<string>',
        'RecipientId' => '<string>',
        'Status' => 'DRAFT|PUBLISHED|DELETED',
        'Text' => '<string>',
        'ThreadId' => '<string>',
        'Visibility' => 'PUBLIC|PRIVATE',
    ],
]

Result Details

Members
Comment
Type: Comment structure

The comment that has been created.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DocumentLockedForCommentsException:

This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.

InvalidCommentOperationException:

The requested operation is not allowed on the specified comment object.

CreateCustomMetadata

$result = $client->createCustomMetadata([/* ... */]);
$promise = $client->createCustomMetadataAsync([/* ... */]);

Adds one or more custom properties to the specified resource (a folder, document, or version).

Parameter Syntax

$result = $client->createCustomMetadata([
    'AuthenticationToken' => '<string>',
    'CustomMetadata' => ['<string>', ...], // REQUIRED
    'ResourceId' => '<string>', // REQUIRED
    'VersionId' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

CustomMetadata
Required: Yes
Type: Associative array of custom strings keys (CustomMetadataKeyType) to strings

Custom metadata in the form of name-value pairs.

ResourceId
Required: Yes
Type: string

The ID of the resource.

VersionId
Type: string

The ID of the version, if the custom metadata is being added to a document version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

CustomMetadataLimitExceededException:

The limit has been reached on the number of custom properties for the specified resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

CreateFolder

$result = $client->createFolder([/* ... */]);
$promise = $client->createFolderAsync([/* ... */]);

Creates a folder with the specified name and parent folder.

Parameter Syntax

$result = $client->createFolder([
    'AuthenticationToken' => '<string>',
    'Name' => '<string>',
    'ParentFolderId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Name
Type: string

The name of the new folder.

ParentFolderId
Required: Yes
Type: string

The ID of the parent folder.

Result Syntax

[
    'Metadata' => [
        'CreatedTimestamp' => <DateTime>,
        'CreatorId' => '<string>',
        'Id' => '<string>',
        'Labels' => ['<string>', ...],
        'LatestVersionSize' => <integer>,
        'ModifiedTimestamp' => <DateTime>,
        'Name' => '<string>',
        'ParentFolderId' => '<string>',
        'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
        'Signature' => '<string>',
        'Size' => <integer>,
    ],
]

Result Details

Members
Metadata
Type: FolderMetadata structure

The metadata of the folder.

Errors

EntityNotExistsException:

The resource does not exist.

EntityAlreadyExistsException:

The resource already exists.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

CreateLabels

$result = $client->createLabels([/* ... */]);
$promise = $client->createLabelsAsync([/* ... */]);

Adds the specified list of labels to the given resource (a document or folder)

Parameter Syntax

$result = $client->createLabels([
    'AuthenticationToken' => '<string>',
    'Labels' => ['<string>', ...], // REQUIRED
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Labels
Required: Yes
Type: Array of strings

List of labels to add to the resource.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

TooManyLabelsException:

The limit has been reached on the number of labels for the specified resource.

CreateNotificationSubscription

$result = $client->createNotificationSubscription([/* ... */]);
$promise = $client->createNotificationSubscriptionAsync([/* ... */]);

Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.

For more information, see Setting up notifications for an IAM user or role in the Amazon WorkDocs Developer Guide.

Parameter Syntax

$result = $client->createNotificationSubscription([
    'Endpoint' => '<string>', // REQUIRED
    'OrganizationId' => '<string>', // REQUIRED
    'Protocol' => 'HTTPS|SQS', // REQUIRED
    'SubscriptionType' => 'ALL', // REQUIRED
]);

Parameter Details

Members
Endpoint
Required: Yes
Type: string

The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with https.

OrganizationId
Required: Yes
Type: string

The ID of the organization.

Protocol
Required: Yes
Type: string

The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.

SubscriptionType
Required: Yes
Type: string

The notification type.

Result Syntax

[
    'Subscription' => [
        'EndPoint' => '<string>',
        'Protocol' => 'HTTPS|SQS',
        'SubscriptionId' => '<string>',
    ],
]

Result Details

Members
Subscription
Type: Subscription structure

The subscription.

Errors

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

TooManySubscriptionsException:

You've reached the limit on the number of subscriptions for the WorkDocs instance.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

CreateUser

$result = $client->createUser([/* ... */]);
$promise = $client->createUserAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createUser([
    'AuthenticationToken' => '<string>',
    'EmailAddress' => '<string>',
    'GivenName' => '<string>', // REQUIRED
    'OrganizationId' => '<string>',
    'Password' => '<string>', // REQUIRED
    'StorageRule' => [
        'StorageAllocatedInBytes' => <integer>,
        'StorageType' => 'UNLIMITED|QUOTA',
    ],
    'Surname' => '<string>', // REQUIRED
    'TimeZoneId' => '<string>',
    'Username' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

EmailAddress
Type: string

The email address of the user.

GivenName
Required: Yes
Type: string

The given name of the user.

OrganizationId
Type: string

The ID of the organization.

Password
Required: Yes
Type: string

The password of the user.

StorageRule
Type: StorageRuleType structure

The amount of storage for the user.

Surname
Required: Yes
Type: string

The surname of the user.

TimeZoneId
Type: string

The time zone ID of the user.

Username
Required: Yes
Type: string

The login name of the user.

Result Syntax

[
    'User' => [
        'CreatedTimestamp' => <DateTime>,
        'EmailAddress' => '<string>',
        'GivenName' => '<string>',
        'Id' => '<string>',
        'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
        'ModifiedTimestamp' => <DateTime>,
        'OrganizationId' => '<string>',
        'RecycleBinFolderId' => '<string>',
        'RootFolderId' => '<string>',
        'Status' => 'ACTIVE|INACTIVE|PENDING',
        'Storage' => [
            'StorageRule' => [
                'StorageAllocatedInBytes' => <integer>,
                'StorageType' => 'UNLIMITED|QUOTA',
            ],
            'StorageUtilizedInBytes' => <integer>,
        ],
        'Surname' => '<string>',
        'TimeZoneId' => '<string>',
        'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
        'Username' => '<string>',
    ],
]

Result Details

Members
User
Type: User structure

The user information.

Errors

EntityAlreadyExistsException:

The resource already exists.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeactivateUser

$result = $client->deactivateUser([/* ... */]);
$promise = $client->deactivateUserAsync([/* ... */]);

Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.

Parameter Syntax

$result = $client->deactivateUser([
    'AuthenticationToken' => '<string>',
    'UserId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

UserId
Required: Yes
Type: string

The ID of the user.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeleteComment

$result = $client->deleteComment([/* ... */]);
$promise = $client->deleteCommentAsync([/* ... */]);

Deletes the specified comment from the document version.

Parameter Syntax

$result = $client->deleteComment([
    'AuthenticationToken' => '<string>',
    'CommentId' => '<string>', // REQUIRED
    'DocumentId' => '<string>', // REQUIRED
    'VersionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

CommentId
Required: Yes
Type: string

The ID of the comment.

DocumentId
Required: Yes
Type: string

The ID of the document.

VersionId
Required: Yes
Type: string

The ID of the document version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DocumentLockedForCommentsException:

This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.

DeleteCustomMetadata

$result = $client->deleteCustomMetadata([/* ... */]);
$promise = $client->deleteCustomMetadataAsync([/* ... */]);

Deletes custom metadata from the specified resource.

Parameter Syntax

$result = $client->deleteCustomMetadata([
    'AuthenticationToken' => '<string>',
    'DeleteAll' => true || false,
    'Keys' => ['<string>', ...],
    'ResourceId' => '<string>', // REQUIRED
    'VersionId' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DeleteAll
Type: boolean

Flag to indicate removal of all custom metadata properties from the specified resource.

Keys
Type: Array of strings

List of properties to remove.

ResourceId
Required: Yes
Type: string

The ID of the resource, either a document or folder.

VersionId
Type: string

The ID of the version, if the custom metadata is being deleted from a document version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeleteDocument

$result = $client->deleteDocument([/* ... */]);
$promise = $client->deleteDocumentAsync([/* ... */]);

Permanently deletes the specified document and its associated metadata.

Parameter Syntax

$result = $client->deleteDocument([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeleteDocumentVersion

$result = $client->deleteDocumentVersion([/* ... */]);
$promise = $client->deleteDocumentVersionAsync([/* ... */]);

Deletes a specific version of a document.

Parameter Syntax

$result = $client->deleteDocumentVersion([
    'AuthenticationToken' => '<string>',
    'DeletePriorVersions' => true || false, // REQUIRED
    'DocumentId' => '<string>', // REQUIRED
    'VersionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DeletePriorVersions
Required: Yes
Type: boolean

Deletes all versions of a document prior to the current version.

DocumentId
Required: Yes
Type: string

The ID of the document associated with the version being deleted.

VersionId
Required: Yes
Type: string

The ID of the version being deleted.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

InvalidOperationException:

The operation is invalid.

UnauthorizedOperationException:

The operation is not permitted.

DeleteFolder

$result = $client->deleteFolder([/* ... */]);
$promise = $client->deleteFolderAsync([/* ... */]);

Permanently deletes the specified folder and its contents.

Parameter Syntax

$result = $client->deleteFolder([
    'AuthenticationToken' => '<string>',
    'FolderId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

FolderId
Required: Yes
Type: string

The ID of the folder.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeleteFolderContents

$result = $client->deleteFolderContents([/* ... */]);
$promise = $client->deleteFolderContentsAsync([/* ... */]);

Deletes the contents of the specified folder.

Parameter Syntax

$result = $client->deleteFolderContents([
    'AuthenticationToken' => '<string>',
    'FolderId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

FolderId
Required: Yes
Type: string

The ID of the folder.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeleteLabels

$result = $client->deleteLabels([/* ... */]);
$promise = $client->deleteLabelsAsync([/* ... */]);

Deletes the specified list of labels from a resource.

Parameter Syntax

$result = $client->deleteLabels([
    'AuthenticationToken' => '<string>',
    'DeleteAll' => true || false,
    'Labels' => ['<string>', ...],
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DeleteAll
Type: boolean

Flag to request removal of all labels from the specified resource.

Labels
Type: Array of strings

List of labels to delete from the resource.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

DeleteNotificationSubscription

$result = $client->deleteNotificationSubscription([/* ... */]);
$promise = $client->deleteNotificationSubscriptionAsync([/* ... */]);

Deletes the specified subscription from the specified organization.

Parameter Syntax

$result = $client->deleteNotificationSubscription([
    'OrganizationId' => '<string>', // REQUIRED
    'SubscriptionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
OrganizationId
Required: Yes
Type: string

The ID of the organization.

SubscriptionId
Required: Yes
Type: string

The ID of the subscription.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

EntityNotExistsException:

The resource does not exist.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

DeleteUser

$result = $client->deleteUser([/* ... */]);
$promise = $client->deleteUserAsync([/* ... */]);

Deletes the specified user from a Simple AD or Microsoft AD directory.

Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion.

Parameter Syntax

$result = $client->deleteUser([
    'AuthenticationToken' => '<string>',
    'UserId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

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

UserId
Required: Yes
Type: string

The ID of the user.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeActivities

$result = $client->describeActivities([/* ... */]);
$promise = $client->describeActivitiesAsync([/* ... */]);

Describes the user activities in a specified time period.

Parameter Syntax

$result = $client->describeActivities([
    'ActivityTypes' => '<string>',
    'AuthenticationToken' => '<string>',
    'EndTime' => <integer || string || DateTime>,
    'IncludeIndirectActivities' => true || false,
    'Limit' => <integer>,
    'Marker' => '<string>',
    'OrganizationId' => '<string>',
    'ResourceId' => '<string>',
    'StartTime' => <integer || string || DateTime>,
    'UserId' => '<string>',
]);

Parameter Details

Members
ActivityTypes
Type: string

Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.

AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

EndTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

IncludeIndirectActivities
Type: boolean

Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).

Limit
Type: int

The maximum number of items to return.

Marker
Type: string

The marker for the next set of results.

OrganizationId
Type: string

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

ResourceId
Type: string

The document or folder ID for which to describe activity types.

StartTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

UserId
Type: string

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.

Result Syntax

[
    'Marker' => '<string>',
    'UserActivities' => [
        [
            'CommentMetadata' => [
                'CommentId' => '<string>',
                'CommentStatus' => 'DRAFT|PUBLISHED|DELETED',
                'Contributor' => [
                    'CreatedTimestamp' => <DateTime>,
                    'EmailAddress' => '<string>',
                    'GivenName' => '<string>',
                    'Id' => '<string>',
                    'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
                    'ModifiedTimestamp' => <DateTime>,
                    'OrganizationId' => '<string>',
                    'RecycleBinFolderId' => '<string>',
                    'RootFolderId' => '<string>',
                    'Status' => 'ACTIVE|INACTIVE|PENDING',
                    'Storage' => [
                        'StorageRule' => [
                            'StorageAllocatedInBytes' => <integer>,
                            'StorageType' => 'UNLIMITED|QUOTA',
                        ],
                        'StorageUtilizedInBytes' => <integer>,
                    ],
                    'Surname' => '<string>',
                    'TimeZoneId' => '<string>',
                    'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
                    'Username' => '<string>',
                ],
                'ContributorId' => '<string>',
                'CreatedTimestamp' => <DateTime>,
                'RecipientId' => '<string>',
            ],
            'Initiator' => [
                'EmailAddress' => '<string>',
                'GivenName' => '<string>',
                'Id' => '<string>',
                'Surname' => '<string>',
                'Username' => '<string>',
            ],
            'IsIndirectActivity' => true || false,
            'OrganizationId' => '<string>',
            'OriginalParent' => [
                'Id' => '<string>',
                'Name' => '<string>',
                'OriginalName' => '<string>',
                'Owner' => [
                    'EmailAddress' => '<string>',
                    'GivenName' => '<string>',
                    'Id' => '<string>',
                    'Surname' => '<string>',
                    'Username' => '<string>',
                ],
                'ParentId' => '<string>',
                'Type' => 'FOLDER|DOCUMENT',
                'VersionId' => '<string>',
            ],
            'Participants' => [
                'Groups' => [
                    [
                        'Id' => '<string>',
                        'Name' => '<string>',
                    ],
                    // ...
                ],
                'Users' => [
                    [
                        'EmailAddress' => '<string>',
                        'GivenName' => '<string>',
                        'Id' => '<string>',
                        'Surname' => '<string>',
                        'Username' => '<string>',
                    ],
                    // ...
                ],
            ],
            'ResourceMetadata' => [
                'Id' => '<string>',
                'Name' => '<string>',
                'OriginalName' => '<string>',
                'Owner' => [
                    'EmailAddress' => '<string>',
                    'GivenName' => '<string>',
                    'Id' => '<string>',
                    'Surname' => '<string>',
                    'Username' => '<string>',
                ],
                'ParentId' => '<string>',
                'Type' => 'FOLDER|DOCUMENT',
                'VersionId' => '<string>',
            ],
            'TimeStamp' => <DateTime>,
            'Type' => 'DOCUMENT_CHECKED_IN|DOCUMENT_CHECKED_OUT|DOCUMENT_RENAMED|DOCUMENT_VERSION_UPLOADED|DOCUMENT_VERSION_DELETED|DOCUMENT_VERSION_VIEWED|DOCUMENT_VERSION_DOWNLOADED|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',
        ],
        // ...
    ],
]

Result Details

Members
Marker
Type: string

The marker for the next set of results.

UserActivities
Type: Array of Activity structures

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

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeComments

$result = $client->describeComments([/* ... */]);
$promise = $client->describeCommentsAsync([/* ... */]);

List all the comments for the specified document version.

Parameter Syntax

$result = $client->describeComments([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'Limit' => <integer>,
    'Marker' => '<string>',
    'VersionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Limit
Type: int

The maximum number of items to return.

Marker
Type: string

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

VersionId
Required: Yes
Type: string

The ID of the document version.

Result Syntax

[
    'Comments' => [
        [
            'CommentId' => '<string>',
            'Contributor' => [
                'CreatedTimestamp' => <DateTime>,
                'EmailAddress' => '<string>',
                'GivenName' => '<string>',
                'Id' => '<string>',
                'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
                'ModifiedTimestamp' => <DateTime>,
                'OrganizationId' => '<string>',
                'RecycleBinFolderId' => '<string>',
                'RootFolderId' => '<string>',
                'Status' => 'ACTIVE|INACTIVE|PENDING',
                'Storage' => [
                    'StorageRule' => [
                        'StorageAllocatedInBytes' => <integer>,
                        'StorageType' => 'UNLIMITED|QUOTA',
                    ],
                    'StorageUtilizedInBytes' => <integer>,
                ],
                'Surname' => '<string>',
                'TimeZoneId' => '<string>',
                'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
                'Username' => '<string>',
            ],
            'CreatedTimestamp' => <DateTime>,
            'ParentId' => '<string>',
            'RecipientId' => '<string>',
            'Status' => 'DRAFT|PUBLISHED|DELETED',
            'Text' => '<string>',
            'ThreadId' => '<string>',
            'Visibility' => 'PUBLIC|PRIVATE',
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Comments
Type: Array of Comment structures

The list of comments for the specified document version.

Marker
Type: string

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

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeDocumentVersions

$result = $client->describeDocumentVersions([/* ... */]);
$promise = $client->describeDocumentVersionsAsync([/* ... */]);

Retrieves the document versions for the specified document.

By default, only active versions are returned.

Parameter Syntax

$result = $client->describeDocumentVersions([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'Fields' => '<string>',
    'Include' => '<string>',
    'Limit' => <integer>,
    'Marker' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Fields
Type: string

Specify "SOURCE" to include initialized versions and a URL for the source document.

Include
Type: string

A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.

Limit
Type: int

The maximum number of versions to return with this call.

Marker
Type: string

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

Result Syntax

[
    'DocumentVersions' => [
        [
            'ContentCreatedTimestamp' => <DateTime>,
            'ContentModifiedTimestamp' => <DateTime>,
            'ContentType' => '<string>',
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'Signature' => '<string>',
            'Size' => <integer>,
            'Source' => ['<string>', ...],
            'Status' => 'INITIALIZED|ACTIVE',
            'Thumbnail' => ['<string>', ...],
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
DocumentVersions
Type: Array of DocumentVersionMetadata structures

The document versions.

Marker
Type: string

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

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

InvalidPasswordException:

The password is invalid.

DescribeFolderContents

$result = $client->describeFolderContents([/* ... */]);
$promise = $client->describeFolderContentsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeFolderContents([
    'AuthenticationToken' => '<string>',
    'FolderId' => '<string>', // REQUIRED
    'Include' => '<string>',
    'Limit' => <integer>,
    'Marker' => '<string>',
    'Order' => 'ASCENDING|DESCENDING',
    'Sort' => 'DATE|NAME',
    'Type' => 'ALL|DOCUMENT|FOLDER',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

FolderId
Required: Yes
Type: string

The ID of the folder.

Include
Type: string

The contents to include. Specify "INITIALIZED" to include initialized documents.

Limit
Type: int

The maximum number of items to return with this call.

Marker
Type: string

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

Order
Type: string

The order for the contents of the folder.

Sort
Type: string

The sorting criteria.

Type
Type: string

The type of items.

Result Syntax

[
    'Documents' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'Labels' => ['<string>', ...],
            'LatestVersionMetadata' => [
                'ContentCreatedTimestamp' => <DateTime>,
                'ContentModifiedTimestamp' => <DateTime>,
                'ContentType' => '<string>',
                'CreatedTimestamp' => <DateTime>,
                'CreatorId' => '<string>',
                'Id' => '<string>',
                'ModifiedTimestamp' => <DateTime>,
                'Name' => '<string>',
                'Signature' => '<string>',
                'Size' => <integer>,
                'Source' => ['<string>', ...],
                'Status' => 'INITIALIZED|ACTIVE',
                'Thumbnail' => ['<string>', ...],
            ],
            'ModifiedTimestamp' => <DateTime>,
            'ParentFolderId' => '<string>',
            'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
        ],
        // ...
    ],
    'Folders' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'Labels' => ['<string>', ...],
            'LatestVersionSize' => <integer>,
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'ParentFolderId' => '<string>',
            'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
            'Signature' => '<string>',
            'Size' => <integer>,
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Documents
Type: Array of DocumentMetadata structures

The documents in the specified folder.

Folders
Type: Array of FolderMetadata structures

The subfolders in the specified folder.

Marker
Type: string

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

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

DescribeGroups

$result = $client->describeGroups([/* ... */]);
$promise = $client->describeGroupsAsync([/* ... */]);

Describes the groups specified by the query. Groups are defined by the underlying Active Directory.

Parameter Syntax

$result = $client->describeGroups([
    'AuthenticationToken' => '<string>',
    'Limit' => <integer>,
    'Marker' => '<string>',
    'OrganizationId' => '<string>',
    'SearchQuery' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Limit
Type: int

The maximum number of items to return with this call.

Marker
Type: string

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

OrganizationId
Type: string

The ID of the organization.

SearchQuery
Required: Yes
Type: string

A query to describe groups by group name.

Result Syntax

[
    'Groups' => [
        [
            'Id' => '<string>',
            'Name' => '<string>',
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Groups
Type: Array of GroupMetadata structures

The list of groups.

Marker
Type: string

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

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeNotificationSubscriptions

$result = $client->describeNotificationSubscriptions([/* ... */]);
$promise = $client->describeNotificationSubscriptionsAsync([/* ... */]);

Lists the specified notification subscriptions.

Parameter Syntax

$result = $client->describeNotificationSubscriptions([
    'Limit' => <integer>,
    'Marker' => '<string>',
    'OrganizationId' => '<string>', // REQUIRED
]);

Parameter Details

Members
Limit
Type: int

The maximum number of items to return with this call.

Marker
Type: string

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

OrganizationId
Required: Yes
Type: string

The ID of the organization.

Result Syntax

[
    'Marker' => '<string>',
    'Subscriptions' => [
        [
            'EndPoint' => '<string>',
            'Protocol' => 'HTTPS|SQS',
            'SubscriptionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Marker
Type: string

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

Subscriptions
Type: Array of Subscription structures

The subscriptions.

Errors

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

EntityNotExistsException:

The resource does not exist.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeResourcePermissions

$result = $client->describeResourcePermissions([/* ... */]);
$promise = $client->describeResourcePermissionsAsync([/* ... */]);

Describes the permissions of a specified resource.

Parameter Syntax

$result = $client->describeResourcePermissions([
    'AuthenticationToken' => '<string>',
    'Limit' => <integer>,
    'Marker' => '<string>',
    'PrincipalId' => '<string>',
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Limit
Type: int

The maximum number of items to return with this call.

Marker
Type: string

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

PrincipalId
Type: string

The ID of the principal to filter permissions by.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[
    'Marker' => '<string>',
    'Principals' => [
        [
            'Id' => '<string>',
            'Roles' => [
                [
                    'Role' => 'VIEWER|CONTRIBUTOR|OWNER|COOWNER',
                    'Type' => 'DIRECT|INHERITED',
                ],
                // ...
            ],
            'Type' => 'USER|GROUP|INVITE|ANONYMOUS|ORGANIZATION',
        ],
        // ...
    ],
]

Result Details

Members
Marker
Type: string

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

Principals
Type: Array of Principal structures

The principals.

Errors

InvalidArgumentException:

The pagination marker or limit fields are not valid.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeRootFolders

$result = $client->describeRootFolders([/* ... */]);
$promise = $client->describeRootFoldersAsync([/* ... */]);

Describes the current user's special folders; the RootFolder and the RecycleBin. RootFolder is the root of user's files and folders and RecycleBin is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.

This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.

Parameter Syntax

$result = $client->describeRootFolders([
    'AuthenticationToken' => '<string>', // REQUIRED
    'Limit' => <integer>,
    'Marker' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Required: Yes
Type: string

Amazon WorkDocs authentication token.

Limit
Type: int

The maximum number of items to return.

Marker
Type: string

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

Result Syntax

[
    'Folders' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'Labels' => ['<string>', ...],
            'LatestVersionSize' => <integer>,
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'ParentFolderId' => '<string>',
            'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
            'Signature' => '<string>',
            'Size' => <integer>,
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Folders
Type: Array of FolderMetadata structures

The user's special folders.

Marker
Type: string

The marker for the next set of results.

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DescribeUsers

$result = $client->describeUsers([/* ... */]);
$promise = $client->describeUsersAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->describeUsers([
    'AuthenticationToken' => '<string>',
    'Fields' => '<string>',
    'Include' => 'ALL|ACTIVE_PENDING',
    'Limit' => <integer>,
    'Marker' => '<string>',
    'Order' => 'ASCENDING|DESCENDING',
    'OrganizationId' => '<string>',
    'Query' => '<string>',
    'Sort' => 'USER_NAME|FULL_NAME|STORAGE_LIMIT|USER_STATUS|STORAGE_USED',
    'UserIds' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Fields
Type: string

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

Include
Type: string

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

Limit
Type: int

The maximum number of items to return.

Marker
Type: string

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

Order
Type: string

The order for the results.

OrganizationId
Type: string

The ID of the organization.

Query
Type: string

A query to filter users by user name. Remember the following about the Userids and Query parameters:

  • If you don't use either parameter, the API returns a paginated list of all users on the site.

  • If you use both parameters, the API ignores the Query parameter.

  • The Userid parameter only returns user names that match a corresponding user ID.

  • The Query parameter runs a "prefix" search for users by the GivenName, SurName, or UserName fields included in a CreateUser API call. For example, querying on Ma returns Márcia Oliveira, María García, and Mateo Jackson. If you use multiple characters, the API only returns data that matches all characters. For example, querying on Ma J only returns Mateo Jackson.

Sort
Type: string

The sorting criteria.

UserIds
Type: string

The IDs of the users.

Result Syntax

[
    'Marker' => '<string>',
    'TotalNumberOfUsers' => <integer>,
    'Users' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'EmailAddress' => '<string>',
            'GivenName' => '<string>',
            'Id' => '<string>',
            'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
            'ModifiedTimestamp' => <DateTime>,
            'OrganizationId' => '<string>',
            'RecycleBinFolderId' => '<string>',
            'RootFolderId' => '<string>',
            'Status' => 'ACTIVE|INACTIVE|PENDING',
            'Storage' => [
                'StorageRule' => [
                    'StorageAllocatedInBytes' => <integer>,
                    'StorageType' => 'UNLIMITED|QUOTA',
                ],
                'StorageUtilizedInBytes' => <integer>,
            ],
            'Surname' => '<string>',
            'TimeZoneId' => '<string>',
            'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
            'Username' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
Marker
Type: string

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

TotalNumberOfUsers
Type: long (int|float)

The total number of users included in the results.

Users
Type: Array of User structures

The users.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

RequestedEntityTooLargeException:

The response is too large to return. The request must include a filter to reduce the size of the response.

GetCurrentUser

$result = $client->getCurrentUser([/* ... */]);
$promise = $client->getCurrentUserAsync([/* ... */]);

Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.

This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.

Parameter Syntax

$result = $client->getCurrentUser([
    'AuthenticationToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Required: Yes
Type: string

Amazon WorkDocs authentication token.

Result Syntax

[
    'User' => [
        'CreatedTimestamp' => <DateTime>,
        'EmailAddress' => '<string>',
        'GivenName' => '<string>',
        'Id' => '<string>',
        'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
        'ModifiedTimestamp' => <DateTime>,
        'OrganizationId' => '<string>',
        'RecycleBinFolderId' => '<string>',
        'RootFolderId' => '<string>',
        'Status' => 'ACTIVE|INACTIVE|PENDING',
        'Storage' => [
            'StorageRule' => [
                'StorageAllocatedInBytes' => <integer>,
                'StorageType' => 'UNLIMITED|QUOTA',
            ],
            'StorageUtilizedInBytes' => <integer>,
        ],
        'Surname' => '<string>',
        'TimeZoneId' => '<string>',
        'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
        'Username' => '<string>',
    ],
]

Result Details

Members
User
Type: User structure

Metadata of the user.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

GetDocument

$result = $client->getDocument([/* ... */]);
$promise = $client->getDocumentAsync([/* ... */]);

Retrieves details of a document.

Parameter Syntax

$result = $client->getDocument([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'IncludeCustomMetadata' => true || false,
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

IncludeCustomMetadata
Type: boolean

Set this to TRUE to include custom metadata in the response.

Result Syntax

[
    'CustomMetadata' => ['<string>', ...],
    'Metadata' => [
        'CreatedTimestamp' => <DateTime>,
        'CreatorId' => '<string>',
        'Id' => '<string>',
        'Labels' => ['<string>', ...],
        'LatestVersionMetadata' => [
            'ContentCreatedTimestamp' => <DateTime>,
            'ContentModifiedTimestamp' => <DateTime>,
            'ContentType' => '<string>',
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'Signature' => '<string>',
            'Size' => <integer>,
            'Source' => ['<string>', ...],
            'Status' => 'INITIALIZED|ACTIVE',
            'Thumbnail' => ['<string>', ...],
        ],
        'ModifiedTimestamp' => <DateTime>,
        'ParentFolderId' => '<string>',
        'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
    ],
]

Result Details

Members
CustomMetadata
Type: Associative array of custom strings keys (CustomMetadataKeyType) to strings

The custom metadata on the document.

Metadata
Type: DocumentMetadata structure

The metadata details of the document.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

InvalidPasswordException:

The password is invalid.

GetDocumentPath

$result = $client->getDocumentPath([/* ... */]);
$promise = $client->getDocumentPathAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getDocumentPath([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'Fields' => '<string>',
    'Limit' => <integer>,
    'Marker' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Fields
Type: string

A comma-separated list of values. Specify NAME to include the names of the parent folders.

Limit
Type: int

The maximum number of levels in the hierarchy to return.

Marker
Type: string

This value is not supported.

Result Syntax

[
    'Path' => [
        'Components' => [
            [
                'Id' => '<string>',
                'Name' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
Path
Type: ResourcePath structure

The path information.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

GetDocumentVersion

$result = $client->getDocumentVersion([/* ... */]);
$promise = $client->getDocumentVersionAsync([/* ... */]);

Retrieves version metadata for the specified document.

Parameter Syntax

$result = $client->getDocumentVersion([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'Fields' => '<string>',
    'IncludeCustomMetadata' => true || false,
    'VersionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Fields
Type: string

A comma-separated list of values. Specify "SOURCE" to include a URL for the source document.

IncludeCustomMetadata
Type: boolean

Set this to TRUE to include custom metadata in the response.

VersionId
Required: Yes
Type: string

The version ID of the document.

Result Syntax

[
    'CustomMetadata' => ['<string>', ...],
    'Metadata' => [
        'ContentCreatedTimestamp' => <DateTime>,
        'ContentModifiedTimestamp' => <DateTime>,
        'ContentType' => '<string>',
        'CreatedTimestamp' => <DateTime>,
        'CreatorId' => '<string>',
        'Id' => '<string>',
        'ModifiedTimestamp' => <DateTime>,
        'Name' => '<string>',
        'Signature' => '<string>',
        'Size' => <integer>,
        'Source' => ['<string>', ...],
        'Status' => 'INITIALIZED|ACTIVE',
        'Thumbnail' => ['<string>', ...],
    ],
]

Result Details

Members
CustomMetadata
Type: Associative array of custom strings keys (CustomMetadataKeyType) to strings

The custom metadata on the document version.

Metadata
Type: DocumentVersionMetadata structure

The version metadata.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

InvalidPasswordException:

The password is invalid.

GetFolder

$result = $client->getFolder([/* ... */]);
$promise = $client->getFolderAsync([/* ... */]);

Retrieves the metadata of the specified folder.

Parameter Syntax

$result = $client->getFolder([
    'AuthenticationToken' => '<string>',
    'FolderId' => '<string>', // REQUIRED
    'IncludeCustomMetadata' => true || false,
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

FolderId
Required: Yes
Type: string

The ID of the folder.

IncludeCustomMetadata
Type: boolean

Set to TRUE to include custom metadata in the response.

Result Syntax

[
    'CustomMetadata' => ['<string>', ...],
    'Metadata' => [
        'CreatedTimestamp' => <DateTime>,
        'CreatorId' => '<string>',
        'Id' => '<string>',
        'Labels' => ['<string>', ...],
        'LatestVersionSize' => <integer>,
        'ModifiedTimestamp' => <DateTime>,
        'Name' => '<string>',
        'ParentFolderId' => '<string>',
        'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
        'Signature' => '<string>',
        'Size' => <integer>,
    ],
]

Result Details

Members
CustomMetadata
Type: Associative array of custom strings keys (CustomMetadataKeyType) to strings

The custom metadata on the folder.

Metadata
Type: FolderMetadata structure

The metadata of the folder.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

GetFolderPath

$result = $client->getFolderPath([/* ... */]);
$promise = $client->getFolderPathAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getFolderPath([
    'AuthenticationToken' => '<string>',
    'Fields' => '<string>',
    'FolderId' => '<string>', // REQUIRED
    'Limit' => <integer>,
    'Marker' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Fields
Type: string

A comma-separated list of values. Specify "NAME" to include the names of the parent folders.

FolderId
Required: Yes
Type: string

The ID of the folder.

Limit
Type: int

The maximum number of levels in the hierarchy to return.

Marker
Type: string

This value is not supported.

Result Syntax

[
    'Path' => [
        'Components' => [
            [
                'Id' => '<string>',
                'Name' => '<string>',
            ],
            // ...
        ],
    ],
]

Result Details

Members
Path
Type: ResourcePath structure

The path information.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

GetResources

$result = $client->getResources([/* ... */]);
$promise = $client->getResourcesAsync([/* ... */]);

Retrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME.

Parameter Syntax

$result = $client->getResources([
    'AuthenticationToken' => '<string>',
    'CollectionType' => 'SHARED_WITH_ME',
    'Limit' => <integer>,
    'Marker' => '<string>',
    'UserId' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

The Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

CollectionType
Type: string

The collection type.

Limit
Type: int

The maximum number of resources to return.

Marker
Type: string

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

UserId
Type: string

The user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials.

Result Syntax

[
    'Documents' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'Labels' => ['<string>', ...],
            'LatestVersionMetadata' => [
                'ContentCreatedTimestamp' => <DateTime>,
                'ContentModifiedTimestamp' => <DateTime>,
                'ContentType' => '<string>',
                'CreatedTimestamp' => <DateTime>,
                'CreatorId' => '<string>',
                'Id' => '<string>',
                'ModifiedTimestamp' => <DateTime>,
                'Name' => '<string>',
                'Signature' => '<string>',
                'Size' => <integer>,
                'Source' => ['<string>', ...],
                'Status' => 'INITIALIZED|ACTIVE',
                'Thumbnail' => ['<string>', ...],
            ],
            'ModifiedTimestamp' => <DateTime>,
            'ParentFolderId' => '<string>',
            'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
        ],
        // ...
    ],
    'Folders' => [
        [
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'Labels' => ['<string>', ...],
            'LatestVersionSize' => <integer>,
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'ParentFolderId' => '<string>',
            'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
            'Signature' => '<string>',
            'Size' => <integer>,
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Documents
Type: Array of DocumentMetadata structures

The documents in the specified collection.

Folders
Type: Array of FolderMetadata structures

The folders in the specified folder.

Marker
Type: string

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

Errors

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

UnauthorizedOperationException:

The operation is not permitted.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

InitiateDocumentVersionUpload

$result = $client->initiateDocumentVersionUpload([/* ... */]);
$promise = $client->initiateDocumentVersionUploadAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->initiateDocumentVersionUpload([
    'AuthenticationToken' => '<string>',
    'ContentCreatedTimestamp' => <integer || string || DateTime>,
    'ContentModifiedTimestamp' => <integer || string || DateTime>,
    'ContentType' => '<string>',
    'DocumentSizeInBytes' => <integer>,
    'Id' => '<string>',
    'Name' => '<string>',
    'ParentFolderId' => '<string>',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

ContentCreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the content of the document was originally created.

ContentModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the content of the document was modified.

ContentType
Type: string

The content type of the document.

DocumentSizeInBytes
Type: long (int|float)

The size of the document, in bytes.

Id
Type: string

The ID of the document.

Name
Type: string

The name of the document.

ParentFolderId
Type: string

The ID of the parent folder.

Result Syntax

[
    'Metadata' => [
        'CreatedTimestamp' => <DateTime>,
        'CreatorId' => '<string>',
        'Id' => '<string>',
        'Labels' => ['<string>', ...],
        'LatestVersionMetadata' => [
            'ContentCreatedTimestamp' => <DateTime>,
            'ContentModifiedTimestamp' => <DateTime>,
            'ContentType' => '<string>',
            'CreatedTimestamp' => <DateTime>,
            'CreatorId' => '<string>',
            'Id' => '<string>',
            'ModifiedTimestamp' => <DateTime>,
            'Name' => '<string>',
            'Signature' => '<string>',
            'Size' => <integer>,
            'Source' => ['<string>', ...],
            'Status' => 'INITIALIZED|ACTIVE',
            'Thumbnail' => ['<string>', ...],
        ],
        'ModifiedTimestamp' => <DateTime>,
        'ParentFolderId' => '<string>',
        'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
    ],
    'UploadMetadata' => [
        'SignedHeaders' => ['<string>', ...],
        'UploadUrl' => '<string>',
    ],
]

Result Details

Members
Metadata
Type: DocumentMetadata structure

The document metadata.

UploadMetadata
Type: UploadMetadata structure

The upload metadata.

Errors

EntityNotExistsException:

The resource does not exist.

EntityAlreadyExistsException:

The resource already exists.

StorageLimitExceededException:

The storage limit has been exceeded.

StorageLimitWillExceedException:

The storage limit will be exceeded.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DraftUploadOutOfSyncException:

This exception is thrown when a valid checkout ID is not presented on document version upload calls for a document that has been checked out from Web client.

ResourceAlreadyCheckedOutException:

The resource is already checked out.

InvalidPasswordException:

The password is invalid.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

RemoveAllResourcePermissions

$result = $client->removeAllResourcePermissions([/* ... */]);
$promise = $client->removeAllResourcePermissionsAsync([/* ... */]);

Removes all the permissions from the specified resource.

Parameter Syntax

$result = $client->removeAllResourcePermissions([
    'AuthenticationToken' => '<string>',
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

RemoveResourcePermission

$result = $client->removeResourcePermission([/* ... */]);
$promise = $client->removeResourcePermissionAsync([/* ... */]);

Removes the permission for the specified principal from the specified resource.

Parameter Syntax

$result = $client->removeResourcePermission([
    'AuthenticationToken' => '<string>',
    'PrincipalId' => '<string>', // REQUIRED
    'PrincipalType' => 'USER|GROUP|INVITE|ANONYMOUS|ORGANIZATION',
    'ResourceId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

PrincipalId
Required: Yes
Type: string

The principal ID of the resource.

PrincipalType
Type: string

The principal type of the resource.

ResourceId
Required: Yes
Type: string

The ID of the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

RestoreDocumentVersions

$result = $client->restoreDocumentVersions([/* ... */]);
$promise = $client->restoreDocumentVersionsAsync([/* ... */]);

Recovers a deleted version of an Amazon WorkDocs document.

Parameter Syntax

$result = $client->restoreDocumentVersions([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

InvalidOperationException:

The operation is invalid.

UnauthorizedOperationException:

The operation is not permitted.

SearchResources

$result = $client->searchResources([/* ... */]);
$promise = $client->searchResourcesAsync([/* ... */]);

Searches metadata and the content of folders, documents, document versions, and comments.

Parameter Syntax

$result = $client->searchResources([
    'AdditionalResponseFields' => ['<string>', ...],
    'AuthenticationToken' => '<string>',
    'Filters' => [
        'AncestorIds' => ['<string>', ...],
        'ContentCategories' => ['<string>', ...],
        'CreatedRange' => [
            'EndValue' => <integer || string || DateTime>,
            'StartValue' => <integer || string || DateTime>,
        ],
        'Labels' => ['<string>', ...],
        'ModifiedRange' => [
            'EndValue' => <integer || string || DateTime>,
            'StartValue' => <integer || string || DateTime>,
        ],
        'Principals' => [
            [
                'Id' => '<string>', // REQUIRED
                'Roles' => ['<string>', ...],
            ],
            // ...
        ],
        'ResourceTypes' => ['<string>', ...],
        'SearchCollectionTypes' => ['<string>', ...],
        'SizeRange' => [
            'EndValue' => <integer>,
            'StartValue' => <integer>,
        ],
        'TextLocales' => ['<string>', ...],
    ],
    'Limit' => <integer>,
    'Marker' => '<string>',
    'OrderBy' => [
        [
            'Field' => 'RELEVANCE|NAME|SIZE|CREATED_TIMESTAMP|MODIFIED_TIMESTAMP',
            'Order' => 'ASC|DESC',
        ],
        // ...
    ],
    'OrganizationId' => '<string>',
    'QueryScopes' => ['<string>', ...],
    'QueryText' => '<string>',
]);

Parameter Details

Members
AdditionalResponseFields
Type: Array of strings

A list of attributes to include in the response. Used to request fields that are not normally returned in a standard response.

AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

Filters
Type: Filters structure

Filters results based on entity metadata.

Limit
Type: int

Max results count per page.

Marker
Type: string

The marker for the next set of results.

OrderBy
Type: Array of SearchSortResult structures

Order by results in one or more categories.

OrganizationId
Type: string

Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.

QueryScopes
Type: Array of strings

Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content

QueryText
Type: string

The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.

Result Syntax

[
    'Items' => [
        [
            'CommentMetadata' => [
                'CommentId' => '<string>',
                'CommentStatus' => 'DRAFT|PUBLISHED|DELETED',
                'Contributor' => [
                    'CreatedTimestamp' => <DateTime>,
                    'EmailAddress' => '<string>',
                    'GivenName' => '<string>',
                    'Id' => '<string>',
                    'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
                    'ModifiedTimestamp' => <DateTime>,
                    'OrganizationId' => '<string>',
                    'RecycleBinFolderId' => '<string>',
                    'RootFolderId' => '<string>',
                    'Status' => 'ACTIVE|INACTIVE|PENDING',
                    'Storage' => [
                        'StorageRule' => [
                            'StorageAllocatedInBytes' => <integer>,
                            'StorageType' => 'UNLIMITED|QUOTA',
                        ],
                        'StorageUtilizedInBytes' => <integer>,
                    ],
                    'Surname' => '<string>',
                    'TimeZoneId' => '<string>',
                    'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
                    'Username' => '<string>',
                ],
                'ContributorId' => '<string>',
                'CreatedTimestamp' => <DateTime>,
                'RecipientId' => '<string>',
            ],
            'DocumentMetadata' => [
                'CreatedTimestamp' => <DateTime>,
                'CreatorId' => '<string>',
                'Id' => '<string>',
                'Labels' => ['<string>', ...],
                'LatestVersionMetadata' => [
                    'ContentCreatedTimestamp' => <DateTime>,
                    'ContentModifiedTimestamp' => <DateTime>,
                    'ContentType' => '<string>',
                    'CreatedTimestamp' => <DateTime>,
                    'CreatorId' => '<string>',
                    'Id' => '<string>',
                    'ModifiedTimestamp' => <DateTime>,
                    'Name' => '<string>',
                    'Signature' => '<string>',
                    'Size' => <integer>,
                    'Source' => ['<string>', ...],
                    'Status' => 'INITIALIZED|ACTIVE',
                    'Thumbnail' => ['<string>', ...],
                ],
                'ModifiedTimestamp' => <DateTime>,
                'ParentFolderId' => '<string>',
                'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
            ],
            'DocumentVersionMetadata' => [
                'ContentCreatedTimestamp' => <DateTime>,
                'ContentModifiedTimestamp' => <DateTime>,
                'ContentType' => '<string>',
                'CreatedTimestamp' => <DateTime>,
                'CreatorId' => '<string>',
                'Id' => '<string>',
                'ModifiedTimestamp' => <DateTime>,
                'Name' => '<string>',
                'Signature' => '<string>',
                'Size' => <integer>,
                'Source' => ['<string>', ...],
                'Status' => 'INITIALIZED|ACTIVE',
                'Thumbnail' => ['<string>', ...],
            ],
            'FolderMetadata' => [
                'CreatedTimestamp' => <DateTime>,
                'CreatorId' => '<string>',
                'Id' => '<string>',
                'Labels' => ['<string>', ...],
                'LatestVersionSize' => <integer>,
                'ModifiedTimestamp' => <DateTime>,
                'Name' => '<string>',
                'ParentFolderId' => '<string>',
                'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
                'Signature' => '<string>',
                'Size' => <integer>,
            ],
            'ResourceType' => 'DOCUMENT|FOLDER|COMMENT|DOCUMENT_VERSION',
            'WebUrl' => '<string>',
        ],
        // ...
    ],
    'Marker' => '<string>',
]

Result Details

Members
Items
Type: Array of ResponseItem structures

List of Documents, Folders, Comments, and Document Versions matching the query.

Marker
Type: string

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

Errors

InvalidArgumentException:

The pagination marker or limit fields are not valid.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

UnauthorizedOperationException:

The operation is not permitted.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

UpdateDocument

$result = $client->updateDocument([/* ... */]);
$promise = $client->updateDocumentAsync([/* ... */]);

Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.

Parameter Syntax

$result = $client->updateDocument([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'Name' => '<string>',
    'ParentFolderId' => '<string>',
    'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

Name
Type: string

The name of the document.

ParentFolderId
Type: string

The ID of the parent folder.

ResourceState
Type: string

The resource state of the document. Only ACTIVE and RECYCLED are supported.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

EntityAlreadyExistsException:

The resource already exists.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

UpdateDocumentVersion

$result = $client->updateDocumentVersion([/* ... */]);
$promise = $client->updateDocumentVersionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->updateDocumentVersion([
    'AuthenticationToken' => '<string>',
    'DocumentId' => '<string>', // REQUIRED
    'VersionId' => '<string>', // REQUIRED
    'VersionStatus' => 'ACTIVE',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

DocumentId
Required: Yes
Type: string

The ID of the document.

VersionId
Required: Yes
Type: string

The version ID of the document.

VersionStatus
Type: string

The status of the version.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConcurrentModificationException:

The resource hierarchy is changing.

InvalidOperationException:

The operation is invalid.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

UpdateFolder

$result = $client->updateFolder([/* ... */]);
$promise = $client->updateFolderAsync([/* ... */]);

Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.

Parameter Syntax

$result = $client->updateFolder([
    'AuthenticationToken' => '<string>',
    'FolderId' => '<string>', // REQUIRED
    'Name' => '<string>',
    'ParentFolderId' => '<string>',
    'ResourceState' => 'ACTIVE|RESTORING|RECYCLING|RECYCLED',
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

FolderId
Required: Yes
Type: string

The ID of the folder.

Name
Type: string

The name of the folder.

ParentFolderId
Type: string

The ID of the parent folder.

ResourceState
Type: string

The resource state of the folder. Only ACTIVE and RECYCLED are accepted values from the API.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

EntityNotExistsException:

The resource does not exist.

EntityAlreadyExistsException:

The resource already exists.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

ConflictingOperationException:

Another operation is in progress on the resource that conflicts with the current operation.

ConcurrentModificationException:

The resource hierarchy is changing.

LimitExceededException:

The maximum of 100,000 files and folders under the parent folder has been exceeded.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

UpdateUser

$result = $client->updateUser([/* ... */]);
$promise = $client->updateUserAsync([/* ... */]);

Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.

Parameter Syntax

$result = $client->updateUser([
    'AuthenticationToken' => '<string>',
    'GivenName' => '<string>',
    'GrantPoweruserPrivileges' => 'TRUE|FALSE',
    'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
    'StorageRule' => [
        'StorageAllocatedInBytes' => <integer>,
        'StorageType' => 'UNLIMITED|QUOTA',
    ],
    'Surname' => '<string>',
    'TimeZoneId' => '<string>',
    'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
    'UserId' => '<string>', // REQUIRED
]);

Parameter Details

Members
AuthenticationToken
Type: string

Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

GivenName
Type: string

The given name of the user.

GrantPoweruserPrivileges
Type: string

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

Locale
Type: string

The locale of the user.

StorageRule
Type: StorageRuleType structure

The amount of storage for the user.

Surname
Type: string

The surname of the user.

TimeZoneId
Type: string

The time zone ID of the user.

Type
Type: string

The type of the user.

UserId
Required: Yes
Type: string

The ID of the user.

Result Syntax

[
    'User' => [
        'CreatedTimestamp' => <DateTime>,
        'EmailAddress' => '<string>',
        'GivenName' => '<string>',
        'Id' => '<string>',
        'Locale' => 'en|fr|ko|de|es|ja|ru|zh_CN|zh_TW|pt_BR|default',
        'ModifiedTimestamp' => <DateTime>,
        'OrganizationId' => '<string>',
        'RecycleBinFolderId' => '<string>',
        'RootFolderId' => '<string>',
        'Status' => 'ACTIVE|INACTIVE|PENDING',
        'Storage' => [
            'StorageRule' => [
                'StorageAllocatedInBytes' => <integer>,
                'StorageType' => 'UNLIMITED|QUOTA',
            ],
            'StorageUtilizedInBytes' => <integer>,
        ],
        'Surname' => '<string>',
        'TimeZoneId' => '<string>',
        'Type' => 'USER|ADMIN|POWERUSER|MINIMALUSER|WORKSPACESUSER',
        'Username' => '<string>',
    ],
]

Result Details

Members
User
Type: User structure

The user information.

Errors

EntityNotExistsException:

The resource does not exist.

UnauthorizedOperationException:

The operation is not permitted.

UnauthorizedResourceAccessException:

The caller does not have access to perform the action on the resource.

IllegalUserStateException:

The user is undergoing transfer of ownership.

ProhibitedStateException:

The specified document version is not in the INITIALIZED state.

FailedDependencyException:

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

ServiceUnavailableException:

One or more of the dependencies is unavailable.

DeactivatingLastSystemUserException:

The last user in the organization is being deactivated.

InvalidArgumentException:

The pagination marker or limit fields are not valid.

Shapes

Activity

Description

Describes the activity information.

Members
CommentMetadata
Type: CommentMetadata structure

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

Initiator
Type: UserMetadata structure

The user who performed the action.

IsIndirectActivity
Type: boolean

Indicates whether an activity is indirect or direct. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).

OrganizationId
Type: string

The ID of the organization.

OriginalParent
Type: ResourceMetadata structure

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

Participants
Type: Participants structure

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.

ResourceMetadata
Type: ResourceMetadata structure

The metadata of the resource involved in the user action.

TimeStamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the action was performed.

Type
Type: string

The activity type.

Comment

Description

Describes a comment.

Members
CommentId
Required: Yes
Type: string

The ID of the comment.

Contributor
Type: User structure

The details of the user who made the comment.

CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the comment was created.

ParentId
Type: string

The ID of the parent comment.

RecipientId
Type: string

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

Status
Type: string

The status of the comment.

Text
Type: string

The text of the comment.

ThreadId
Type: string

The ID of the root comment in the thread.

Visibility
Type: 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.

CommentMetadata

Description

Describes the metadata of a comment.

Members
CommentId
Type: string

The ID of the comment.

CommentStatus
Type: string

The status of the comment.

Contributor
Type: User structure

The user who made the comment.

ContributorId
Type: string

The ID of the user who made the comment.

CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp that the comment was created.

RecipientId
Type: string

The ID of the user being replied to.

ConcurrentModificationException

Description

The resource hierarchy is changing.

Members
Message
Type: string

ConflictingOperationException

Description

Another operation is in progress on the resource that conflicts with the current operation.

Members
Message
Type: string

CustomMetadataLimitExceededException

Description

The limit has been reached on the number of custom properties for the specified resource.

Members
Message
Type: string

DateRangeType

Description

Filters results based on timestamp range (in epochs).

Members
EndValue
Type: timestamp (string|DateTime or anything parsable by strtotime)

Timestamp range end value (in epochs).

StartValue
Type: timestamp (string|DateTime or anything parsable by strtotime)

Timestamp range start value (in epochs)

DeactivatingLastSystemUserException

Description

The last user in the organization is being deactivated.

Members

DocumentLockedForCommentsException

Description

This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.

Members
Message
Type: string

DocumentMetadata

Description

Describes the document.

Members
CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the document was created.

CreatorId
Type: string

The ID of the creator.

Id
Type: string

The ID of the document.

Labels
Type: Array of strings

List of labels on the document.

LatestVersionMetadata
Type: DocumentVersionMetadata structure

The latest version of the document.

ModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the document was updated.

ParentFolderId
Type: string

The ID of the parent folder.

ResourceState
Type: string

The resource state.

DocumentVersionMetadata

Description

Describes a version of a document.

Members
ContentCreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the content of the document was originally created.

ContentModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the content of the document was modified.

ContentType
Type: string

The content type of the document.

CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the document was first uploaded.

CreatorId
Type: string

The ID of the creator.

Id
Type: string

The ID of the version.

ModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the document was last uploaded.

Name
Type: string

The name of the version.

Signature
Type: string

The signature of the document.

Size
Type: long (int|float)

The size of the document, in bytes.

Source
Type: Associative array of custom strings keys (DocumentSourceType) to strings

The source of the document.

Status
Type: string

The status of the document.

Thumbnail
Type: Associative array of custom strings keys (DocumentThumbnailType) to strings

The thumbnail of the document.

DraftUploadOutOfSyncException

Description

This exception is thrown when a valid checkout ID is not presented on document version upload calls for a document that has been checked out from Web client.

Members
Message
Type: string

EntityAlreadyExistsException

Description

The resource already exists.

Members
Message
Type: string

EntityNotExistsException

Description

The resource does not exist.

Members
EntityIds
Type: Array of strings

The IDs of the non-existent resources.

Message
Type: string

FailedDependencyException

Description

The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.

Members
Message
Type: string

Filters

Description

Filters results based on entity metadata.

Members
AncestorIds
Type: Array of strings

Filter based on resource’s path.

ContentCategories
Type: Array of strings

Filters by content category.

CreatedRange
Type: DateRangeType structure

Filter based on resource’s creation timestamp.

Labels
Type: Array of strings

Filter by labels using exact match.

ModifiedRange
Type: DateRangeType structure

Filter based on resource’s modified timestamp.

Principals
Type: Array of SearchPrincipalType structures

Filter based on UserIds or GroupIds.

ResourceTypes
Type: Array of strings

Filters based on entity type.

SearchCollectionTypes
Type: Array of strings

Filter based on file groupings.

SizeRange
Type: LongRangeType structure

Filter based on size (in bytes).

TextLocales
Type: Array of strings

Filters by the locale of the content or comment.

FolderMetadata

Description

Describes a folder.

Members
CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the folder was created.

CreatorId
Type: string

The ID of the creator.

Id
Type: string

The ID of the folder.

Labels
Type: Array of strings

List of labels on the folder.

LatestVersionSize
Type: long (int|float)

The size of the latest version of the folder metadata.

ModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the folder was updated.

Name
Type: string

The name of the folder.

ParentFolderId
Type: string

The ID of the parent folder.

ResourceState
Type: string

The resource state of the folder.

Signature
Type: string

The unique identifier created from the subfolders and documents of the folder.

Size
Type: long (int|float)

The size of the folder metadata.

GroupMetadata

Description

Describes the metadata of a user group.

Members
Id
Type: string

The ID of the user group.

Name
Type: string

The name of the group.

IllegalUserStateException

Description

The user is undergoing transfer of ownership.

Members
Message
Type: string

InvalidArgumentException

Description

The pagination marker or limit fields are not valid.

Members
Message
Type: string

InvalidCommentOperationException

Description

The requested operation is not allowed on the specified comment object.

Members
Message
Type: string

InvalidOperationException

Description

The operation is invalid.

Members
Message
Type: string

InvalidPasswordException

Description

The password is invalid.

Members
Message
Type: string

LimitExceededException

Description

The maximum of 100,000 files and folders under the parent folder has been exceeded.

Members
Message
Type: string

LongRangeType

Description

Filter based on size (in bytes).

Members
EndValue
Type: long (int|float)

The size end range (in bytes).

StartValue
Type: long (int|float)

The size start range (in bytes).

NotificationOptions

Description

Set of options which defines notification preferences of given action.

Members
EmailMessage
Type: string

Text value to be included in the email body.

SendEmail
Type: boolean

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

Participants

Description

Describes the users or user groups.

Members
Groups
Type: Array of GroupMetadata structures

The list of user groups.

Users
Type: Array of UserMetadata structures

The list of users.

PermissionInfo

Description

Describes the permissions.

Members
Role
Type: string

The role of the user.

Type
Type: string

The type of permissions.

Principal

Description

Describes a resource.

Members
Id
Type: string

The ID of the resource.

Roles
Type: Array of PermissionInfo structures

The permission information for the resource.

Type
Type: string

The type of resource.

ProhibitedStateException

Description

The specified document version is not in the INITIALIZED state.

Members
Message
Type: string

RequestedEntityTooLargeException

Description

The response is too large to return. The request must include a filter to reduce the size of the response.

Members
Message
Type: string

ResourceAlreadyCheckedOutException

Description

The resource is already checked out.

Members
Message
Type: string

ResourceMetadata

Description

Describes the metadata of a resource.

Members
Id
Type: string

The ID of the resource.

Name
Type: string

The name of the resource.

OriginalName
Type: string

The original name of the resource before a rename operation.

Owner
Type: UserMetadata structure

The owner of the resource.

ParentId
Type: string

The parent ID of the resource before a rename operation.

Type
Type: string

The type of resource.

VersionId
Type: string

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

ResourcePath

Description

Describes the path information of a resource.

Members
Components
Type: Array of ResourcePathComponent structures

The components of the resource path.

ResourcePathComponent

Description

Describes the resource path.

Members
Id
Type: string

The ID of the resource path.

Name
Type: string

The name of the resource path.

ResponseItem

Description

List of Documents, Folders, Comments, and Document Versions matching the query.

Members
CommentMetadata
Type: CommentMetadata structure

The comment that matches the query.

DocumentMetadata
Type: DocumentMetadata structure

The document that matches the query.

DocumentVersionMetadata
Type: DocumentVersionMetadata structure

The document version that matches the metadata.

FolderMetadata
Type: FolderMetadata structure

The folder that matches the query.

ResourceType
Type: string

The type of item being returned.

WebUrl
Type: string

The webUrl of the item being returned.

SearchPrincipalType

Description

Filter based on UserIds or GroupIds.

Members
Id
Required: Yes
Type: string

UserIds or GroupIds.

Roles
Type: Array of strings

The Role of a User or Group.

SearchSortResult

Description

The result of the sort operation.

Members
Field
Type: string

Sort search results based on this field name.

Order
Type: string

Sort direction.

ServiceUnavailableException

Description

One or more of the dependencies is unavailable.

Members
Message
Type: string

SharePrincipal

Description

Describes the recipient type and ID, if available.

Members
Id
Required: Yes
Type: string

The ID of the recipient.

Role
Required: Yes
Type: string

The role of the recipient.

Type
Required: Yes
Type: string

The type of the recipient.

ShareResult

Description

Describes the share results of a resource.

Members
InviteePrincipalId
Type: string

The ID of the invited user.

PrincipalId
Type: string

The ID of the principal.

Role
Type: string

The role.

ShareId
Type: string

The ID of the resource that was shared.

Status
Type: string

The status.

StatusMessage
Type: string

The status message.

StorageLimitExceededException

Description

The storage limit has been exceeded.

Members
Message
Type: string

StorageLimitWillExceedException

Description

The storage limit will be exceeded.

Members
Message
Type: string

StorageRuleType

Description

Describes the storage for a user.

Members
StorageAllocatedInBytes
Type: long (int|float)

The amount of storage allocated, in bytes.

StorageType
Type: string

The type of storage.

Subscription

Description

Describes a subscription.

Members
EndPoint
Type: string

The endpoint of the subscription.

Protocol
Type: string

The protocol of the subscription.

SubscriptionId
Type: string

The ID of the subscription.

TooManyLabelsException

Description

The limit has been reached on the number of labels for the specified resource.

Members
Message
Type: string

TooManySubscriptionsException

Description

You've reached the limit on the number of subscriptions for the WorkDocs instance.

Members
Message
Type: string

UnauthorizedOperationException

Description

The operation is not permitted.

Members

UnauthorizedResourceAccessException

Description

The caller does not have access to perform the action on the resource.

Members
Message
Type: string

UploadMetadata

Description

Describes the upload.

Members
SignedHeaders
Type: Associative array of custom strings keys (HeaderNameType) to strings

The signed headers.

UploadUrl
Type: string

The URL of the upload.

User

Description

Describes a user.

Members
CreatedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the user was created.

EmailAddress
Type: string

The email address of the user.

GivenName
Type: string

The given name of the user.

Id
Type: string

The ID of the user.

Locale
Type: string

The locale of the user.

ModifiedTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the user was modified.

OrganizationId
Type: string

The ID of the organization.

RecycleBinFolderId
Type: string

The ID of the recycle bin folder.

RootFolderId
Type: string

The ID of the root folder.

Status
Type: string

The status of the user.

Storage
Type: UserStorageMetadata structure

The storage for the user.

Surname
Type: string

The surname of the user.

TimeZoneId
Type: string

The time zone ID of the user.

Type
Type: string

The type of user.

Username
Type: string

The login name of the user.

UserMetadata

Description

Describes the metadata of the user.

Members
EmailAddress
Type: string

The email address of the user.

GivenName
Type: string

The given name of the user before a rename operation.

Id
Type: string

The ID of the user.

Surname
Type: string

The surname of the user.

Username
Type: string

The name of the user.

UserStorageMetadata

Description

Describes the storage for a user.

Members
StorageRule
Type: StorageRuleType structure

The storage for a user.

StorageUtilizedInBytes
Type: long (int|float)

The amount of storage used, in bytes.