Skip to content

Client

workdocs R Documentation

Amazon WorkDocs

Description

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.

Usage

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.

Value

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_upload
Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload
activate_user
Activates the specified user
add_resource_permissions
Creates a set of permissions for the specified folder or document
create_comment
Adds a new comment to the specified document version
create_custom_metadata
Adds one or more custom properties to the specified resource (a folder, document, or version)
create_folder
Creates a folder with the specified name and parent folder
create_labels
Adds the specified list of labels to the given resource (a document or folder)
create_notification_subscription
Configure Amazon WorkDocs to use Amazon SNS notifications
create_user
Creates a user in a Simple AD or Microsoft AD directory
deactivate_user
Deactivates the specified user, which revokes the user's access to Amazon WorkDocs
delete_comment
Deletes the specified comment from the document version
delete_custom_metadata
Deletes custom metadata from the specified resource
delete_document
Permanently deletes the specified document and its associated metadata
delete_document_version
Deletes a specific version of a document
delete_folder
Permanently deletes the specified folder and its contents
delete_folder_contents
Deletes the contents of the specified folder
delete_labels
Deletes the specified list of labels from a resource
delete_notification_subscription
Deletes the specified subscription from the specified organization
delete_user
Deletes the specified user from a Simple AD or Microsoft AD directory
describe_activities
Describes the user activities in a specified time period
describe_comments
List all the comments for the specified document version
describe_document_versions
Retrieves the document versions for the specified document
describe_folder_contents
Describes the contents of the specified folder, including its documents and subfolders
describe_groups
Describes the groups specified by the query
describe_notification_subscriptions
Lists the specified notification subscriptions
describe_resource_permissions
Describes the permissions of a specified resource
describe_root_folders
Describes the current user's special folders; the RootFolder and the RecycleBin
describe_users
Describes the specified users
get_current_user
Retrieves details of the current user for whom the authentication token was generated
get_document
Retrieves details of a document
get_document_path
Retrieves the path information (the hierarchy from the root folder) for the requested document
get_document_version
Retrieves version metadata for the specified document
get_folder
Retrieves the metadata of the specified folder
get_folder_path
Retrieves the path information (the hierarchy from the root folder) for the specified folder
get_resources
Retrieves a collection of resources, including folders and documents
initiate_document_version_upload
Creates a new document object and version object
remove_all_resource_permissions
Removes all the permissions from the specified resource
remove_resource_permission
Removes the permission for the specified principal from the specified resource
restore_document_versions
Recovers a deleted version of an Amazon WorkDocs document
search_resources
Searches metadata and the content of folders, documents, document versions, and comments
update_document
Updates the specified attributes of a document
update_document_version
Changes the status of the document version to ACTIVE
update_folder
Updates the specified attributes of the specified folder
update_user
Updates 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)