Class: Aws::WorkDocs::Client

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

Overview

An API client for WorkDocs. To construct a client, you need to configure a :region and :credentials.

client = Aws::WorkDocs::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

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::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

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

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

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

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    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/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :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 searched 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.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

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

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid 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.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

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

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :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. This option is only used in the legacy retry mode.

    @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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :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. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/. It should have a maximum length of 50.

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

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::WorkDocs::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::WorkDocs::EndpointParameters

  • :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 raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

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

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle 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.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

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



385
386
387
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 385

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



420
421
422
423
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 420

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. Not required when using Amazon Web Services administrator credentials to access the API.

Returns:

See Also:



470
471
472
473
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 470

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



528
529
530
531
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 528

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



613
614
615
616
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 613

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



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

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :name (String)

    The name of the new folder.

  • :parent_folder_id (required, String)

    The ID of the parent folder.

Returns:

See Also:



700
701
702
703
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 700

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. Not required when using Amazon Web Services administrator credentials to access the API.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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 Setting up notifications for an IAM user or role 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, SQS
  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", "SQS"

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:



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

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. Not required when using Amazon Web Services administrator credentials to access the API.

Returns:

See Also:



867
868
869
870
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 867

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. Not required when using Amazon Web Services administrator credentials to access the API.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



895
896
897
898
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 895

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



930
931
932
933
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 930

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



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

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :document_id (required, String)

    The ID of the document.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



999
1000
1001
1002
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 999

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

#delete_document_version(params = {}) ⇒ Struct

Deletes a specific version of a document.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :authentication_token (String)

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

  • :document_id (required, String)

    The ID of the document associated with the version being deleted.

  • :version_id (required, String)

    The ID of the version being deleted.

  • :delete_prior_versions (required, Boolean)

    Deletes all versions of a document prior to the current version.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

def delete_document_version(params = {}, options = {})
  req = build_request(:delete_document_version, 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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :folder_id (required, String)

    The ID of the folder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1061
1062
1063
1064
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1061

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :folder_id (required, String)

    The ID of the folder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1088
1089
1090
1091
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1088

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



1123
1124
1125
1126
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1123

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:



1149
1150
1151
1152
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1149

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.

Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion.

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 Amazon Web Services credentials.

  • :user_id (required, String)

    The ID of the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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: "SearchMarkerType",
})

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.user_activities[0]..contributor_id #=> String
resp.marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :authentication_token (String)

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

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



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

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



1398
1399
1400
1401
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1398

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



1471
1472
1473
1474
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1471

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



1577
1578
1579
1580
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1577

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



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

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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", "SQS"
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:



1674
1675
1676
1677
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1674

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



1729
1730
1731
1732
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1729

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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.

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



1794
1795
1796
1797
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1794

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :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. Remember the following about the Userids and Query parameters:

    • If you don't use either parameter, the API returns a paginated list of all users on the site.

    • If you use both parameters, the API ignores the Query parameter.

    • The Userid parameter only returns user names that match a corresponding user ID.

    • The Query parameter runs a "prefix" search for users by the GivenName, SurName, or UserName fields included in a CreateUser API call. For example, querying on Ma returns Márcia Oliveira, María García, and Mateo Jackson. If you use multiple characters, the API only returns data that matches all characters. For example, querying on Ma J only returns Mateo Jackson.

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



1910
1911
1912
1913
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1910

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.

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

Returns:

See Also:



1965
1966
1967
1968
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 1965

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2027
2028
2029
2030
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2027

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2081
2082
2083
2084
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2081

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



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

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2195
2196
2197
2198
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2195

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2249
2250
2251
2252
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2249

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2336
2337
2338
2339
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2336

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

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. Not required when using Amazon Web Services administrator credentials to access the API.

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

    The ID of the parent folder.

Returns:

See Also:



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

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :resource_id (required, String)

    The ID of the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2454
2455
2456
2457
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2454

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2490
2491
2492
2493
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2490

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

#restore_document_versions(params = {}) ⇒ Struct

Recovers a deleted version of an Amazon WorkDocs document.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :authentication_token (String)

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

  • :document_id (required, String)

    The ID of the document.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2517
2518
2519
2520
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2517

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

#search_resources(params = {}) ⇒ Types::SearchResourcesResponse

Searches metadata and the content of folders, documents, document versions, and comments.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_resources({
  authentication_token: "AuthenticationHeaderType",
  query_text: "SearchQueryType",
  query_scopes: ["NAME"], # accepts NAME, CONTENT
  organization_id: "IdType",
  additional_response_fields: ["WEBURL"], # accepts WEBURL
  filters: {
    text_locales: ["AR"], # accepts AR, BG, BN, DA, DE, CS, EL, EN, ES, FA, FI, FR, HI, HU, ID, IT, JA, KO, LT, LV, NL, NO, PT, RO, RU, SV, SW, TH, TR, ZH, DEFAULT
    content_categories: ["IMAGE"], # accepts IMAGE, DOCUMENT, PDF, SPREADSHEET, PRESENTATION, AUDIO, VIDEO, SOURCE_CODE, OTHER
    resource_types: ["FOLDER"], # accepts FOLDER, DOCUMENT, COMMENT, DOCUMENT_VERSION
    labels: ["SearchLabel"],
    principals: [
      {
        id: "IdType", # required
        roles: ["VIEWER"], # accepts VIEWER, CONTRIBUTOR, OWNER, COOWNER
      },
    ],
    ancestor_ids: ["SearchAncestorId"],
    search_collection_types: ["OWNED"], # accepts OWNED, SHARED_WITH_ME
    size_range: {
      start_value: 1,
      end_value: 1,
    },
    created_range: {
      start_value: Time.now,
      end_value: Time.now,
    },
    modified_range: {
      start_value: Time.now,
      end_value: Time.now,
    },
  },
  order_by: [
    {
      field: "RELEVANCE", # accepts RELEVANCE, NAME, SIZE, CREATED_TIMESTAMP, MODIFIED_TIMESTAMP
      order: "ASC", # accepts ASC, DESC
    },
  ],
  limit: 1,
  marker: "NextMarkerType",
})

