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. This field should not be set 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"
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. This field should not be set 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
    },
  ],
})

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. This field should not be set 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.

Returns:

See Also:



280
281
282
283
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 280

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"
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. This field should not be set 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:



366
367
368
369
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 366

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. This field should not be set 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:



406
407
408
409
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 406

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. This field should not be set 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:



455
456
457
458
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 455

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: ["Label"], # 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. This field should not be set when using administrative API actions, as in accessing the API using AWS credentials.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



488
489
490
491
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 488

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 messasges using HTTPS POST.

  • :subscription_type (required, String)

    The notification type.

Returns:

See Also:



540
541
542
543
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 540

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"
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. This field should not be set when using administrative API actions, as in accessing the API using AWS credentials.

Returns:

See Also:



623
624
625
626
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 623

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. This field should not be set when using administrative API actions, as in accessing the API using AWS credentials.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



652
653
654
655
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 652

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. This field should not be set 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:



688
689
690
691
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 688

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. This field should not be set 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:



730
731
732
733
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 730

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. This field should not be set 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:



759
760
761
762
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 759

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. This field should not be set 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:



787
788
789
790
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 787

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. This field should not be set 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:



815
816
817
818
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 815

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: ["Label"],
  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. This field should not be set 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:



851
852
853
854
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 851

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:



877
878
879
880
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 877

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. This field should not be set 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:



905
906
907
908
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 905

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"
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. This field should not be set 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. (You received this marker from a previous call.)

Returns:

See Also:



1029
1030
1031
1032
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1029

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"
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. This field should not be set 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:



1103
1104
1105
1106
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1103

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. This field should not be set 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:



1175
1176
1177
1178
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1175

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. This field should not be set 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:



1280
1281
1282
1283
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1280

def describe_folder_contents(params = {}, options = {})
  req = build_request(:describe_folder_contents, 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:



1322
1323
1324
1325
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1322

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
  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. This field should not be set when using administrative API actions, as in accessing the API using AWS credentials.

  • :resource_id (required, String)

    The ID of the resource.

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



1372
1373
1374
1375
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1372

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 RecyleBin. RootFolder is the root of user's files and folders and RecyleBin 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. This field should not be set 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:



1428
1429
1430
1431
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1428

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"
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. This field should not be set 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:



1522
1523
1524
1525
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1522

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"
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.

Returns:

See Also:



1568
1569
1570
1571
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1568

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. This field should not be set 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:



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

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. This field should not be set 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:



1686
1687
1688
1689
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1686

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. This field should not be set 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:



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

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. This field should not be set 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:



1802
1803
1804
1805
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1802

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. This field should not be set 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:



1857
1858
1859
1860
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1857

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. This field should not be set 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 time stamp when the content of the document was originally created.

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

    The time stamp 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:



1950
1951
1952
1953
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1950

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. This field should not be set 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:



1978
1979
1980
1981
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1978

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. This field should not be set 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:



2015
2016
2017
2018
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2015

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. This field should not be set 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. Note that only ACTIVE and RECYCLED are supported.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2057
2058
2059
2060
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2057

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. This field should not be set 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:



2098
2099
2100
2101
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2098

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. This field should not be set 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. Note that only ACTIVE and RECYCLED are accepted values from the API.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2141
2142
2143
2144
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2141

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
  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
})

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"
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. This field should not be set 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.

Returns:

See Also:



2219
2220
2221
2222
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2219

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