workdocs function

Amazon WorkDocs

Amazon WorkDocs

The Amazon 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 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 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 Amazon Web Services 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.

The pricing for Amazon WorkDocs APIs varies depending on the API call type for these actions:

  • READ (Get*)
  • WRITE (Activate*, Add*, Create*, Deactivate*, Initiate*, Update*)
  • LIST (Describe*)
  • DELETE*, CANCEL

For information about Amazon WorkDocs API pricing, see Amazon WorkDocs Pricing.

workdocs(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Arguments

  • config: Optional configuration of credentials, endpoint, and/or region.

    • credentials :

      • creds :

        • access_key_id : AWS access key ID
        • secret_access_key : AWS secret access key
        • session_token : AWS temporary session token
      • profile : The name of a profile to use. If not given, then the default profile is used.

      • anonymous : Set anonymous credentials.

    • endpoint : The complete URL to use for the constructed client.

    • region : The AWS Region used in instantiating the client.

    • close_connection : Immediately close all HTTP connections.

    • timeout : The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

    • s3_force_path_style : Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

    • sts_regional_endpoint : Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

  • credentials: Optional credentials shorthand for the config parameter

    • creds :

      • access_key_id : AWS access key ID
      • secret_access_key : AWS secret access key
      • session_token : AWS temporary session token
    • profile : The name of a profile to use. If not given, then the default profile is used.

    • anonymous : Set anonymous credentials.

  • endpoint: Optional shorthand for complete URL to use for the constructed client.

  • region: Optional shorthand for AWS Region used in instantiating the client.

Returns

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- workdocs(
  config = list(
    credentials = list(
 creds = list(
   access_key_id = "string",
   secret_access_key = "string",
   session_token = "string"
 ),
 profile = "string",
 anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
 access_key_id = "string",
 secret_access_key = "string",
 session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

abort_document_version_uploadAborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload
activate_userActivates the specified user
add_resource_permissionsCreates a set of permissions for the specified folder or document
create_commentAdds a new comment to the specified document version
create_custom_metadataAdds one or more custom properties to the specified resource (a folder, document, or version)
create_folderCreates a folder with the specified name and parent folder
create_labelsAdds the specified list of labels to the given resource (a document or folder)
create_notification_subscriptionConfigure Amazon WorkDocs to use Amazon SNS notifications
create_userCreates a user in a Simple AD or Microsoft AD directory
deactivate_userDeactivates the specified user, which revokes the user's access to Amazon WorkDocs
delete_commentDeletes the specified comment from the document version
delete_custom_metadataDeletes custom metadata from the specified resource
delete_documentPermanently deletes the specified document and its associated metadata
delete_document_versionDeletes a specific version of a document
delete_folderPermanently deletes the specified folder and its contents
delete_folder_contentsDeletes the contents of the specified folder
delete_labelsDeletes the specified list of labels from a resource
delete_notification_subscriptionDeletes the specified subscription from the specified organization
delete_userDeletes the specified user from a Simple AD or Microsoft AD directory
describe_activitiesDescribes the user activities in a specified time period
describe_commentsList all the comments for the specified document version
describe_document_versionsRetrieves the document versions for the specified document
describe_folder_contentsDescribes the contents of the specified folder, including its documents and subfolders
describe_groupsDescribes the groups specified by the query
describe_notification_subscriptionsLists the specified notification subscriptions
describe_resource_permissionsDescribes the permissions of a specified resource
describe_root_foldersDescribes the current user's special folders; the RootFolder and the RecycleBin
describe_usersDescribes the specified users
get_current_userRetrieves details of the current user for whom the authentication token was generated
get_documentRetrieves details of a document
get_document_pathRetrieves the path information (the hierarchy from the root folder) for the requested document
get_document_versionRetrieves version metadata for the specified document
get_folderRetrieves the metadata of the specified folder
get_folder_pathRetrieves the path information (the hierarchy from the root folder) for the specified folder
get_resourcesRetrieves a collection of resources, including folders and documents
initiate_document_version_uploadCreates a new document object and version object
remove_all_resource_permissionsRemoves all the permissions from the specified resource
remove_resource_permissionRemoves the permission for the specified principal from the specified resource
restore_document_versionsRecovers a deleted version of an Amazon WorkDocs document
search_resourcesSearches metadata and the content of folders, documents, document versions, and comments
update_documentUpdates the specified attributes of a document
update_document_versionChanges the status of the document version to ACTIVE
update_folderUpdates the specified attributes of the specified folder
update_userUpdates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site

Examples

## Not run: svc <- workdocs() svc$abort_document_version_upload( Foo = 123 ) ## End(Not run)
  • Maintainer: Dyfan Jones
  • License: Apache License (>= 2.0)
  • Last published: 2025-03-17