Class: AWS.WorkDocs

Inherits:
AWS.Service show all
Identifier:
workdocs
API Version:
2016-05-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Sending a Request Using WorkDocs

var workdocs = new AWS.WorkDocs();
workdocs.abortDocumentVersionUpload(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the WorkDocs object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var workdocs = new AWS.WorkDocs({apiVersion: '2016-05-01'});

You can also set the API version globally in AWS.config.apiVersions using the workdocs service identifier:

AWS.config.apiVersions = {
  workdocs: '2016-05-01',
  // other service API versions
};

var workdocs = new AWS.WorkDocs();

Version:

  • 2016-05-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.WorkDocs(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a WorkDocs object

var workdocs = new AWS.WorkDocs({apiVersion: '2016-05-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.WorkDocs.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.WorkDocs.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.WorkDocs.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

abortDocumentVersionUpload(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the abortDocumentVersionUpload operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.abortDocumentVersionUpload(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The ID of the version.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

activateUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the activateUser operation

var params = {
  UserId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.activateUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • UserId — (String)

      The ID of the user.

    • AuthenticationToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • User — (map)

        The user information.

        • Id — (String)

          The ID of the user.

        • Username — (String)

          The login name of the user.

        • EmailAddress — (String)

          The email address of the user.

        • GivenName — (String)

          The given name of the user.

        • Surname — (String)

          The surname of the user.

        • OrganizationId — (String)

          The ID of the organization.

        • RootFolderId — (String)

          The ID of the root folder.

        • RecycleBinFolderId — (String)

          The ID of the recycle bin folder.

        • Status — (String)

          The status of the user.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "PENDING"
        • Type — (String)

          The type of user.

          Possible values include:
          • "USER"
          • "ADMIN"
          • "POWERUSER"
          • "MINIMALUSER"
          • "WORKSPACESUSER"
        • CreatedTimestamp — (Date)

          The time when the user was created.

        • ModifiedTimestamp — (Date)

          The time when the user was modified.

        • TimeZoneId — (String)

          The time zone ID of the user.

        • Locale — (String)

          The locale of the user.

          Possible values include:
          • "en"
          • "fr"
          • "ko"
          • "de"
          • "es"
          • "ja"
          • "ru"
          • "zh_CN"
          • "zh_TW"
          • "pt_BR"
          • "default"
        • Storage — (map)

          The storage for the user.

          • StorageUtilizedInBytes — (Integer)

            The amount of storage used, in bytes.

          • StorageRule — (map)

            The storage for a user.

            • StorageAllocatedInBytes — (Integer)

              The amount of storage allocated, in bytes.

            • StorageType — (String)

              The type of storage.

              Possible values include:
              • "UNLIMITED"
              • "QUOTA"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addResourcePermissions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the addResourcePermissions operation

var params = {
  Principals: [ /* required */
    {
      Id: 'STRING_VALUE', /* required */
      Role: VIEWER | CONTRIBUTOR | OWNER | COOWNER, /* required */
      Type: USER | GROUP | INVITE | ANONYMOUS | ORGANIZATION /* required */
    },
    /* more items */
  ],
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  NotificationOptions: {
    EmailMessage: 'STRING_VALUE',
    SendEmail: true || false
  }
};
workdocs.addResourcePermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

      The ID of the resource.

    • Principals — (Array<map>)

      The users, groups, or organization being granted permission.

      • Idrequired — (String)

        The ID of the recipient.

      • Typerequired — (String)

        The type of the recipient.

        Possible values include:
        • "USER"
        • "GROUP"
        • "INVITE"
        • "ANONYMOUS"
        • "ORGANIZATION"
      • Rolerequired — (String)

        The role of the recipient.

        Possible values include:
        • "VIEWER"
        • "CONTRIBUTOR"
        • "OWNER"
        • "COOWNER"
    • NotificationOptions — (map)

      The notification options.

      • SendEmail — (Boolean)

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

      • EmailMessage — (String)

        Text value to be included in the email body.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ShareResults — (Array<map>)

        The share results.

        • PrincipalId — (String)

          The ID of the principal.

        • Role — (String)

          The role.

          Possible values include:
          • "VIEWER"
          • "CONTRIBUTOR"
          • "OWNER"
          • "COOWNER"
        • Status — (String)

          The status.

          Possible values include:
          • "SUCCESS"
          • "FAILURE"
        • ShareId — (String)

          The ID of the resource that was shared.

        • StatusMessage — (String)

          The status message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createComment(params = {}, callback) ⇒ AWS.Request

Adds a new comment to the specified document version.

Service Reference:

Examples:

Calling the createComment operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  Text: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  NotifyCollaborators: true || false,
  ParentId: 'STRING_VALUE',
  ThreadId: 'STRING_VALUE',
  Visibility: PUBLIC | PRIVATE
};
workdocs.createComment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The ID of the document version.

    • ParentId — (String)

      The ID of the parent comment.

    • ThreadId — (String)

      The ID of the root comment in the thread.

    • Text — (String)

      The text of the comment.

    • Visibility — (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.

      Possible values include:
      • "PUBLIC"
      • "PRIVATE"
    • NotifyCollaborators — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Comment — (map)

        The comment that has been created.

        • CommentIdrequired — (String)

          The ID of the comment.

        • ParentId — (String)

          The ID of the parent comment.

        • ThreadId — (String)

          The ID of the root comment in the thread.

        • Text — (String)

          The text of the comment.

        • Contributor — (map)

          The details of the user who made the comment.

          • Id — (String)

            The ID of the user.

          • Username — (String)

            The login name of the user.

          • EmailAddress — (String)

            The email address of the user.

          • GivenName — (String)

            The given name of the user.

          • Surname — (String)

            The surname of the user.

          • OrganizationId — (String)

            The ID of the organization.

          • RootFolderId — (String)

            The ID of the root folder.

          • RecycleBinFolderId — (String)

            The ID of the recycle bin folder.

          • Status — (String)

            The status of the user.

            Possible values include:
            • "ACTIVE"
            • "INACTIVE"
            • "PENDING"
          • Type — (String)

            The type of user.

            Possible values include:
            • "USER"
            • "ADMIN"
            • "POWERUSER"
            • "MINIMALUSER"
            • "WORKSPACESUSER"
          • CreatedTimestamp — (Date)

            The time when the user was created.

          • ModifiedTimestamp — (Date)

            The time when the user was modified.

          • TimeZoneId — (String)

            The time zone ID of the user.

          • Locale — (String)

            The locale of the user.

            Possible values include:
            • "en"
            • "fr"
            • "ko"
            • "de"
            • "es"
            • "ja"
            • "ru"
            • "zh_CN"
            • "zh_TW"
            • "pt_BR"
            • "default"
          • Storage — (map)

            The storage for the user.

            • StorageUtilizedInBytes — (Integer)

              The amount of storage used, in bytes.

            • StorageRule — (map)

              The storage for a user.

              • StorageAllocatedInBytes — (Integer)

                The amount of storage allocated, in bytes.

              • StorageType — (String)

                The type of storage.

                Possible values include:
                • "UNLIMITED"
                • "QUOTA"
        • CreatedTimestamp — (Date)

          The time that the comment was created.

        • Status — (String)

          The status of the comment.

          Possible values include:
          • "DRAFT"
          • "PUBLISHED"
          • "DELETED"
        • Visibility — (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.

          Possible values include:
          • "PUBLIC"
          • "PRIVATE"
        • RecipientId — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCustomMetadata(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createCustomMetadata operation

var params = {
  CustomMetadata: { /* required */
    '<CustomMetadataKeyType>': 'STRING_VALUE',
    /* '<CustomMetadataKeyType>': ... */
  },
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  VersionId: 'STRING_VALUE'
};
workdocs.createCustomMetadata(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

      The ID of the resource.

    • VersionId — (String)

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

    • CustomMetadata — (map<String>)

      Custom metadata in the form of name-value pairs.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createFolder(params = {}, callback) ⇒ AWS.Request

Creates a folder with the specified name and parent folder.

Service Reference:

Examples:

Calling the createFolder operation

var params = {
  ParentFolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Name: 'STRING_VALUE'
};
workdocs.createFolder(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • Name — (String)

      The name of the new folder.

    • ParentFolderId — (String)

      The ID of the parent folder.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metadata — (map)

        The metadata of the folder.

        • Id — (String)

          The ID of the folder.

        • Name — (String)

          The name of the folder.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the folder was created.

        • ModifiedTimestamp — (Date)

          The time when the folder was updated.

        • ResourceState — (String)

          The resource state of the folder.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Signature — (String)

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

        • Labels — (Array<String>)

          List of labels on the folder.

        • Size — (Integer)

          The size of the folder metadata.

        • LatestVersionSize — (Integer)

          The size of the latest version of the folder metadata.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createLabels(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createLabels operation

var params = {
  Labels: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.createLabels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The ID of the resource.

    • Labels — (Array<String>)

      List of labels to add to the resource.

    • AuthenticationToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createNotificationSubscription(params = {}, callback) ⇒ AWS.Request

Configure WorkDocs to use Amazon SNS notifications.

The endpoint receives a confirmation message, and must confirm the subscription. For more information, see Confirm the Subscription in the Amazon Simple Notification Service Developer Guide.

Service Reference:

Examples:

Calling the createNotificationSubscription operation

var params = {
  Endpoint: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  Protocol: HTTPS, /* required */
  SubscriptionType: ALL /* required */
};
workdocs.createNotificationSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The ID of the organization.

    • Endpoint — (String)

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

    • Protocol — (String)

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

      Possible values include:
      • "HTTPS"
    • SubscriptionType — (String)

      The notification type.

      Possible values include:
      • "ALL"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Subscription — (map)

        The subscription.

        • SubscriptionId — (String)

          The ID of the subscription.

        • EndPoint — (String)

          The endpoint of the subscription.

        • Protocol — (String)

          The protocol of the subscription.

          Possible values include:
          • "HTTPS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createUser(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createUser operation

var params = {
  GivenName: 'STRING_VALUE', /* required */
  Password: 'STRING_VALUE', /* required */
  Surname: 'STRING_VALUE', /* required */
  Username: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  EmailAddress: 'STRING_VALUE',
  OrganizationId: 'STRING_VALUE',
  StorageRule: {
    StorageAllocatedInBytes: 0,
    StorageType: UNLIMITED | QUOTA
  },
  TimeZoneId: 'STRING_VALUE'
};
workdocs.createUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The ID of the organization.

    • Username — (String)

      The login name of the user.

    • EmailAddress — (String)

      The email address of the user.

    • GivenName — (String)

      The given name of the user.

    • Surname — (String)

      The surname of the user.

    • Password — (String)

      The password of the user.

    • TimeZoneId — (String)

      The time zone ID of the user.

    • StorageRule — (map)

      The amount of storage for the user.

      • StorageAllocatedInBytes — (Integer)

        The amount of storage allocated, in bytes.

      • StorageType — (String)

        The type of storage.

        Possible values include:
        • "UNLIMITED"
        • "QUOTA"
    • AuthenticationToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • User — (map)

        The user information.

        • Id — (String)

          The ID of the user.

        • Username — (String)

          The login name of the user.

        • EmailAddress — (String)

          The email address of the user.

        • GivenName — (String)

          The given name of the user.

        • Surname — (String)

          The surname of the user.

        • OrganizationId — (String)

          The ID of the organization.

        • RootFolderId — (String)

          The ID of the root folder.

        • RecycleBinFolderId — (String)

          The ID of the recycle bin folder.

        • Status — (String)

          The status of the user.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "PENDING"
        • Type — (String)

          The type of user.

          Possible values include:
          • "USER"
          • "ADMIN"
          • "POWERUSER"
          • "MINIMALUSER"
          • "WORKSPACESUSER"
        • CreatedTimestamp — (Date)

          The time when the user was created.

        • ModifiedTimestamp — (Date)

          The time when the user was modified.

        • TimeZoneId — (String)

          The time zone ID of the user.

        • Locale — (String)

          The locale of the user.

          Possible values include:
          • "en"
          • "fr"
          • "ko"
          • "de"
          • "es"
          • "ja"
          • "ru"
          • "zh_CN"
          • "zh_TW"
          • "pt_BR"
          • "default"
        • Storage — (map)

          The storage for the user.

          • StorageUtilizedInBytes — (Integer)

            The amount of storage used, in bytes.

          • StorageRule — (map)

            The storage for a user.

            • StorageAllocatedInBytes — (Integer)

              The amount of storage allocated, in bytes.

            • StorageType — (String)

              The type of storage.

              Possible values include:
              • "UNLIMITED"
              • "QUOTA"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deactivateUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deactivateUser operation

var params = {
  UserId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deactivateUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • UserId — (String)

      The ID of the user.

    • AuthenticationToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteComment(params = {}, callback) ⇒ AWS.Request

Deletes the specified comment from the document version.

Service Reference:

Examples:

Calling the deleteComment operation

var params = {
  CommentId: 'STRING_VALUE', /* required */
  DocumentId: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deleteComment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The ID of the document version.

    • CommentId — (String)

      The ID of the comment.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCustomMetadata(params = {}, callback) ⇒ AWS.Request

Deletes custom metadata from the specified resource.

Service Reference:

Examples:

Calling the deleteCustomMetadata operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  DeleteAll: true || false,
  Keys: [
    'STRING_VALUE',
    /* more items */
  ],
  VersionId: 'STRING_VALUE'
};
workdocs.deleteCustomMetadata(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

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

    • VersionId — (String)

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

    • Keys — (Array<String>)

      List of properties to remove.

    • DeleteAll — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDocument(params = {}, callback) ⇒ AWS.Request

Permanently deletes the specified document and its associated metadata.

Service Reference:

Examples:

Calling the deleteDocument operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deleteDocument(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteFolder(params = {}, callback) ⇒ AWS.Request

Permanently deletes the specified folder and its contents.

Service Reference:

Examples:

Calling the deleteFolder operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deleteFolder(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteFolderContents(params = {}, callback) ⇒ AWS.Request

Deletes the contents of the specified folder.

Service Reference:

Examples:

Calling the deleteFolderContents operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deleteFolderContents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteLabels(params = {}, callback) ⇒ AWS.Request

Deletes the specified list of labels from a resource.

Service Reference:

Examples:

Calling the deleteLabels operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  DeleteAll: true || false,
  Labels: [
    'STRING_VALUE',
    /* more items */
  ]
};
workdocs.deleteLabels(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The ID of the resource.

    • AuthenticationToken — (String)

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

    • Labels — (Array<String>)

      List of labels to delete from the resource.

    • DeleteAll — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteNotificationSubscription(params = {}, callback) ⇒ AWS.Request

Deletes the specified subscription from the specified organization.

Service Reference:

Examples:

Calling the deleteNotificationSubscription operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  SubscriptionId: 'STRING_VALUE' /* required */
};
workdocs.deleteNotificationSubscription(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SubscriptionId — (String)

      The ID of the subscription.

    • OrganizationId — (String)

      The ID of the organization.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteUser operation

var params = {
  UserId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.deleteUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • UserId — (String)

      The ID of the user.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeActivities(params = {}, callback) ⇒ AWS.Request

Describes the user activities in a specified time period.

Service Reference:

Examples:

Calling the describeActivities operation

var params = {
  AuthenticationToken: 'STRING_VALUE',
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Limit: 0,
  Marker: 'STRING_VALUE',
  OrganizationId: 'STRING_VALUE',
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  UserId: 'STRING_VALUE'
};
workdocs.describeActivities(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • StartTime — (Date)

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

    • EndTime — (Date)

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

    • OrganizationId — (String)

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

    • UserId — (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.

    • Limit — (Integer)

      The maximum number of items to return.

    • Marker — (String)

      The marker for the next set of results.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • UserActivities — (Array<map>)

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

        • Type — (String)

          The activity type.

          Possible values include:
          • "DOCUMENT_CHECKED_IN"
          • "DOCUMENT_CHECKED_OUT"
          • "DOCUMENT_RENAMED"
          • "DOCUMENT_VERSION_UPLOADED"
          • "DOCUMENT_VERSION_DELETED"
          • "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"
        • TimeStamp — (Date)

          The timestamp when the action was performed.

        • OrganizationId — (String)

          The ID of the organization.

        • Initiator — (map)

          The user who performed the action.

          • Id — (String)

            The ID of the user.

          • Username — (String)

            The name of the user.

          • GivenName — (String)

            The given name of the user before a rename operation.

          • Surname — (String)

            The surname of the user.

          • EmailAddress — (String)

            The email address of the user.

        • Participants — (map)

          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.

          • Users — (Array<map>)

            The list of users.

            • Id — (String)

              The ID of the user.

            • Username — (String)

              The name of the user.

            • GivenName — (String)

              The given name of the user before a rename operation.

            • Surname — (String)

              The surname of the user.

            • EmailAddress — (String)

              The email address of the user.

          • Groups — (Array<map>)

            The list of user groups.

            • Id — (String)

              The ID of the user group.

            • Name — (String)

              The name of the group.

        • ResourceMetadata — (map)

          The metadata of the resource involved in the user action.

          • Type — (String)

            The type of resource.

            Possible values include:
            • "FOLDER"
            • "DOCUMENT"
          • Name — (String)

            The name of the resource.

          • OriginalName — (String)

            The original name of the resource before a rename operation.

          • Id — (String)

            The ID of the resource.

          • VersionId — (String)

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

          • Owner — (map)

            The owner of the resource.

            • Id — (String)

              The ID of the user.

            • Username — (String)

              The name of the user.

            • GivenName — (String)

              The given name of the user before a rename operation.

            • Surname — (String)

              The surname of the user.

            • EmailAddress — (String)

              The email address of the user.

          • ParentId — (String)

            The parent ID of the resource before a rename operation.

        • OriginalParent — (map)

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

          • Type — (String)

            The type of resource.

            Possible values include:
            • "FOLDER"
            • "DOCUMENT"
          • Name — (String)

            The name of the resource.

          • OriginalName — (String)

            The original name of the resource before a rename operation.

          • Id — (String)

            The ID of the resource.

          • VersionId — (String)

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

          • Owner — (map)

            The owner of the resource.

            • Id — (String)

              The ID of the user.

            • Username — (String)

              The name of the user.

            • GivenName — (String)

              The given name of the user before a rename operation.

            • Surname — (String)

              The surname of the user.

            • EmailAddress — (String)

              The email address of the user.

          • ParentId — (String)

            The parent ID of the resource before a rename operation.

        • CommentMetadata — (map)

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

          • CommentId — (String)

            The ID of the comment.

          • Contributor — (map)

            The user who made the comment.

            • Id — (String)

              The ID of the user.

            • Username — (String)

              The login name of the user.

            • EmailAddress — (String)

              The email address of the user.

            • GivenName — (String)

              The given name of the user.

            • Surname — (String)

              The surname of the user.

            • OrganizationId — (String)

              The ID of the organization.

            • RootFolderId — (String)

              The ID of the root folder.

            • RecycleBinFolderId — (String)

              The ID of the recycle bin folder.

            • Status — (String)

              The status of the user.

              Possible values include:
              • "ACTIVE"
              • "INACTIVE"
              • "PENDING"
            • Type — (String)

              The type of user.

              Possible values include:
              • "USER"
              • "ADMIN"
              • "POWERUSER"
              • "MINIMALUSER"
              • "WORKSPACESUSER"
            • CreatedTimestamp — (Date)

              The time when the user was created.

            • ModifiedTimestamp — (Date)

              The time when the user was modified.

            • TimeZoneId — (String)

              The time zone ID of the user.

            • Locale — (String)

              The locale of the user.

              Possible values include:
              • "en"
              • "fr"
              • "ko"
              • "de"
              • "es"
              • "ja"
              • "ru"
              • "zh_CN"
              • "zh_TW"
              • "pt_BR"
              • "default"
            • Storage — (map)

              The storage for the user.

              • StorageUtilizedInBytes — (Integer)

                The amount of storage used, in bytes.

              • StorageRule — (map)

                The storage for a user.

                • StorageAllocatedInBytes — (Integer)

                  The amount of storage allocated, in bytes.

                • StorageType — (String)

                  The type of storage.

                  Possible values include:
                  • "UNLIMITED"
                  • "QUOTA"
          • CreatedTimestamp — (Date)

            The timestamp that the comment was created.

          • CommentStatus — (String)

            The status of the comment.

            Possible values include:
            • "DRAFT"
            • "PUBLISHED"
            • "DELETED"
          • RecipientId — (String)

            The ID of the user being replied to.

      • Marker — (String)

        The marker for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeComments(params = {}, callback) ⇒ AWS.Request

List all the comments for the specified document version.

Service Reference:

Examples:

Calling the describeComments operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.describeComments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The ID of the document version.

    • Limit — (Integer)

      The maximum number of items to return.

    • Marker — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Comments — (Array<map>)

        The list of comments for the specified document version.

        • CommentIdrequired — (String)

          The ID of the comment.

        • ParentId — (String)

          The ID of the parent comment.

        • ThreadId — (String)

          The ID of the root comment in the thread.

        • Text — (String)

          The text of the comment.

        • Contributor — (map)

          The details of the user who made the comment.

          • Id — (String)

            The ID of the user.

          • Username — (String)

            The login name of the user.

          • EmailAddress — (String)

            The email address of the user.

          • GivenName — (String)

            The given name of the user.

          • Surname — (String)

            The surname of the user.

          • OrganizationId — (String)

            The ID of the organization.

          • RootFolderId — (String)

            The ID of the root folder.

          • RecycleBinFolderId — (String)

            The ID of the recycle bin folder.

          • Status — (String)

            The status of the user.

            Possible values include:
            • "ACTIVE"
            • "INACTIVE"
            • "PENDING"
          • Type — (String)

            The type of user.

            Possible values include:
            • "USER"
            • "ADMIN"
            • "POWERUSER"
            • "MINIMALUSER"
            • "WORKSPACESUSER"
          • CreatedTimestamp — (Date)

            The time when the user was created.

          • ModifiedTimestamp — (Date)

            The time when the user was modified.

          • TimeZoneId — (String)

            The time zone ID of the user.

          • Locale — (String)

            The locale of the user.

            Possible values include:
            • "en"
            • "fr"
            • "ko"
            • "de"
            • "es"
            • "ja"
            • "ru"
            • "zh_CN"
            • "zh_TW"
            • "pt_BR"
            • "default"
          • Storage — (map)

            The storage for the user.

            • StorageUtilizedInBytes — (Integer)

              The amount of storage used, in bytes.

            • StorageRule — (map)

              The storage for a user.

              • StorageAllocatedInBytes — (Integer)

                The amount of storage allocated, in bytes.

              • StorageType — (String)

                The type of storage.

                Possible values include:
                • "UNLIMITED"
                • "QUOTA"
        • CreatedTimestamp — (Date)

          The time that the comment was created.

        • Status — (String)

          The status of the comment.

          Possible values include:
          • "DRAFT"
          • "PUBLISHED"
          • "DELETED"
        • Visibility — (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.

          Possible values include:
          • "PUBLIC"
          • "PRIVATE"
        • RecipientId — (String)

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

      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDocumentVersions(params = {}, callback) ⇒ AWS.Request

Retrieves the document versions for the specified document.

By default, only active versions are returned.

Service Reference:

Examples:

Calling the describeDocumentVersions operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Fields: 'STRING_VALUE',
  Include: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.describeDocumentVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • Marker — (String)

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

    • Limit — (Integer)

      The maximum number of versions to return with this call.

    • Include — (String)

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

    • Fields — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DocumentVersions — (Array<map>)

        The document versions.

        • Id — (String)

          The ID of the version.

        • Name — (String)

          The name of the version.

        • ContentType — (String)

          The content type of the document.

        • Size — (Integer)

          The size of the document, in bytes.

        • Signature — (String)

          The signature of the document.

        • Status — (String)

          The status of the document.

          Possible values include:
          • "INITIALIZED"
          • "ACTIVE"
        • CreatedTimestamp — (Date)

          The timestamp when the document was first uploaded.

        • ModifiedTimestamp — (Date)

          The timestamp when the document was last uploaded.

        • ContentCreatedTimestamp — (Date)

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

        • ContentModifiedTimestamp — (Date)

          The timestamp when the content of the document was modified.

        • CreatorId — (String)

          The ID of the creator.

        • Thumbnail — (map<String>)

          The thumbnail of the document.

        • Source — (map<String>)

          The source of the document.

      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeFolderContents(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeFolderContents operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Include: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE',
  Order: ASCENDING | DESCENDING,
  Sort: DATE | NAME,
  Type: ALL | DOCUMENT | FOLDER
};
workdocs.describeFolderContents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

    • Sort — (String)

      The sorting criteria.

      Possible values include:
      • "DATE"
      • "NAME"
    • Order — (String)

      The order for the contents of the folder.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • Limit — (Integer)

      The maximum number of items to return with this call.

    • Marker — (String)

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

    • Type — (String)

      The type of items.

      Possible values include:
      • "ALL"
      • "DOCUMENT"
      • "FOLDER"
    • Include — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Folders — (Array<map>)

        The subfolders in the specified folder.

        • Id — (String)

          The ID of the folder.

        • Name — (String)

          The name of the folder.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the folder was created.

        • ModifiedTimestamp — (Date)

          The time when the folder was updated.

        • ResourceState — (String)

          The resource state of the folder.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Signature — (String)

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

        • Labels — (Array<String>)

          List of labels on the folder.

        • Size — (Integer)

          The size of the folder metadata.

        • LatestVersionSize — (Integer)

          The size of the latest version of the folder metadata.

      • Documents — (Array<map>)

        The documents in the specified folder.

        • Id — (String)

          The ID of the document.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the document was created.

        • ModifiedTimestamp — (Date)

          The time when the document was updated.

        • LatestVersionMetadata — (map)

          The latest version of the document.

          • Id — (String)

            The ID of the version.

          • Name — (String)

            The name of the version.

          • ContentType — (String)

            The content type of the document.

          • Size — (Integer)

            The size of the document, in bytes.

          • Signature — (String)

            The signature of the document.

          • Status — (String)

            The status of the document.

            Possible values include:
            • "INITIALIZED"
            • "ACTIVE"
          • CreatedTimestamp — (Date)

            The timestamp when the document was first uploaded.

          • ModifiedTimestamp — (Date)

            The timestamp when the document was last uploaded.

          • ContentCreatedTimestamp — (Date)

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

          • ContentModifiedTimestamp — (Date)

            The timestamp when the content of the document was modified.

          • CreatorId — (String)

            The ID of the creator.

          • Thumbnail — (map<String>)

            The thumbnail of the document.

          • Source — (map<String>)

            The source of the document.

        • ResourceState — (String)

          The resource state.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Labels — (Array<String>)

          List of labels on the document.

      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeGroups(params = {}, callback) ⇒ AWS.Request

Describes the groups specified by query.

Service Reference:

Examples:

Calling the describeGroups operation

var params = {
  SearchQuery: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE',
  OrganizationId: 'STRING_VALUE'
};
workdocs.describeGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • SearchQuery — (String)

      A query to describe groups by group name.

    • OrganizationId — (String)

      The ID of the organization.

    • Marker — (String)

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

    • Limit — (Integer)

      The maximum number of items to return with this call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Groups — (Array<map>)

        The list of groups.

        • Id — (String)

          The ID of the user group.

        • Name — (String)

          The name of the group.

      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeNotificationSubscriptions(params = {}, callback) ⇒ AWS.Request

Lists the specified notification subscriptions.

Examples:

Calling the describeNotificationSubscriptions operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.describeNotificationSubscriptions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The ID of the organization.

    • Marker — (String)

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

    • Limit — (Integer)

      The maximum number of items to return with this call.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Subscriptions — (Array<map>)

        The subscriptions.

        • SubscriptionId — (String)

          The ID of the subscription.

        • EndPoint — (String)

          The endpoint of the subscription.

        • Protocol — (String)

          The protocol of the subscription.

          Possible values include:
          • "HTTPS"
      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeResourcePermissions(params = {}, callback) ⇒ AWS.Request

Describes the permissions of a specified resource.

Service Reference:

Examples:

Calling the describeResourcePermissions operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE',
  PrincipalId: 'STRING_VALUE'
};
workdocs.describeResourcePermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

      The ID of the resource.

    • PrincipalId — (String)

      The ID of the principal to filter permissions by.

    • Limit — (Integer)

      The maximum number of items to return with this call.

    • Marker — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Principals — (Array<map>)

        The principals.

        • Id — (String)

          The ID of the resource.

        • Type — (String)

          The type of resource.

          Possible values include:
          • "USER"
          • "GROUP"
          • "INVITE"
          • "ANONYMOUS"
          • "ORGANIZATION"
        • Roles — (Array<map>)

          The permission information for the resource.

          • Role — (String)

            The role of the user.

            Possible values include:
            • "VIEWER"
            • "CONTRIBUTOR"
            • "OWNER"
            • "COOWNER"
          • Type — (String)

            The type of permissions.

            Possible values include:
            • "DIRECT"
            • "INHERITED"
      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRootFolders(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeRootFolders operation

var params = {
  AuthenticationToken: 'STRING_VALUE', /* required */
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.describeRootFolders(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • Limit — (Integer)

      The maximum number of items to return.

    • Marker — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Folders — (Array<map>)

        The user's special folders.

        • Id — (String)

          The ID of the folder.

        • Name — (String)

          The name of the folder.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the folder was created.

        • ModifiedTimestamp — (Date)

          The time when the folder was updated.

        • ResourceState — (String)

          The resource state of the folder.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Signature — (String)

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

        • Labels — (Array<String>)

          List of labels on the folder.

        • Size — (Integer)

          The size of the folder metadata.

        • LatestVersionSize — (Integer)

          The size of the latest version of the folder metadata.

      • Marker — (String)

        The marker for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeUsers(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the describeUsers operation

var params = {
  AuthenticationToken: 'STRING_VALUE',
  Fields: 'STRING_VALUE',
  Include: ALL | ACTIVE_PENDING,
  Limit: 0,
  Marker: 'STRING_VALUE',
  Order: ASCENDING | DESCENDING,
  OrganizationId: 'STRING_VALUE',
  Query: 'STRING_VALUE',
  Sort: USER_NAME | FULL_NAME | STORAGE_LIMIT | USER_STATUS | STORAGE_USED,
  UserIds: 'STRING_VALUE'
};
workdocs.describeUsers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • OrganizationId — (String)

      The ID of the organization.

    • UserIds — (String)

      The IDs of the users.

    • Query — (String)

      A query to filter users by user name.

    • Include — (String)

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

      Possible values include:
      • "ALL"
      • "ACTIVE_PENDING"
    • Order — (String)

      The order for the results.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • Sort — (String)

      The sorting criteria.

      Possible values include:
      • "USER_NAME"
      • "FULL_NAME"
      • "STORAGE_LIMIT"
      • "USER_STATUS"
      • "STORAGE_USED"
    • Marker — (String)

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

    • Limit — (Integer)

      The maximum number of items to return.

    • Fields — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Users — (Array<map>)

        The users.

        • Id — (String)

          The ID of the user.

        • Username — (String)

          The login name of the user.

        • EmailAddress — (String)

          The email address of the user.

        • GivenName — (String)

          The given name of the user.

        • Surname — (String)

          The surname of the user.

        • OrganizationId — (String)

          The ID of the organization.

        • RootFolderId — (String)

          The ID of the root folder.

        • RecycleBinFolderId — (String)

          The ID of the recycle bin folder.

        • Status — (String)

          The status of the user.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "PENDING"
        • Type — (String)

          The type of user.

          Possible values include:
          • "USER"
          • "ADMIN"
          • "POWERUSER"
          • "MINIMALUSER"
          • "WORKSPACESUSER"
        • CreatedTimestamp — (Date)

          The time when the user was created.

        • ModifiedTimestamp — (Date)

          The time when the user was modified.

        • TimeZoneId — (String)

          The time zone ID of the user.

        • Locale — (String)

          The locale of the user.

          Possible values include:
          • "en"
          • "fr"
          • "ko"
          • "de"
          • "es"
          • "ja"
          • "ru"
          • "zh_CN"
          • "zh_TW"
          • "pt_BR"
          • "default"
        • Storage — (map)

          The storage for the user.

          • StorageUtilizedInBytes — (Integer)

            The amount of storage used, in bytes.

          • StorageRule — (map)

            The storage for a user.

            • StorageAllocatedInBytes — (Integer)

              The amount of storage allocated, in bytes.

            • StorageType — (String)

              The type of storage.

              Possible values include:
              • "UNLIMITED"
              • "QUOTA"
      • TotalNumberOfUsers — (Integer)

        The total number of users included in the results.

      • Marker — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCurrentUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getCurrentUser operation

var params = {
  AuthenticationToken: 'STRING_VALUE' /* required */
};
workdocs.getCurrentUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • User — (map)

        Metadata of the user.

        • Id — (String)

          The ID of the user.

        • Username — (String)

          The login name of the user.

        • EmailAddress — (String)

          The email address of the user.

        • GivenName — (String)

          The given name of the user.

        • Surname — (String)

          The surname of the user.

        • OrganizationId — (String)

          The ID of the organization.

        • RootFolderId — (String)

          The ID of the root folder.

        • RecycleBinFolderId — (String)

          The ID of the recycle bin folder.

        • Status — (String)

          The status of the user.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "PENDING"
        • Type — (String)

          The type of user.

          Possible values include:
          • "USER"
          • "ADMIN"
          • "POWERUSER"
          • "MINIMALUSER"
          • "WORKSPACESUSER"
        • CreatedTimestamp — (Date)

          The time when the user was created.

        • ModifiedTimestamp — (Date)

          The time when the user was modified.

        • TimeZoneId — (String)

          The time zone ID of the user.

        • Locale — (String)

          The locale of the user.

          Possible values include:
          • "en"
          • "fr"
          • "ko"
          • "de"
          • "es"
          • "ja"
          • "ru"
          • "zh_CN"
          • "zh_TW"
          • "pt_BR"
          • "default"
        • Storage — (map)

          The storage for the user.

          • StorageUtilizedInBytes — (Integer)

            The amount of storage used, in bytes.

          • StorageRule — (map)

            The storage for a user.

            • StorageAllocatedInBytes — (Integer)

              The amount of storage allocated, in bytes.

            • StorageType — (String)

              The type of storage.

              Possible values include:
              • "UNLIMITED"
              • "QUOTA"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDocument(params = {}, callback) ⇒ AWS.Request

Retrieves details of a document.

Service Reference:

Examples:

Calling the getDocument operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  IncludeCustomMetadata: true || false
};
workdocs.getDocument(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • IncludeCustomMetadata — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metadata — (map)

        The metadata details of the document.

        • Id — (String)

          The ID of the document.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the document was created.

        • ModifiedTimestamp — (Date)

          The time when the document was updated.

        • LatestVersionMetadata — (map)

          The latest version of the document.

          • Id — (String)

            The ID of the version.

          • Name — (String)

            The name of the version.

          • ContentType — (String)

            The content type of the document.

          • Size — (Integer)

            The size of the document, in bytes.

          • Signature — (String)

            The signature of the document.

          • Status — (String)

            The status of the document.

            Possible values include:
            • "INITIALIZED"
            • "ACTIVE"
          • CreatedTimestamp — (Date)

            The timestamp when the document was first uploaded.

          • ModifiedTimestamp — (Date)

            The timestamp when the document was last uploaded.

          • ContentCreatedTimestamp — (Date)

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

          • ContentModifiedTimestamp — (Date)

            The timestamp when the content of the document was modified.

          • CreatorId — (String)

            The ID of the creator.

          • Thumbnail — (map<String>)

            The thumbnail of the document.

          • Source — (map<String>)

            The source of the document.

        • ResourceState — (String)

          The resource state.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Labels — (Array<String>)

          List of labels on the document.

      • CustomMetadata — (map<String>)

        The custom metadata on the document.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDocumentPath(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getDocumentPath operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Fields: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.getDocumentPath(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • Limit — (Integer)

      The maximum number of levels in the hierarchy to return.

    • Fields — (String)

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

    • Marker — (String)

      This value is not supported.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Path — (map)

        The path information.

        • Components — (Array<map>)

          The components of the resource path.

          • Id — (String)

            The ID of the resource path.

          • Name — (String)

            The name of the resource path.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDocumentVersion(params = {}, callback) ⇒ AWS.Request

Retrieves version metadata for the specified document.

Service Reference:

Examples:

Calling the getDocumentVersion operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Fields: 'STRING_VALUE',
  IncludeCustomMetadata: true || false
};
workdocs.getDocumentVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The version ID of the document.

    • Fields — (String)

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

    • IncludeCustomMetadata — (Boolean)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metadata — (map)

        The version metadata.

        • Id — (String)

          The ID of the version.

        • Name — (String)

          The name of the version.

        • ContentType — (String)

          The content type of the document.

        • Size — (Integer)

          The size of the document, in bytes.

        • Signature — (String)

          The signature of the document.

        • Status — (String)

          The status of the document.

          Possible values include:
          • "INITIALIZED"
          • "ACTIVE"
        • CreatedTimestamp — (Date)

          The timestamp when the document was first uploaded.

        • ModifiedTimestamp — (Date)

          The timestamp when the document was last uploaded.

        • ContentCreatedTimestamp — (Date)

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

        • ContentModifiedTimestamp — (Date)

          The timestamp when the content of the document was modified.

        • CreatorId — (String)

          The ID of the creator.

        • Thumbnail — (map<String>)

          The thumbnail of the document.

        • Source — (map<String>)

          The source of the document.

      • CustomMetadata — (map<String>)

        The custom metadata on the document version.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFolder(params = {}, callback) ⇒ AWS.Request

Retrieves the metadata of the specified folder.

Service Reference:

Examples:

Calling the getFolder operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  IncludeCustomMetadata: true || false
};
workdocs.getFolder(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

    • IncludeCustomMetadata — (Boolean)

      Set to TRUE to include custom metadata in the response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metadata — (map)

        The metadata of the folder.

        • Id — (String)

          The ID of the folder.

        • Name — (String)

          The name of the folder.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the folder was created.

        • ModifiedTimestamp — (Date)

          The time when the folder was updated.

        • ResourceState — (String)

          The resource state of the folder.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Signature — (String)

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

        • Labels — (Array<String>)

          List of labels on the folder.

        • Size — (Integer)

          The size of the folder metadata.

        • LatestVersionSize — (Integer)

          The size of the latest version of the folder metadata.

      • CustomMetadata — (map<String>)

        The custom metadata on the folder.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getFolderPath(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getFolderPath operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Fields: 'STRING_VALUE',
  Limit: 0,
  Marker: 'STRING_VALUE'
};
workdocs.getFolderPath(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

    • Limit — (Integer)

      The maximum number of levels in the hierarchy to return.

    • Fields — (String)

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

    • Marker — (String)

      This value is not supported.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Path — (map)

        The path information.

        • Components — (Array<map>)

          The components of the resource path.

          • Id — (String)

            The ID of the resource path.

          • Name — (String)

            The name of the resource path.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

initiateDocumentVersionUpload(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the initiateDocumentVersionUpload operation

var params = {
  ParentFolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  ContentCreatedTimestamp: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ContentModifiedTimestamp: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ContentType: 'STRING_VALUE',
  DocumentSizeInBytes: 0,
  Id: 'STRING_VALUE',
  Name: 'STRING_VALUE'
};
workdocs.initiateDocumentVersionUpload(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • Id — (String)

      The ID of the document.

    • Name — (String)

      The name of the document.

    • ContentCreatedTimestamp — (Date)

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

    • ContentModifiedTimestamp — (Date)

      The timestamp when the content of the document was modified.

    • ContentType — (String)

      The content type of the document.

    • DocumentSizeInBytes — (Integer)

      The size of the document, in bytes.

    • ParentFolderId — (String)

      The ID of the parent folder.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Metadata — (map)

        The document metadata.

        • Id — (String)

          The ID of the document.

        • CreatorId — (String)

          The ID of the creator.

        • ParentFolderId — (String)

          The ID of the parent folder.

        • CreatedTimestamp — (Date)

          The time when the document was created.

        • ModifiedTimestamp — (Date)

          The time when the document was updated.

        • LatestVersionMetadata — (map)

          The latest version of the document.

          • Id — (String)

            The ID of the version.

          • Name — (String)

            The name of the version.

          • ContentType — (String)

            The content type of the document.

          • Size — (Integer)

            The size of the document, in bytes.

          • Signature — (String)

            The signature of the document.

          • Status — (String)

            The status of the document.

            Possible values include:
            • "INITIALIZED"
            • "ACTIVE"
          • CreatedTimestamp — (Date)

            The timestamp when the document was first uploaded.

          • ModifiedTimestamp — (Date)

            The timestamp when the document was last uploaded.

          • ContentCreatedTimestamp — (Date)

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

          • ContentModifiedTimestamp — (Date)

            The timestamp when the content of the document was modified.

          • CreatorId — (String)

            The ID of the creator.

          • Thumbnail — (map<String>)

            The thumbnail of the document.

          • Source — (map<String>)

            The source of the document.

        • ResourceState — (String)

          The resource state.

          Possible values include:
          • "ACTIVE"
          • "RESTORING"
          • "RECYCLING"
          • "RECYCLED"
        • Labels — (Array<String>)

          List of labels on the document.

      • UploadMetadata — (map)

        The upload metadata.

        • UploadUrl — (String)

          The URL of the upload.

        • SignedHeaders — (map<String>)

          The signed headers.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeAllResourcePermissions(params = {}, callback) ⇒ AWS.Request

Removes all the permissions from the specified resource.

Service Reference:

Examples:

Calling the removeAllResourcePermissions operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE'
};
workdocs.removeAllResourcePermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

      The ID of the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeResourcePermission(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the removeResourcePermission operation

var params = {
  PrincipalId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  PrincipalType: USER | GROUP | INVITE | ANONYMOUS | ORGANIZATION
};
workdocs.removeResourcePermission(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • ResourceId — (String)

      The ID of the resource.

    • PrincipalId — (String)

      The principal ID of the resource.

    • PrincipalType — (String)

      The principal type of the resource.

      Possible values include:
      • "USER"
      • "GROUP"
      • "INVITE"
      • "ANONYMOUS"
      • "ORGANIZATION"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDocument(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateDocument operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  ParentFolderId: 'STRING_VALUE',
  ResourceState: ACTIVE | RESTORING | RECYCLING | RECYCLED
};
workdocs.updateDocument(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • Name — (String)

      The name of the document.

    • ParentFolderId — (String)

      The ID of the parent folder.

    • ResourceState — (String)

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

      Possible values include:
      • "ACTIVE"
      • "RESTORING"
      • "RECYCLING"
      • "RECYCLED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateDocumentVersion(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateDocumentVersion operation

var params = {
  DocumentId: 'STRING_VALUE', /* required */
  VersionId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  VersionStatus: ACTIVE
};
workdocs.updateDocumentVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • DocumentId — (String)

      The ID of the document.

    • VersionId — (String)

      The version ID of the document.

    • VersionStatus — (String)

      The status of the version.

      Possible values include:
      • "ACTIVE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateFolder(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateFolder operation

var params = {
  FolderId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  ParentFolderId: 'STRING_VALUE',
  ResourceState: ACTIVE | RESTORING | RECYCLING | RECYCLED
};
workdocs.updateFolder(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • FolderId — (String)

      The ID of the folder.

    • Name — (String)

      The name of the folder.

    • ParentFolderId — (String)

      The ID of the parent folder.

    • ResourceState — (String)

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

      Possible values include:
      • "ACTIVE"
      • "RESTORING"
      • "RECYCLING"
      • "RECYCLED"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the updateUser operation

var params = {
  UserId: 'STRING_VALUE', /* required */
  AuthenticationToken: 'STRING_VALUE',
  GivenName: 'STRING_VALUE',
  GrantPoweruserPrivileges: TRUE | FALSE,
  Locale: en | fr | ko | de | es | ja | ru | zh_CN | zh_TW | pt_BR | default,
  StorageRule: {
    StorageAllocatedInBytes: 0,
    StorageType: UNLIMITED | QUOTA
  },
  Surname: 'STRING_VALUE',
  TimeZoneId: 'STRING_VALUE',
  Type: USER | ADMIN | POWERUSER | MINIMALUSER | WORKSPACESUSER
};
workdocs.updateUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • AuthenticationToken — (String)

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

    • UserId — (String)

      The ID of the user.

    • GivenName — (String)

      The given name of the user.

    • Surname — (String)

      The surname of the user.

    • Type — (String)

      The type of the user.

      Possible values include:
      • "USER"
      • "ADMIN"
      • "POWERUSER"
      • "MINIMALUSER"
      • "WORKSPACESUSER"
    • StorageRule — (map)

      The amount of storage for the user.

      • StorageAllocatedInBytes — (Integer)

        The amount of storage allocated, in bytes.

      • StorageType — (String)

        The type of storage.

        Possible values include:
        • "UNLIMITED"
        • "QUOTA"
    • TimeZoneId — (String)

      The time zone ID of the user.

    • Locale — (String)

      The locale of the user.

      Possible values include:
      • "en"
      • "fr"
      • "ko"
      • "de"
      • "es"
      • "ja"
      • "ru"
      • "zh_CN"
      • "zh_TW"
      • "pt_BR"
      • "default"
    • GrantPoweruserPrivileges — (String)

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

      Possible values include:
      • "TRUE"
      • "FALSE"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • User — (map)

        The user information.

        • Id — (String)

          The ID of the user.

        • Username — (String)

          The login name of the user.

        • EmailAddress — (String)

          The email address of the user.

        • GivenName — (String)

          The given name of the user.

        • Surname — (String)

          The surname of the user.

        • OrganizationId — (String)

          The ID of the organization.

        • RootFolderId — (String)

          The ID of the root folder.

        • RecycleBinFolderId — (String)

          The ID of the recycle bin folder.

        • Status — (String)

          The status of the user.

          Possible values include:
          • "ACTIVE"
          • "INACTIVE"
          • "PENDING"
        • Type — (String)

          The type of user.

          Possible values include:
          • "USER"
          • "ADMIN"
          • "POWERUSER"
          • "MINIMALUSER"
          • "WORKSPACESUSER"
        • CreatedTimestamp — (Date)

          The time when the user was created.

        • ModifiedTimestamp — (Date)

          The time when the user was modified.

        • TimeZoneId — (String)

          The time zone ID of the user.

        • Locale — (String)

          The locale of the user.

          Possible values include:
          • "en"
          • "fr"
          • "ko"
          • "de"
          • "es"
          • "ja"
          • "ru"
          • "zh_CN"
          • "zh_TW"
          • "pt_BR"
          • "default"
        • Storage — (map)

          The storage for the user.

          • StorageUtilizedInBytes — (Integer)

            The amount of storage used, in bytes.

          • StorageRule — (map)

            The storage for a user.

            • StorageAllocatedInBytes — (Integer)

              The amount of storage allocated, in bytes.

            • StorageType — (String)

              The type of storage.

              Possible values include:
              • "UNLIMITED"
              • "QUOTA"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.