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

#api_requests, #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(options) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::SharedCredentials - Used for loading credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2 IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails to enable retries and extended timeouts.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is search for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test endpoints. This should be avalid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before rasing a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session yeidled by #session_for.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idble before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session yeidled by #session_for.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



251
252
253
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 251

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:



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

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:



338
339
340
341
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 338

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].invitee_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:



397
398
399
400
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 397

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:



483
484
485
486
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 483

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:



523
524
525
526
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 523

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:



572
573
574
575
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 572

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:



605
606
607
608
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 605

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

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

Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.

For more information, see Subscribe to Notifications in the Amazon WorkDocs 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:



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

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:



741
742
743
744
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 741

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:



770
771
772
773
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 770

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:



806
807
808
809
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 806

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:



848
849
850
851
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 848

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:



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

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:



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

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:



933
934
935
936
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 933

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:



969
970
971
972
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 969

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:



995
996
997
998
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 995

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:



1023
1024
1025
1026
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1023

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",
  activity_types: "ActivityNamesFilterType",
  resource_id: "IdType",
  user_id: "IdType",
  include_indirect_activities: false,
  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_VERSION_VIEWED", "DOCUMENT_VERSION_DOWNLOADED", "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].is_indirect_activity #=> Boolean
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.

  • :activity_types (String)

    Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.

  • :resource_id (String)

    The document or folder ID for which to describe activity types.

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

  • :include_indirect_activities (Boolean)

    Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).

  • :limit (Integer)

    The maximum number of items to return.

  • :marker (String)

    The marker for the next set of results.

Returns:

See Also:



1163
1164
1165
1166
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1163

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:



1237
1238
1239
1240
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1237

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:



1309
1310
1311
1312
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1309

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:



1414
1415
1416
1417
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1414

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 the query. Groups are defined by the underlying Active Directory.

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:



1466
1467
1468
1469
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1466

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:



1508
1509
1510
1511
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1508

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:



1562
1563
1564
1565
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1562

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.

This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.

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:



1627
1628
1629
1630
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1627

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:



1721
1722
1723
1724
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1721

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:



1769
1770
1771
1772
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1769

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:



1832
1833
1834
1835
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1832

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:



1887
1888
1889
1890
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1887

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:



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

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:



2003
2004
2005
2006
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2003

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:



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

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

#get_resources(params = {}) ⇒ Types::GetResourcesResponse

Retrieves a collection of resources, including folders and documents. The only CollectionType supported is SHARED_WITH_ME.

Examples:

Request syntax with placeholder values


resp = client.get_resources({
  authentication_token: "AuthenticationHeaderType",
  user_id: "IdType",
  collection_type: "SHARED_WITH_ME", # accepts SHARED_WITH_ME
  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.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)

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

  • :user_id (String)

    The user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials.

  • :collection_type (String)

    The collection type.

  • :limit (Integer)

    The maximum number of resources to return.

  • :marker (String)

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

Returns:

See Also:



2146
2147
2148
2149
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2146

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



2238
2239
2240
2241
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2238

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:



2266
2267
2268
2269
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2266

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:



2303
2304
2305
2306
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2303

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:



2345
2346
2347
2348
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2345

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:



2386
2387
2388
2389
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2386

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:



2429
2430
2431
2432
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2429

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:



2512
2513
2514
2515
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2512

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