WorkDocs
public struct WorkDocs
Client object for interacting with AWS WorkDocs service.
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. All Amazon WorkDocs API actions are Amazon authenticated and certificate-signed. They not only require the use of the AWS SDK, but also allow for the exclusive use of IAM users and roles to help facilitate access, trust, and permission policies. By creating a role and allowing an IAM user to access the Amazon WorkDocs site, the IAM user gains full administrative visibility into the entire Amazon WorkDocs site (or as set in the IAM policy). This includes, but is not limited to, the ability to modify file permissions and upload any file to any user. This allows developers to perform the three use cases above, as well as give users the ability to grant access on a selective basis using the IAM model.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the WorkDocs client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
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.
Declaration
Swift
@discardableResult public func abortDocumentVersionUpload(_ input: AbortDocumentVersionUploadRequest) -> EventLoopFuture<Void>
-
Activates the specified user. Only active users can access Amazon WorkDocs.
Declaration
Swift
public func activateUser(_ input: ActivateUserRequest) -> EventLoopFuture<ActivateUserResponse>
-
Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.
Declaration
Swift
public func addResourcePermissions(_ input: AddResourcePermissionsRequest) -> EventLoopFuture<AddResourcePermissionsResponse>
-
Adds a new comment to the specified document version.
Declaration
Swift
public func createComment(_ input: CreateCommentRequest) -> EventLoopFuture<CreateCommentResponse>
-
Adds one or more custom properties to the specified resource (a folder, document, or version).
Declaration
Swift
public func createCustomMetadata(_ input: CreateCustomMetadataRequest) -> EventLoopFuture<CreateCustomMetadataResponse>
-
Creates a folder with the specified name and parent folder.
Declaration
Swift
public func createFolder(_ input: CreateFolderRequest) -> EventLoopFuture<CreateFolderResponse>
-
Adds the specified list of labels to the given resource (a document or folder)
Declaration
Swift
public func createLabels(_ input: CreateLabelsRequest) -> EventLoopFuture<CreateLabelsResponse>
-
Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription. For more information, see Subscribe to Notifications in the Amazon WorkDocs Developer Guide.
Declaration
Swift
public func createNotificationSubscription(_ input: CreateNotificationSubscriptionRequest) -> EventLoopFuture<CreateNotificationSubscriptionResponse>
-
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.
Declaration
Swift
public func createUser(_ input: CreateUserRequest) -> EventLoopFuture<CreateUserResponse>
-
Deactivates the specified user, which revokes the user’s access to Amazon WorkDocs.
Declaration
Swift
@discardableResult public func deactivateUser(_ input: DeactivateUserRequest) -> EventLoopFuture<Void>
-
Deletes the specified comment from the document version.
Declaration
Swift
@discardableResult public func deleteComment(_ input: DeleteCommentRequest) -> EventLoopFuture<Void>
-
Deletes custom metadata from the specified resource.
Declaration
Swift
public func deleteCustomMetadata(_ input: DeleteCustomMetadataRequest) -> EventLoopFuture<DeleteCustomMetadataResponse>
-
Permanently deletes the specified document and its associated metadata.
Declaration
Swift
@discardableResult public func deleteDocument(_ input: DeleteDocumentRequest) -> EventLoopFuture<Void>
-
Permanently deletes the specified folder and its contents.
Declaration
Swift
@discardableResult public func deleteFolder(_ input: DeleteFolderRequest) -> EventLoopFuture<Void>
-
Deletes the contents of the specified folder.
Declaration
Swift
@discardableResult public func deleteFolderContents(_ input: DeleteFolderContentsRequest) -> EventLoopFuture<Void>
-
Deletes the specified list of labels from a resource.
Declaration
Swift
public func deleteLabels(_ input: DeleteLabelsRequest) -> EventLoopFuture<DeleteLabelsResponse>
-
Deletes the specified subscription from the specified organization.
Declaration
Swift
@discardableResult public func deleteNotificationSubscription(_ input: DeleteNotificationSubscriptionRequest) -> EventLoopFuture<Void>
-
Deletes the specified user from a Simple AD or Microsoft AD directory.
Declaration
Swift
@discardableResult public func deleteUser(_ input: DeleteUserRequest) -> EventLoopFuture<Void>
-
Describes the user activities in a specified time period.
Declaration
Swift
public func describeActivities(_ input: DescribeActivitiesRequest) -> EventLoopFuture<DescribeActivitiesResponse>
-
List all the comments for the specified document version.
Declaration
Swift
public func describeComments(_ input: DescribeCommentsRequest) -> EventLoopFuture<DescribeCommentsResponse>
-
Retrieves the document versions for the specified document. By default, only active versions are returned.
Declaration
Swift
public func describeDocumentVersions(_ input: DescribeDocumentVersionsRequest) -> EventLoopFuture<DescribeDocumentVersionsResponse>
-
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.
Declaration
Swift
public func describeFolderContents(_ input: DescribeFolderContentsRequest) -> EventLoopFuture<DescribeFolderContentsResponse>
-
Describes the groups specified by the query. Groups are defined by the underlying Active Directory.
Declaration
Swift
public func describeGroups(_ input: DescribeGroupsRequest) -> EventLoopFuture<DescribeGroupsResponse>
-
Lists the specified notification subscriptions.
Declaration
Swift
public func describeNotificationSubscriptions(_ input: DescribeNotificationSubscriptionsRequest) -> EventLoopFuture<DescribeNotificationSubscriptionsResponse>
-
Describes the permissions of a specified resource.
Declaration
Swift
public func describeResourcePermissions(_ input: DescribeResourcePermissionsRequest) -> EventLoopFuture<DescribeResourcePermissionsResponse>
-
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.
Declaration
Swift
public func describeRootFolders(_ input: DescribeRootFoldersRequest) -> EventLoopFuture<DescribeRootFoldersResponse>
-
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.
Declaration
Swift
public func describeUsers(_ input: DescribeUsersRequest) -> EventLoopFuture<DescribeUsersResponse>
-
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.
Declaration
Swift
public func getCurrentUser(_ input: GetCurrentUserRequest) -> EventLoopFuture<GetCurrentUserResponse>
-
Retrieves details of a document.
Declaration
Swift
public func getDocument(_ input: GetDocumentRequest) -> EventLoopFuture<GetDocumentResponse>
-
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.
Declaration
Swift
public func getDocumentPath(_ input: GetDocumentPathRequest) -> EventLoopFuture<GetDocumentPathResponse>
-
Retrieves version metadata for the specified document.
Declaration
Swift
public func getDocumentVersion(_ input: GetDocumentVersionRequest) -> EventLoopFuture<GetDocumentVersionResponse>
-
Retrieves the metadata of the specified folder.
Declaration
Swift
public func getFolder(_ input: GetFolderRequest) -> EventLoopFuture<GetFolderResponse>
-
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.
Declaration
Swift
public func getFolderPath(_ input: GetFolderPathRequest) -> EventLoopFuture<GetFolderPathResponse>
-
Retrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME.
Declaration
Swift
public func getResources(_ input: GetResourcesRequest) -> EventLoopFuture<GetResourcesResponse>
-
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.
Declaration
Swift
public func initiateDocumentVersionUpload(_ input: InitiateDocumentVersionUploadRequest) -> EventLoopFuture<InitiateDocumentVersionUploadResponse>
-
Removes all the permissions from the specified resource.
Declaration
Swift
@discardableResult public func removeAllResourcePermissions(_ input: RemoveAllResourcePermissionsRequest) -> EventLoopFuture<Void>
-
Removes the permission for the specified principal from the specified resource.
Declaration
Swift
@discardableResult public func removeResourcePermission(_ input: RemoveResourcePermissionRequest) -> EventLoopFuture<Void>
-
Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.
Declaration
Swift
@discardableResult public func updateDocument(_ input: UpdateDocumentRequest) -> EventLoopFuture<Void>
-
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.
Declaration
Swift
@discardableResult public func updateDocumentVersion(_ input: UpdateDocumentVersionRequest) -> EventLoopFuture<Void>
-
Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.
Declaration
Swift
@discardableResult public func updateFolder(_ input: UpdateFolderRequest) -> EventLoopFuture<Void>
-
Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.
Declaration
Swift
public func updateUser(_ input: UpdateUserRequest) -> EventLoopFuture<UpdateUserResponse>
-
Retrieves the document versions for the specified document. By default, only active versions are returned.
Declaration
Swift
public func describeDocumentVersionsPaginator(_ input: DescribeDocumentVersionsRequest, onPage: @escaping (DescribeDocumentVersionsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
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.
Declaration
Swift
public func describeFolderContentsPaginator(_ input: DescribeFolderContentsRequest, onPage: @escaping (DescribeFolderContentsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
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.
Declaration
Swift
public func describeUsersPaginator(_ input: DescribeUsersRequest, onPage: @escaping (DescribeUsersResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Undocumented
See moreDeclaration
Swift
public struct DescribeDocumentVersionsRequest : AWSShape
extension WorkDocs.DescribeDocumentVersionsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct DescribeFolderContentsRequest : AWSShape
extension WorkDocs.DescribeFolderContentsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct DescribeUsersRequest : AWSShape
extension WorkDocs.DescribeUsersRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public enum ActivityType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum BooleanEnumType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum CommentStatusType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum CommentVisibilityType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum DocumentSourceType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum DocumentStatusType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum DocumentThumbnailType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum DocumentVersionStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum FolderContentType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum LocaleType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum OrderType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PrincipalType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ResourceCollectionType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ResourceSortType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ResourceStateType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ResourceType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum RolePermissionType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum RoleType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ShareStatusType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum StorageType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum SubscriptionProtocolType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum SubscriptionType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum UserFilterType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum UserSortType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum UserStatusType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum UserType : String, CustomStringConvertible, Codable