WorkDocs class
The WorkDocs API is designed for the following use cases:
- File Migration: File migration applications are supported for users who want to migrate their files from an on-premises or off-premises file system or service. Users can insert files into a user directory structure, as well as allow for basic metadata changes, such as modifications to the permissions of files.
- Security: Support security applications are supported for users who have additional security needs, such as antivirus or data loss prevention. The API actions, along with AWS CloudTrail, allow these applications to detect when changes occur in Amazon WorkDocs. Then, the application can take the necessary actions and replace the target file. If the target file violates the policy, the application can also choose to email the user.
- eDiscovery/Analytics: General administrative applications are supported, such as eDiscovery and analytics. These applications can choose to mimic or record the actions in an Amazon WorkDocs site, along with AWS CloudTrail, to replicate data for eDiscovery, backup, or analytical applications.
Constructors
- WorkDocs({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abortDocumentVersionUpload(
{required String documentId, required String versionId, String? authenticationToken}) → Future< void> - 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.
-
activateUser(
{required String userId, String? authenticationToken}) → Future< ActivateUserResponse> - Activates the specified user. Only active users can access Amazon WorkDocs.
-
addResourcePermissions(
{required List< SharePrincipal> principals, required String resourceId, String? authenticationToken, NotificationOptions? notificationOptions}) → Future<AddResourcePermissionsResponse> - Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createComment(
{required String documentId, required String text, required String versionId, String? authenticationToken, bool? notifyCollaborators, String? parentId, String? threadId, CommentVisibilityType? visibility}) → Future< CreateCommentResponse> - Adds a new comment to the specified document version.
-
createCustomMetadata(
{required Map< String, String> customMetadata, required String resourceId, String? authenticationToken, String? versionId}) → Future<void> - Adds one or more custom properties to the specified resource (a folder, document, or version).
-
createFolder(
{required String parentFolderId, String? authenticationToken, String? name}) → Future< CreateFolderResponse> - Creates a folder with the specified name and parent folder.
-
createLabels(
{required List< String> labels, required String resourceId, String? authenticationToken}) → Future<void> - Adds the specified list of labels to the given resource (a document or folder)
-
createNotificationSubscription(
{required String endpoint, required String organizationId, required SubscriptionProtocolType protocol, required SubscriptionType subscriptionType}) → Future< CreateNotificationSubscriptionResponse> - Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.
-
createUser(
{required String givenName, required String password, required String surname, required String username, String? authenticationToken, String? emailAddress, String? organizationId, StorageRuleType? storageRule, String? timeZoneId}) → Future< CreateUserResponse> - 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.
-
deactivateUser(
{required String userId, String? authenticationToken}) → Future< void> - Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.
-
deleteComment(
{required String commentId, required String documentId, required String versionId, String? authenticationToken}) → Future< void> - Deletes the specified comment from the document version.
-
deleteCustomMetadata(
{required String resourceId, String? authenticationToken, bool? deleteAll, List< String> ? keys, String? versionId}) → Future<void> - Deletes custom metadata from the specified resource.
-
deleteDocument(
{required String documentId, String? authenticationToken}) → Future< void> - Permanently deletes the specified document and its associated metadata.
-
deleteFolder(
{required String folderId, String? authenticationToken}) → Future< void> - Permanently deletes the specified folder and its contents.
-
deleteFolderContents(
{required String folderId, String? authenticationToken}) → Future< void> - Deletes the contents of the specified folder.
-
deleteLabels(
{required String resourceId, String? authenticationToken, bool? deleteAll, List< String> ? labels}) → Future<void> - Deletes the specified list of labels from a resource.
-
deleteNotificationSubscription(
{required String organizationId, required String subscriptionId}) → Future< void> - Deletes the specified subscription from the specified organization.
-
deleteUser(
{required String userId, String? authenticationToken}) → Future< void> - Deletes the specified user from a Simple AD or Microsoft AD directory.
-
describeActivities(
{String? activityTypes, String? authenticationToken, DateTime? endTime, bool? includeIndirectActivities, int? limit, String? marker, String? organizationId, String? resourceId, DateTime? startTime, String? userId}) → Future< DescribeActivitiesResponse> - Describes the user activities in a specified time period.
-
describeComments(
{required String documentId, required String versionId, String? authenticationToken, int? limit, String? marker}) → Future< DescribeCommentsResponse> - List all the comments for the specified document version.
-
describeDocumentVersions(
{required String documentId, String? authenticationToken, String? fields, String? include, int? limit, String? marker}) → Future< DescribeDocumentVersionsResponse> - Retrieves the document versions for the specified document.
-
describeFolderContents(
{required String folderId, String? authenticationToken, String? include, int? limit, String? marker, OrderType? order, ResourceSortType? sort, FolderContentType? type}) → Future< DescribeFolderContentsResponse> - Describes the contents of the specified folder, including its documents and subfolders.
-
describeGroups(
{required String searchQuery, String? authenticationToken, int? limit, String? marker, String? organizationId}) → Future< DescribeGroupsResponse> - Describes the groups specified by the query. Groups are defined by the underlying Active Directory.
-
describeNotificationSubscriptions(
{required String organizationId, int? limit, String? marker}) → Future< DescribeNotificationSubscriptionsResponse> - Lists the specified notification subscriptions.
-
describeResourcePermissions(
{required String resourceId, String? authenticationToken, int? limit, String? marker, String? principalId}) → Future< DescribeResourcePermissionsResponse> - Describes the permissions of a specified resource.
-
describeRootFolders(
{required String authenticationToken, int? limit, String? marker}) → Future< DescribeRootFoldersResponse> -
Describes the current user's special folders; the
RootFolder
and theRecycleBin
.RootFolder
is the root of user's files and folders andRecycleBin
is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients. -
describeUsers(
{String? authenticationToken, String? fields, UserFilterType? include, int? limit, String? marker, OrderType? order, String? organizationId, String? query, UserSortType? sort, String? userIds}) → Future< DescribeUsersResponse> - Describes the specified users. You can describe all users or filter the results (for example, by status or organization).
-
getCurrentUser(
{required String authenticationToken}) → Future< GetCurrentUserResponse> - Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.
-
getDocument(
{required String documentId, String? authenticationToken, bool? includeCustomMetadata}) → Future< GetDocumentResponse> - Retrieves details of a document.
-
getDocumentPath(
{required String documentId, String? authenticationToken, String? fields, int? limit, String? marker}) → Future< GetDocumentPathResponse> - Retrieves the path information (the hierarchy from the root folder) for the requested document.
-
getDocumentVersion(
{required String documentId, required String versionId, String? authenticationToken, String? fields, bool? includeCustomMetadata}) → Future< GetDocumentVersionResponse> - Retrieves version metadata for the specified document.
-
getFolder(
{required String folderId, String? authenticationToken, bool? includeCustomMetadata}) → Future< GetFolderResponse> - Retrieves the metadata of the specified folder.
-
getFolderPath(
{required String folderId, String? authenticationToken, String? fields, int? limit, String? marker}) → Future< GetFolderPathResponse> - Retrieves the path information (the hierarchy from the root folder) for the specified folder.
-
getResources(
{String? authenticationToken, ResourceCollectionType? collectionType, int? limit, String? marker, String? userId}) → Future< GetResourcesResponse> -
Retrieves a collection of resources, including folders and documents. The
only
CollectionType
supported isSHARED_WITH_ME
. -
initiateDocumentVersionUpload(
{required String parentFolderId, String? authenticationToken, DateTime? contentCreatedTimestamp, DateTime? contentModifiedTimestamp, String? contentType, int? documentSizeInBytes, String? id, String? name}) → Future< InitiateDocumentVersionUploadResponse> - Creates a new document object and version object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAllResourcePermissions(
{required String resourceId, String? authenticationToken}) → Future< void> - Removes all the permissions from the specified resource.
-
removeResourcePermission(
{required String principalId, required String resourceId, String? authenticationToken, PrincipalType? principalType}) → Future< void> - Removes the permission for the specified principal from the specified resource.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateDocument(
{required String documentId, String? authenticationToken, String? name, String? parentFolderId, ResourceStateType? resourceState}) → Future< void> - Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.
-
updateDocumentVersion(
{required String documentId, required String versionId, String? authenticationToken, DocumentVersionStatus? versionStatus}) → Future< void> - Changes the status of the document version to ACTIVE.
-
updateFolder(
{required String folderId, String? authenticationToken, String? name, String? parentFolderId, ResourceStateType? resourceState}) → Future< void> - Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.
-
updateUser(
{required String userId, String? authenticationToken, String? givenName, BooleanEnumType? grantPoweruserPrivileges, LocaleType? locale, StorageRuleType? storageRule, String? surname, String? timeZoneId, UserType? type}) → Future< UpdateUserResponse> - Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited