You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::WorkDocs::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



142
143
144
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 142

def initialize(*args)
  super
end

Instance Method Details

#abort_document_version_upload(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.abort_document_version_upload({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, String)

    The ID of the version.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



178
179
180
181
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 178

def abort_document_version_upload(params = {}, options = {})
  req = build_request(:abort_document_version_upload, params)
  req.send_request(options)
end

#activate_user(params = {}) ⇒ Types::ActivateUserResponse

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

Examples:

Request syntax with placeholder values


resp = client.activate_user({
  user_id: "IdType", # required
  authentication_token: "AuthenticationHeaderType",
})

Response structure


resp.user.id #=> String
resp.user.username #=> String
resp.user.email_address #=> String
resp.user.given_name #=> String
resp.user.surname #=> String
resp.user.organization_id #=> String
resp.user.root_folder_id #=> String
resp.user.recycle_bin_folder_id #=> String
resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.user.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.user.created_timestamp #=> Time
resp.user.modified_timestamp #=> Time
resp.user.time_zone_id #=> String
resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.user.storage.storage_utilized_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :user_id (required, String)

    The ID of the user.

  • :authentication_token (String)

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

Returns:

See Also:



229
230
231
232
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 229

def activate_user(params = {}, options = {})
  req = build_request(:activate_user, params)
  req.send_request(options)
end

#add_resource_permissions(params = {}) ⇒ Types::AddResourcePermissionsResponse

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

Examples:

Request syntax with placeholder values


resp = client.add_resource_permissions({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
  principals: [ # required
    {
      id: "IdType", # required
      type: "USER", # required, accepts USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION
      role: "VIEWER", # required, accepts VIEWER, CONTRIBUTOR, OWNER, COOWNER
    },
  ],
  notification_options: {
    send_email: false,
    email_message: "MessageType",
  },
})

Response structure


resp.share_results #=> Array
resp.share_results[0].principal_id #=> String
resp.share_results[0].role #=> String, one of "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER"
resp.share_results[0].status #=> String, one of "SUCCESS", "FAILURE"
resp.share_results[0].share_id #=> String
resp.share_results[0].status_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

    The ID of the resource.

  • :principals (required, Array<Types::SharePrincipal>)

    The users, groups, or organization being granted permission.

  • :notification_options (Types::NotificationOptions)

    The notification options.

Returns:

See Also:



287
288
289
290
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 287

def add_resource_permissions(params = {}, options = {})
  req = build_request(:add_resource_permissions, params)
  req.send_request(options)
end

#create_comment(params = {}) ⇒ Types::CreateCommentResponse

Adds a new comment to the specified document version.

Examples:

Request syntax with placeholder values


resp = client.create_comment({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
  parent_id: "CommentIdType",
  thread_id: "CommentIdType",
  text: "CommentTextType", # required
  visibility: "PUBLIC", # accepts PUBLIC, PRIVATE
  notify_collaborators: false,
})

Response structure


resp.comment.comment_id #=> String
resp.comment.parent_id #=> String
resp.comment.thread_id #=> String
resp.comment.text #=> String
resp.comment.contributor.id #=> String
resp.comment.contributor.username #=> String
resp.comment.contributor.email_address #=> String
resp.comment.contributor.given_name #=> String
resp.comment.contributor.surname #=> String
resp.comment.contributor.organization_id #=> String
resp.comment.contributor.root_folder_id #=> String
resp.comment.contributor.recycle_bin_folder_id #=> String
resp.comment.contributor.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.comment.contributor.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.comment.contributor.created_timestamp #=> Time
resp.comment.contributor.modified_timestamp #=> Time
resp.comment.contributor.time_zone_id #=> String
resp.comment.contributor.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.comment.contributor.storage.storage_utilized_in_bytes #=> Integer
resp.comment.contributor.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.comment.contributor.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
resp.comment.created_timestamp #=> Time
resp.comment.status #=> String, one of "DRAFT", "PUBLISHED", "DELETED"
resp.comment.visibility #=> String, one of "PUBLIC", "PRIVATE"
resp.comment.recipient_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, String)

    The ID of the document version.

  • :parent_id (String)

    The ID of the parent comment.

  • :thread_id (String)

    The ID of the root comment in the thread.

  • :text (required, 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.

  • :notify_collaborators (Boolean)

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

Returns:

See Also:



373
374
375
376
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 373

def create_comment(params = {}, options = {})
  req = build_request(:create_comment, params)
  req.send_request(options)
end

#create_custom_metadata(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType",
  custom_metadata: { # required
    "CustomMetadataKeyType" => "CustomMetadataValueType",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

    The ID of the resource.

  • :version_id (String)

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

  • :custom_metadata (required, Hash<String,String>)

    Custom metadata in the form of name-value pairs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



413
414
415
416
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 413

def (params = {}, options = {})
  req = build_request(:create_custom_metadata, params)
  req.send_request(options)
end

#create_folder(params = {}) ⇒ Types::CreateFolderResponse

Creates a folder with the specified name and parent folder.

Examples:

Request syntax with placeholder values


resp = client.create_folder({
  authentication_token: "AuthenticationHeaderType",
  name: "ResourceNameType",
  parent_folder_id: "ResourceIdType", # required
})

Response structure


resp..id #=> String
resp..name #=> String
resp..creator_id #=> String
resp..parent_folder_id #=> String
resp..created_timestamp #=> Time
resp..modified_timestamp #=> Time
resp..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp..signature #=> String
resp..labels #=> Array
resp..labels[0] #=> String
resp..size #=> Integer
resp..latest_version_size #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (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.

  • :parent_folder_id (required, String)

    The ID of the parent folder.

Returns:

See Also:



462
463
464
465
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 462

def create_folder(params = {}, options = {})
  req = build_request(:create_folder, params)
  req.send_request(options)
end

#create_labels(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.create_labels({
  resource_id: "ResourceIdType", # required
  labels: ["SharedLabel"], # required
  authentication_token: "AuthenticationHeaderType",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The ID of the resource.

  • :labels (required, Array<String>)

    List of labels to add to the resource.

  • :authentication_token (String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



495
496
497
498
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 495

def create_labels(params = {}, options = {})
  req = build_request(:create_labels, params)
  req.send_request(options)
end

#create_notification_subscription(params = {}) ⇒ Types::CreateNotificationSubscriptionResponse

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.

Examples:

Request syntax with placeholder values


resp = client.create_notification_subscription({
  organization_id: "IdType", # required
  endpoint: "SubscriptionEndPointType", # required
  protocol: "HTTPS", # required, accepts HTTPS
  subscription_type: "ALL", # required, accepts ALL
})

Response structure


resp.subscription.subscription_id #=> String
resp.subscription.end_point #=> String
resp.subscription.protocol #=> String, one of "HTTPS"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization.

  • :endpoint (required, String)

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

  • :protocol (required, String)

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

  • :subscription_type (required, String)

    The notification type.

Returns:

See Also:



547
548
549
550
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 547

def create_notification_subscription(params = {}, options = {})
  req = build_request(:create_notification_subscription, params)
  req.send_request(options)
end

#create_user(params = {}) ⇒ Types::CreateUserResponse

Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE". New users can access Amazon WorkDocs.

Examples:

Request syntax with placeholder values


resp = client.create_user({
  organization_id: "IdType",
  username: "UsernameType", # required
  email_address: "EmailAddressType",
  given_name: "UserAttributeValueType", # required
  surname: "UserAttributeValueType", # required
  password: "PasswordType", # required
  time_zone_id: "TimeZoneIdType",
  storage_rule: {
    storage_allocated_in_bytes: 1,
    storage_type: "UNLIMITED", # accepts UNLIMITED, QUOTA
  },
  authentication_token: "AuthenticationHeaderType",
})

Response structure


resp.user.id #=> String
resp.user.username #=> String
resp.user.email_address #=> String
resp.user.given_name #=> String
resp.user.surname #=> String
resp.user.organization_id #=> String
resp.user.root_folder_id #=> String
resp.user.recycle_bin_folder_id #=> String
resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.user.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.user.created_timestamp #=> Time
resp.user.modified_timestamp #=> Time
resp.user.time_zone_id #=> String
resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.user.storage.storage_utilized_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :organization_id (String)

    The ID of the organization.

  • :username (required, String)

    The login name of the user.

  • :email_address (String)

    The email address of the user.

  • :given_name (required, String)

    The given name of the user.

  • :surname (required, String)

    The surname of the user.

  • :password (required, String)

    The password of the user.

  • :time_zone_id (String)

    The time zone ID of the user.

  • :storage_rule (Types::StorageRuleType)

    The amount of storage for the user.

  • :authentication_token (String)

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

Returns:

See Also:



630
631
632
633
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 630

def create_user(params = {}, options = {})
  req = build_request(:create_user, params)
  req.send_request(options)
end

#deactivate_user(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.deactivate_user({
  user_id: "IdType", # required
  authentication_token: "AuthenticationHeaderType",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :user_id (required, String)

    The ID of the user.

  • :authentication_token (String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



659
660
661
662
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 659

def deactivate_user(params = {}, options = {})
  req = build_request(:deactivate_user, params)
  req.send_request(options)
end

#delete_comment(params = {}) ⇒ Struct

Deletes the specified comment from the document version.

Examples:

Request syntax with placeholder values


resp = client.delete_comment({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
  comment_id: "CommentIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, String)

    The ID of the document version.

  • :comment_id (required, String)

    The ID of the comment.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



695
696
697
698
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 695

def delete_comment(params = {}, options = {})
  req = build_request(:delete_comment, params)
  req.send_request(options)
end

#delete_custom_metadata(params = {}) ⇒ Struct

Deletes custom metadata from the specified resource.

Examples:

Request syntax with placeholder values


resp = client.({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType",
  keys: ["CustomMetadataKeyType"],
  delete_all: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

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

  • :version_id (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.

  • :delete_all (Boolean)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



737
738
739
740
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 737

def (params = {}, options = {})
  req = build_request(:delete_custom_metadata, params)
  req.send_request(options)
end

#delete_document(params = {}) ⇒ Struct

Permanently deletes the specified document and its associated metadata.

Examples:

Request syntax with placeholder values


resp = client.delete_document({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



766
767
768
769
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 766

def delete_document(params = {}, options = {})
  req = build_request(:delete_document, params)
  req.send_request(options)
end

#delete_folder(params = {}) ⇒ Struct

Permanently deletes the specified folder and its contents.

Examples:

Request syntax with placeholder values


resp = client.delete_folder({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "ResourceIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, String)

    The ID of the folder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



794
795
796
797
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 794

def delete_folder(params = {}, options = {})
  req = build_request(:delete_folder, params)
  req.send_request(options)
end

#delete_folder_contents(params = {}) ⇒ Struct

Deletes the contents of the specified folder.

Examples:

Request syntax with placeholder values


resp = client.delete_folder_contents({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "ResourceIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, String)

    The ID of the folder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



822
823
824
825
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 822

def delete_folder_contents(params = {}, options = {})
  req = build_request(:delete_folder_contents, params)
  req.send_request(options)
end

#delete_labels(params = {}) ⇒ Struct

Deletes the specified list of labels from a resource.

Examples:

Request syntax with placeholder values


resp = client.delete_labels({
  resource_id: "ResourceIdType", # required
  authentication_token: "AuthenticationHeaderType",
  labels: ["SharedLabel"],
  delete_all: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The ID of the resource.

  • :authentication_token (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.

  • :delete_all (Boolean)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



858
859
860
861
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 858

def delete_labels(params = {}, options = {})
  req = build_request(:delete_labels, params)
  req.send_request(options)
end

#delete_notification_subscription(params = {}) ⇒ Struct

Deletes the specified subscription from the specified organization.

Examples:

Request syntax with placeholder values


resp = client.delete_notification_subscription({
  subscription_id: "IdType", # required
  organization_id: "IdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :subscription_id (required, String)

    The ID of the subscription.

  • :organization_id (required, String)

    The ID of the organization.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



884
885
886
887
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 884

def delete_notification_subscription(params = {}, options = {})
  req = build_request(:delete_notification_subscription, params)
  req.send_request(options)
end

#delete_user(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.delete_user({
  authentication_token: "AuthenticationHeaderType",
  user_id: "IdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :user_id (required, String)

    The ID of the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



912
913
914
915
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 912

def delete_user(params = {}, options = {})
  req = build_request(:delete_user, params)
  req.send_request(options)
end

#describe_activities(params = {}) ⇒ Types::DescribeActivitiesResponse

Describes the user activities in a specified time period.

Examples:

Request syntax with placeholder values


resp = client.describe_activities({
  authentication_token: "AuthenticationHeaderType",
  start_time: Time.now,
  end_time: Time.now,
  organization_id: "IdType",
  user_id: "IdType",
  limit: 1,
  marker: "MarkerType",
})

Response structure


resp.user_activities #=> Array
resp.user_activities[0].type #=> String, one of "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"
resp.user_activities[0].time_stamp #=> Time
resp.user_activities[0].organization_id #=> String
resp.user_activities[0].initiator.id #=> String
resp.user_activities[0].initiator.username #=> String
resp.user_activities[0].initiator.given_name #=> String
resp.user_activities[0].initiator.surname #=> String
resp.user_activities[0].initiator.email_address #=> String
resp.user_activities[0].participants.users #=> Array
resp.user_activities[0].participants.users[0].id #=> String
resp.user_activities[0].participants.users[0].username #=> String
resp.user_activities[0].participants.users[0].given_name #=> String
resp.user_activities[0].participants.users[0].surname #=> String
resp.user_activities[0].participants.users[0].email_address #=> String
resp.user_activities[0].participants.groups #=> Array
resp.user_activities[0].participants.groups[0].id #=> String
resp.user_activities[0].participants.groups[0].name #=> String
resp.user_activities[0]..type #=> String, one of "FOLDER", "DOCUMENT"
resp.user_activities[0]..name #=> String
resp.user_activities[0]..original_name #=> String
resp.user_activities[0]..id #=> String
resp.user_activities[0]..version_id #=> String
resp.user_activities[0]..owner.id #=> String
resp.user_activities[0]..owner.username #=> String
resp.user_activities[0]..owner.given_name #=> String
resp.user_activities[0]..owner.surname #=> String
resp.user_activities[0]..owner.email_address #=> String
resp.user_activities[0]..parent_id #=> String
resp.user_activities[0].original_parent.type #=> String, one of "FOLDER", "DOCUMENT"
resp.user_activities[0].original_parent.name #=> String
resp.user_activities[0].original_parent.original_name #=> String
resp.user_activities[0].original_parent.id #=> String
resp.user_activities[0].original_parent.version_id #=> String
resp.user_activities[0].original_parent.owner.id #=> String
resp.user_activities[0].original_parent.owner.username #=> String
resp.user_activities[0].original_parent.owner.given_name #=> String
resp.user_activities[0].original_parent.owner.surname #=> String
resp.user_activities[0].original_parent.owner.email_address #=> String
resp.user_activities[0].original_parent.parent_id #=> String
resp.user_activities[0]..comment_id #=> String
resp.user_activities[0]..contributor.id #=> String
resp.user_activities[0]..contributor.username #=> String
resp.user_activities[0]..contributor.email_address #=> String
resp.user_activities[0]..contributor.given_name #=> String
resp.user_activities[0]..contributor.surname #=> String
resp.user_activities[0]..contributor.organization_id #=> String
resp.user_activities[0]..contributor.root_folder_id #=> String
resp.user_activities[0]..contributor.recycle_bin_folder_id #=> String
resp.user_activities[0]..contributor.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.user_activities[0]..contributor.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.user_activities[0]..contributor.created_timestamp #=> Time
resp.user_activities[0]..contributor.modified_timestamp #=> Time
resp.user_activities[0]..contributor.time_zone_id #=> String
resp.user_activities[0]..contributor.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.user_activities[0]..contributor.storage.storage_utilized_in_bytes #=> Integer
resp.user_activities[0]..contributor.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.user_activities[0]..contributor.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
resp.user_activities[0]..created_timestamp #=> Time
resp.user_activities[0]..comment_status #=> String, one of "DRAFT", "PUBLISHED", "DELETED"
resp.user_activities[0]..recipient_id #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :start_time (Time, DateTime, Date, Integer, String)

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

  • :end_time (Time, DateTime, Date, Integer, String)

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

  • :organization_id (String)

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

  • :user_id (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.

Returns:

See Also:



1035
1036
1037
1038
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1035

def describe_activities(params = {}, options = {})
  req = build_request(:describe_activities, params)
  req.send_request(options)
end

#describe_comments(params = {}) ⇒ Types::DescribeCommentsResponse

List all the comments for the specified document version.

Examples:

Request syntax with placeholder values


resp = client.describe_comments({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
  limit: 1,
  marker: "MarkerType",
})

Response structure


resp.comments #=> Array
resp.comments[0].comment_id #=> String
resp.comments[0].parent_id #=> String
resp.comments[0].thread_id #=> String
resp.comments[0].text #=> String
resp.comments[0].contributor.id #=> String
resp.comments[0].contributor.username #=> String
resp.comments[0].contributor.email_address #=> String
resp.comments[0].contributor.given_name #=> String
resp.comments[0].contributor.surname #=> String
resp.comments[0].contributor.organization_id #=> String
resp.comments[0].contributor.root_folder_id #=> String
resp.comments[0].contributor.recycle_bin_folder_id #=> String
resp.comments[0].contributor.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.comments[0].contributor.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.comments[0].contributor.created_timestamp #=> Time
resp.comments[0].contributor.modified_timestamp #=> Time
resp.comments[0].contributor.time_zone_id #=> String
resp.comments[0].contributor.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.comments[0].contributor.storage.storage_utilized_in_bytes #=> Integer
resp.comments[0].contributor.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.comments[0].contributor.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
resp.comments[0].created_timestamp #=> Time
resp.comments[0].status #=> String, one of "DRAFT", "PUBLISHED", "DELETED"
resp.comments[0].visibility #=> String, one of "PUBLIC", "PRIVATE"
resp.comments[0].recipient_id #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, 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.

Returns:

See Also:



1109
1110
1111
1112
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1109

def describe_comments(params = {}, options = {})
  req = build_request(:describe_comments, params)
  req.send_request(options)
end

#describe_document_versions(params = {}) ⇒ Types::DescribeDocumentVersionsResponse

Retrieves the document versions for the specified document.

By default, only active versions are returned.

Examples:

Request syntax with placeholder values


resp = client.describe_document_versions({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  marker: "PageMarkerType",
  limit: 1,
  include: "FieldNamesType",
  fields: "FieldNamesType",
})

Response structure


resp.document_versions #=> Array
resp.document_versions[0].id #=> String
resp.document_versions[0].name #=> String
resp.document_versions[0].content_type #=> String
resp.document_versions[0].size #=> Integer
resp.document_versions[0].signature #=> String
resp.document_versions[0].status #=> String, one of "INITIALIZED", "ACTIVE"
resp.document_versions[0].created_timestamp #=> Time
resp.document_versions[0].modified_timestamp #=> Time
resp.document_versions[0].content_created_timestamp #=> Time
resp.document_versions[0].content_modified_timestamp #=> Time
resp.document_versions[0].creator_id #=> String
resp.document_versions[0].thumbnail #=> Hash
resp.document_versions[0].thumbnail["DocumentThumbnailType"] #=> String
resp.document_versions[0].source #=> Hash
resp.document_versions[0].source["DocumentSourceType"] #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, 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.

Returns:

See Also:



1181
1182
1183
1184
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1181

def describe_document_versions(params = {}, options = {})
  req = build_request(:describe_document_versions, params)
  req.send_request(options)
end

#describe_folder_contents(params = {}) ⇒ Types::DescribeFolderContentsResponse

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.

Examples:

Request syntax with placeholder values


resp = client.describe_folder_contents({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "ResourceIdType", # required
  sort: "DATE", # accepts DATE, NAME
  order: "ASCENDING", # accepts ASCENDING, DESCENDING
  limit: 1,
  marker: "PageMarkerType",
  type: "ALL", # accepts ALL, DOCUMENT, FOLDER
  include: "FieldNamesType",
})

Response structure


resp.folders #=> Array
resp.folders[0].id #=> String
resp.folders[0].name #=> String
resp.folders[0].creator_id #=> String
resp.folders[0].parent_folder_id #=> String
resp.folders[0].created_timestamp #=> Time
resp.folders[0].modified_timestamp #=> Time
resp.folders[0].resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp.folders[0].signature #=> String
resp.folders[0].labels #=> Array
resp.folders[0].labels[0] #=> String
resp.folders[0].size #=> Integer
resp.folders[0].latest_version_size #=> Integer
resp.documents #=> Array
resp.documents[0].id #=> String
resp.documents[0].creator_id #=> String
resp.documents[0].parent_folder_id #=> String
resp.documents[0].created_timestamp #=> Time
resp.documents[0].modified_timestamp #=> Time
resp.documents[0]..id #=> String
resp.documents[0]..name #=> String
resp.documents[0]..content_type #=> String
resp.documents[0]..size #=> Integer
resp.documents[0]..signature #=> String
resp.documents[0]..status #=> String, one of "INITIALIZED", "ACTIVE"
resp.documents[0]..created_timestamp #=> Time
resp.documents[0]..modified_timestamp #=> Time
resp.documents[0]..content_created_timestamp #=> Time
resp.documents[0]..content_modified_timestamp #=> Time
resp.documents[0]..creator_id #=> String
resp.documents[0]..thumbnail #=> Hash
resp.documents[0]..thumbnail["DocumentThumbnailType"] #=> String
resp.documents[0]..source #=> Hash
resp.documents[0]..source["DocumentSourceType"] #=> String
resp.documents[0].resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp.documents[0].labels #=> Array
resp.documents[0].labels[0] #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, String)

    The ID of the folder.

  • :sort (String)

    The sorting criteria.

  • :order (String)

    The order for the contents of the folder.

  • :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.

  • :include (String)

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

Returns:

See Also:



1286
1287
1288
1289
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1286

def describe_folder_contents(params = {}, options = {})
  req = build_request(:describe_folder_contents, params)
  req.send_request(options)
end

#describe_groups(params = {}) ⇒ Types::DescribeGroupsResponse

Describes the groups specified by query.

Examples:

Request syntax with placeholder values


resp = client.describe_groups({
  authentication_token: "AuthenticationHeaderType",
  search_query: "SearchQueryType", # required
  organization_id: "IdType",
  marker: "MarkerType",
  limit: 1,
})

Response structure


resp.groups #=> Array
resp.groups[0].id #=> String
resp.groups[0].name #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :search_query (required, String)

    A query to describe groups by group name.

  • :organization_id (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.

Returns:

See Also:



1337
1338
1339
1340
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1337

def describe_groups(params = {}, options = {})
  req = build_request(:describe_groups, params)
  req.send_request(options)
end

#describe_notification_subscriptions(params = {}) ⇒ Types::DescribeNotificationSubscriptionsResponse

Lists the specified notification subscriptions.

Examples:

Request syntax with placeholder values


resp = client.describe_notification_subscriptions({
  organization_id: "IdType", # required
  marker: "PageMarkerType",
  limit: 1,
})

Response structure


resp.subscriptions #=> Array
resp.subscriptions[0].subscription_id #=> String
resp.subscriptions[0].end_point #=> String
resp.subscriptions[0].protocol #=> String, one of "HTTPS"
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :organization_id (required, 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.

Returns:

See Also:



1379
1380
1381
1382
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1379

def describe_notification_subscriptions(params = {}, options = {})
  req = build_request(:describe_notification_subscriptions, params)
  req.send_request(options)
end

#describe_resource_permissions(params = {}) ⇒ Types::DescribeResourcePermissionsResponse

Describes the permissions of a specified resource.

Examples:

Request syntax with placeholder values


resp = client.describe_resource_permissions({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
  principal_id: "IdType",
  limit: 1,
  marker: "PageMarkerType",
})

Response structure


resp.principals #=> Array
resp.principals[0].id #=> String
resp.principals[0].type #=> String, one of "USER", "GROUP", "INVITE", "ANONYMOUS", "ORGANIZATION"
resp.principals[0].roles #=> Array
resp.principals[0].roles[0].role #=> String, one of "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER"
resp.principals[0].roles[0].type #=> String, one of "DIRECT", "INHERITED"
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

    The ID of the resource.

  • :principal_id (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)

Returns:

See Also:



1433
1434
1435
1436
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1433

def describe_resource_permissions(params = {}, options = {})
  req = build_request(:describe_resource_permissions, params)
  req.send_request(options)
end

#describe_root_folders(params = {}) ⇒ Types::DescribeRootFoldersResponse

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.

Examples:

Request syntax with placeholder values


resp = client.describe_root_folders({
  authentication_token: "AuthenticationHeaderType", # required
  limit: 1,
  marker: "PageMarkerType",
})

Response structure


resp.folders #=> Array
resp.folders[0].id #=> String
resp.folders[0].name #=> String
resp.folders[0].creator_id #=> String
resp.folders[0].parent_folder_id #=> String
resp.folders[0].created_timestamp #=> Time
resp.folders[0].modified_timestamp #=> Time
resp.folders[0].resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp.folders[0].signature #=> String
resp.folders[0].labels #=> Array
resp.folders[0].labels[0] #=> String
resp.folders[0].size #=> Integer
resp.folders[0].latest_version_size #=> Integer
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (required, 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.)

Returns:

See Also:



1489
1490
1491
1492
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1489

def describe_root_folders(params = {}, options = {})
  req = build_request(:describe_root_folders, params)
  req.send_request(options)
end

#describe_users(params = {}) ⇒ Types::DescribeUsersResponse

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.

Examples:

Request syntax with placeholder values


resp = client.describe_users({
  authentication_token: "AuthenticationHeaderType",
  organization_id: "IdType",
  user_ids: "UserIdsType",
  query: "SearchQueryType",
  include: "ALL", # accepts ALL, ACTIVE_PENDING
  order: "ASCENDING", # accepts ASCENDING, DESCENDING
  sort: "USER_NAME", # accepts USER_NAME, FULL_NAME, STORAGE_LIMIT, USER_STATUS, STORAGE_USED
  marker: "PageMarkerType",
  limit: 1,
  fields: "FieldNamesType",
})

Response structure


resp.users #=> Array
resp.users[0].id #=> String
resp.users[0].username #=> String
resp.users[0].email_address #=> String
resp.users[0].given_name #=> String
resp.users[0].surname #=> String
resp.users[0].organization_id #=> String
resp.users[0].root_folder_id #=> String
resp.users[0].recycle_bin_folder_id #=> String
resp.users[0].status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.users[0].type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.users[0].created_timestamp #=> Time
resp.users[0].modified_timestamp #=> Time
resp.users[0].time_zone_id #=> String
resp.users[0].locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.users[0].storage.storage_utilized_in_bytes #=> Integer
resp.users[0].storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.users[0].storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
resp.total_number_of_users #=> Integer
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :organization_id (String)

    The ID of the organization.

  • :user_ids (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.

  • :order (String)

    The order for the results.

  • :sort (String)

    The sorting criteria.

  • :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.

Returns:

See Also:



1583
1584
1585
1586
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1583

def describe_users(params = {}, options = {})
  req = build_request(:describe_users, params)
  req.send_request(options)
end

#get_current_user(params = {}) ⇒ Types::GetCurrentUserResponse

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

Examples:

Request syntax with placeholder values


resp = client.get_current_user({
  authentication_token: "AuthenticationHeaderType", # required
})

Response structure


resp.user.id #=> String
resp.user.username #=> String
resp.user.email_address #=> String
resp.user.given_name #=> String
resp.user.surname #=> String
resp.user.organization_id #=> String
resp.user.root_folder_id #=> String
resp.user.recycle_bin_folder_id #=> String
resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.user.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.user.created_timestamp #=> Time
resp.user.modified_timestamp #=> Time
resp.user.time_zone_id #=> String
resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.user.storage.storage_utilized_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (required, String)

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

Returns:

See Also:



1631
1632
1633
1634
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1631

def get_current_user(params = {}, options = {})
  req = build_request(:get_current_user, params)
  req.send_request(options)
end

#get_document(params = {}) ⇒ Types::GetDocumentResponse

Retrieves details of a document.

Examples:

Request syntax with placeholder values


resp = client.get_document({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  include_custom_metadata: false,
})

Response structure


resp..id #=> String
resp..creator_id #=> String
resp..parent_folder_id #=> String
resp..created_timestamp #=> Time
resp..modified_timestamp #=> Time
resp...id #=> String
resp...name #=> String
resp...content_type #=> String
resp...size #=> Integer
resp...signature #=> String
resp...status #=> String, one of "INITIALIZED", "ACTIVE"
resp...created_timestamp #=> Time
resp...modified_timestamp #=> Time
resp...content_created_timestamp #=> Time
resp...content_modified_timestamp #=> Time
resp...creator_id #=> String
resp...thumbnail #=> Hash
resp...thumbnail["DocumentThumbnailType"] #=> String
resp...source #=> Hash
resp...source["DocumentSourceType"] #=> String
resp..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp..labels #=> Array
resp..labels[0] #=> String
resp. #=> Hash
resp.["CustomMetadataKeyType"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :include_custom_metadata (Boolean)

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

Returns:

See Also:



1694
1695
1696
1697
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1694

def get_document(params = {}, options = {})
  req = build_request(:get_document, params)
  req.send_request(options)
end

#get_document_path(params = {}) ⇒ Types::GetDocumentPathResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_document_path({
  authentication_token: "AuthenticationHeaderType",
  document_id: "IdType", # required
  limit: 1,
  fields: "FieldNamesType",
  marker: "PageMarkerType",
})

Response structure


resp.path.components #=> Array
resp.path.components[0].id #=> String
resp.path.components[0].name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, 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.

Returns:

See Also:



1749
1750
1751
1752
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1749

def get_document_path(params = {}, options = {})
  req = build_request(:get_document_path, params)
  req.send_request(options)
end

#get_document_version(params = {}) ⇒ Types::GetDocumentVersionResponse

Retrieves version metadata for the specified document.

Examples:

Request syntax with placeholder values


resp = client.get_document_version({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
  fields: "FieldNamesType",
  include_custom_metadata: false,
})

Response structure


resp..id #=> String
resp..name #=> String
resp..content_type #=> String
resp..size #=> Integer
resp..signature #=> String
resp..status #=> String, one of "INITIALIZED", "ACTIVE"
resp..created_timestamp #=> Time
resp..modified_timestamp #=> Time
resp..content_created_timestamp #=> Time
resp..content_modified_timestamp #=> Time
resp..creator_id #=> String
resp..thumbnail #=> Hash
resp..thumbnail["DocumentThumbnailType"] #=> String
resp..source #=> Hash
resp..source["DocumentSourceType"] #=> String
resp. #=> Hash
resp.["CustomMetadataKeyType"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, 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.

  • :include_custom_metadata (Boolean)

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

Returns:

See Also:



1813
1814
1815
1816
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1813

def get_document_version(params = {}, options = {})
  req = build_request(:get_document_version, params)
  req.send_request(options)
end

#get_folder(params = {}) ⇒ Types::GetFolderResponse

Retrieves the metadata of the specified folder.

Examples:

Request syntax with placeholder values


resp = client.get_folder({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "ResourceIdType", # required
  include_custom_metadata: false,
})

Response structure


resp..id #=> String
resp..name #=> String
resp..creator_id #=> String
resp..parent_folder_id #=> String
resp..created_timestamp #=> Time
resp..modified_timestamp #=> Time
resp..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp..signature #=> String
resp..labels #=> Array
resp..labels[0] #=> String
resp..size #=> Integer
resp..latest_version_size #=> Integer
resp. #=> Hash
resp.["CustomMetadataKeyType"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, String)

    The ID of the folder.

  • :include_custom_metadata (Boolean)

    Set to TRUE to include custom metadata in the response.

Returns:

See Also:



1865
1866
1867
1868
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1865

def get_folder(params = {}, options = {})
  req = build_request(:get_folder, params)
  req.send_request(options)
end

#get_folder_path(params = {}) ⇒ Types::GetFolderPathResponse

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.

Examples:

Request syntax with placeholder values


resp = client.get_folder_path({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "IdType", # required
  limit: 1,
  fields: "FieldNamesType",
  marker: "PageMarkerType",
})

Response structure


resp.path.components #=> Array
resp.path.components[0].id #=> String
resp.path.components[0].name #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, 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.

Returns:

See Also:



1920
1921
1922
1923
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1920

def get_folder_path(params = {}, options = {})
  req = build_request(:get_folder_path, params)
  req.send_request(options)
end

#initiate_document_version_upload(params = {}) ⇒ Types::InitiateDocumentVersionUploadResponse

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.

Examples:

Request syntax with placeholder values


resp = client.initiate_document_version_upload({
  authentication_token: "AuthenticationHeaderType",
  id: "ResourceIdType",
  name: "ResourceNameType",
  content_created_timestamp: Time.now,
  content_modified_timestamp: Time.now,
  content_type: "DocumentContentType",
  document_size_in_bytes: 1,
  parent_folder_id: "ResourceIdType", # required
})

Response structure


resp..id #=> String
resp..creator_id #=> String
resp..parent_folder_id #=> String
resp..created_timestamp #=> Time
resp..modified_timestamp #=> Time
resp...id #=> String
resp...name #=> String
resp...content_type #=> String
resp...size #=> Integer
resp...signature #=> String
resp...status #=> String, one of "INITIALIZED", "ACTIVE"
resp...created_timestamp #=> Time
resp...modified_timestamp #=> Time
resp...content_created_timestamp #=> Time
resp...content_modified_timestamp #=> Time
resp...creator_id #=> String
resp...thumbnail #=> Hash
resp...thumbnail["DocumentThumbnailType"] #=> String
resp...source #=> Hash
resp...source["DocumentSourceType"] #=> String
resp..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp..labels #=> Array
resp..labels[0] #=> String
resp..upload_url #=> String
resp..signed_headers #=> Hash
resp..signed_headers["HeaderNameType"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (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.

  • :content_created_timestamp (Time, DateTime, Date, Integer, String)

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

  • :content_modified_timestamp (Time, DateTime, Date, Integer, String)

    The timestamp when the content of the document was modified.

  • :content_type (String)

    The content type of the document.

  • :document_size_in_bytes (Integer)

    The size of the document, in bytes.

  • :parent_folder_id (required, String)

    The ID of the parent folder.

Returns:

See Also:



2012
2013
2014
2015
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2012

def initiate_document_version_upload(params = {}, options = {})
  req = build_request(:initiate_document_version_upload, params)
  req.send_request(options)
end

#remove_all_resource_permissions(params = {}) ⇒ Struct

Removes all the permissions from the specified resource.

Examples:

Request syntax with placeholder values


resp = client.remove_all_resource_permissions({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

    The ID of the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2040
2041
2042
2043
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2040

def remove_all_resource_permissions(params = {}, options = {})
  req = build_request(:remove_all_resource_permissions, params)
  req.send_request(options)
end

#remove_resource_permission(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.remove_resource_permission({
  authentication_token: "AuthenticationHeaderType",
  resource_id: "ResourceIdType", # required
  principal_id: "IdType", # required
  principal_type: "USER", # accepts USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :resource_id (required, String)

    The ID of the resource.

  • :principal_id (required, String)

    The principal ID of the resource.

  • :principal_type (String)

    The principal type of the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2077
2078
2079
2080
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2077

def remove_resource_permission(params = {}, options = {})
  req = build_request(:remove_resource_permission, params)
  req.send_request(options)
end

#update_document(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.update_document({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  name: "ResourceNameType",
  parent_folder_id: "ResourceIdType",
  resource_state: "ACTIVE", # accepts ACTIVE, RESTORING, RECYCLING, RECYCLED
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :name (String)

    The name of the document.

  • :parent_folder_id (String)

    The ID of the parent folder.

  • :resource_state (String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2119
2120
2121
2122
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2119

def update_document(params = {}, options = {})
  req = build_request(:update_document, params)
  req.send_request(options)
end

#update_document_version(params = {}) ⇒ Struct

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.

Examples:

Request syntax with placeholder values


resp = client.update_document_version({
  authentication_token: "AuthenticationHeaderType",
  document_id: "ResourceIdType", # required
  version_id: "DocumentVersionIdType", # required
  version_status: "ACTIVE", # accepts ACTIVE
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :document_id (required, String)

    The ID of the document.

  • :version_id (required, String)

    The version ID of the document.

  • :version_status (String)

    The status of the version.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2160
2161
2162
2163
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2160

def update_document_version(params = {}, options = {})
  req = build_request(:update_document_version, params)
  req.send_request(options)
end

#update_folder(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.update_folder({
  authentication_token: "AuthenticationHeaderType",
  folder_id: "ResourceIdType", # required
  name: "ResourceNameType",
  parent_folder_id: "ResourceIdType",
  resource_state: "ACTIVE", # accepts ACTIVE, RESTORING, RECYCLING, RECYCLED
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :folder_id (required, String)

    The ID of the folder.

  • :name (String)

    The name of the folder.

  • :parent_folder_id (String)

    The ID of the parent folder.

  • :resource_state (String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2203
2204
2205
2206
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2203

def update_folder(params = {}, options = {})
  req = build_request(:update_folder, params)
  req.send_request(options)
end

#update_user(params = {}) ⇒ Types::UpdateUserResponse

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

Examples:

Request syntax with placeholder values


resp = client.update_user({
  authentication_token: "AuthenticationHeaderType",
  user_id: "IdType", # required
  given_name: "UserAttributeValueType",
  surname: "UserAttributeValueType",
  type: "USER", # accepts USER, ADMIN, POWERUSER, MINIMALUSER, WORKSPACESUSER
  storage_rule: {
    storage_allocated_in_bytes: 1,
    storage_type: "UNLIMITED", # accepts UNLIMITED, QUOTA
  },
  time_zone_id: "TimeZoneIdType",
  locale: "en", # accepts en, fr, ko, de, es, ja, ru, zh_CN, zh_TW, pt_BR, default
  grant_poweruser_privileges: "TRUE", # accepts TRUE, FALSE
})

Response structure


resp.user.id #=> String
resp.user.username #=> String
resp.user.email_address #=> String
resp.user.given_name #=> String
resp.user.surname #=> String
resp.user.organization_id #=> String
resp.user.root_folder_id #=> String
resp.user.recycle_bin_folder_id #=> String
resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.user.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.user.created_timestamp #=> Time
resp.user.modified_timestamp #=> Time
resp.user.time_zone_id #=> String
resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.user.storage.storage_utilized_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :user_id (required, String)

    The ID of the user.

  • :given_name (String)

    The given name of the user.

  • :surname (String)

    The surname of the user.

  • :type (String)

    The type of the user.

  • :storage_rule (Types::StorageRuleType)

    The amount of storage for the user.

  • :time_zone_id (String)

    The time zone ID of the user.

  • :locale (String)

    The locale of the user.

  • :grant_poweruser_privileges (String)

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

Returns:

See Also:



2286
2287
2288
2289
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2286

def update_user(params = {}, options = {})
  req = build_request(:update_user, params)
  req.send_request(options)
end