Response structure


resp.items #=> Array
resp.items[0].resource_type #=> String, one of "DOCUMENT", "FOLDER", "COMMENT", "DOCUMENT_VERSION"
resp.items[0].web_url #=> String
resp.items[0]..id #=> String
resp.items[0]..creator_id #=> String
resp.items[0]..parent_folder_id #=> String
resp.items[0]..created_timestamp #=> Time
resp.items[0]..modified_timestamp #=> Time
resp.items[0]...id #=> String
resp.items[0]...name #=> String
resp.items[0]...content_type #=> String
resp.items[0]...size #=> Integer
resp.items[0]...signature #=> String
resp.items[0]...status #=> String, one of "INITIALIZED", "ACTIVE"
resp.items[0]...created_timestamp #=> Time
resp.items[0]...modified_timestamp #=> Time
resp.items[0]...content_created_timestamp #=> Time
resp.items[0]...content_modified_timestamp #=> Time
resp.items[0]...creator_id #=> String
resp.items[0]...thumbnail #=> Hash
resp.items[0]...thumbnail["DocumentThumbnailType"] #=> String
resp.items[0]...source #=> Hash
resp.items[0]...source["DocumentSourceType"] #=> String
resp.items[0]..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp.items[0]..labels #=> Array
resp.items[0]..labels[0] #=> String
resp.items[0]..id #=> String
resp.items[0]..name #=> String
resp.items[0]..creator_id #=> String
resp.items[0]..parent_folder_id #=> String
resp.items[0]..created_timestamp #=> Time
resp.items[0]..modified_timestamp #=> Time
resp.items[0]..resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
resp.items[0]..signature #=> String
resp.items[0]..labels #=> Array
resp.items[0]..labels[0] #=> String
resp.items[0]..size #=> Integer
resp.items[0]..latest_version_size #=> Integer
resp.items[0]..comment_id #=> String
resp.items[0]..contributor.id #=> String
resp.items[0]..contributor.username #=> String
resp.items[0]..contributor.email_address #=> String
resp.items[0]..contributor.given_name #=> String
resp.items[0]..contributor.surname #=> String
resp.items[0]..contributor.organization_id #=> String
resp.items[0]..contributor.root_folder_id #=> String
resp.items[0]..contributor.recycle_bin_folder_id #=> String
resp.items[0]..contributor.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
resp.items[0]..contributor.type #=> String, one of "USER", "ADMIN", "POWERUSER", "MINIMALUSER", "WORKSPACESUSER"
resp.items[0]..contributor.created_timestamp #=> Time
resp.items[0]..contributor.modified_timestamp #=> Time
resp.items[0]..contributor.time_zone_id #=> String
resp.items[0]..contributor.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
resp.items[0]..contributor.storage.storage_utilized_in_bytes #=> Integer
resp.items[0]..contributor.storage.storage_rule.storage_allocated_in_bytes #=> Integer
resp.items[0]..contributor.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
resp.items[0]..created_timestamp #=> Time
resp.items[0]..comment_status #=> String, one of "DRAFT", "PUBLISHED", "DELETED"
resp.items[0]..recipient_id #=> String
resp.items[0]..contributor_id #=> String
resp.items[0]..id #=> String
resp.items[0]..name #=> String
resp.items[0]..content_type #=> String
resp.items[0]..size #=> Integer
resp.items[0]..signature #=> String
resp.items[0]..status #=> String, one of "INITIALIZED", "ACTIVE"
resp.items[0]..created_timestamp #=> Time
resp.items[0]..modified_timestamp #=> Time
resp.items[0]..content_created_timestamp #=> Time
resp.items[0]..content_modified_timestamp #=> Time
resp.items[0]..creator_id #=> String
resp.items[0]..thumbnail #=> Hash
resp.items[0]..thumbnail["DocumentThumbnailType"] #=> String
resp.items[0]..source #=> Hash
resp.items[0]..source["DocumentSourceType"] #=> String
resp.marker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :authentication_token (String)

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

  • :query_text (String)

    The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.

  • :query_scopes (Array<String>)

    Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content

  • :organization_id (String)

    Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.

  • :additional_response_fields (Array<String>)

    A list of attributes to include in the response. Used to request fields that are not normally returned in a standard response.

  • :filters (Types::Filters)

    Filters results based on entity metadata.

  • :order_by (Array<Types::SearchSortResult>)

    Order by results in one or more categories.

  • :limit (Integer)

    Max results count per page.

  • :marker (String)

    The marker for the next set of results.

Returns:

See Also:



2693
2694
2695
2696
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2693

def search_resources(params = {}, options = {})
  req = build_request(:search_resources, 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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2734
2735
2736
2737
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2734

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2774
2775
2776
2777
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2774

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. Not required when using Amazon Web Services administrator credentials to access the API.

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



2816
2817
2818
2819
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2816

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. Not required when using Amazon Web Services administrator credentials to access the API.

  • :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 Power user privileges.

Returns:

See Also:



2898
2899
2900
2901
# File 'gems/aws-sdk-workdocs/lib/aws-sdk-workdocs/client.rb', line 2898

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