class Aws::WorkDocs::Client

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](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Attributes

identifier[R]

@api private

Public Class Methods

errors_module() click to toggle source

@api private

# File lib/aws-sdk-workdocs/client.rb, line 2595
def errors_module
  Errors
end
new(*args) click to toggle source

@overload initialize(options)

@param [Hash] options
@option options [required, Aws::CredentialProvider] :credentials
  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.

@option options [required, String] :region
  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`

@option options [String] :access_key_id

@option options [Boolean] :active_endpoint_cache (false)
  When set to `true`, a thread polling for endpoints will be running in
  the background every 60 secs (default). Defaults to `false`.

@option options [Boolean] :adaptive_retry_wait_to_fill (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.

@option options [Boolean] :client_side_monitoring (false)
  When `true`, client-side metrics will be collected for all API requests from
  this client.

@option options [String] :client_side_monitoring_client_id ("")
  Allows you to provide an identifier for this client which will be attached to
  all generated client side metrics. Defaults to an empty string.

@option options [String] :client_side_monitoring_host ("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.

@option options [Integer] :client_side_monitoring_port (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.

@option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
  Allows you to provide a custom client-side monitoring publisher class. By default,
  will use the Client Side Monitoring Agent Publisher.

@option options [Boolean] :convert_params (true)
  When `true`, an attempt is made to coerce request parameters into
  the required types.

@option options [Boolean] :correct_clock_skew (true)
  Used only in `standard` and adaptive retry modes. Specifies whether to apply
  a clock skew correction and retry requests with skewed client clocks.

@option options [Boolean] :disable_host_prefix_injection (false)
  Set to true to disable SDK automatically adding host prefix
  to default service endpoint when available.

@option options [String] :endpoint
  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.

@option options [Integer] :endpoint_cache_max_entries (1000)
  Used for the maximum size limit of the LRU cache storing endpoints data
  for endpoint discovery enabled operations. Defaults to 1000.

@option options [Integer] :endpoint_cache_max_threads (10)
  Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

@option options [Integer] :endpoint_cache_poll_interval (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.

@option options [Boolean] :endpoint_discovery (false)
  When set to `true`, endpoint discovery will be enabled for operations when available.

@option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
  The log formatter.

@option options [Symbol] :log_level (:info)
  The log level to send messages to the `:logger` at.

@option options [Logger] :logger
  The Logger instance to send log messages to.  If this option
  is not set, logging will be disabled.

@option options [Integer] :max_attempts (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.

@option options [String] :profile ("default")
  Used when loading credentials from the shared credentials file
  at HOME/.aws/credentials.  When not specified, 'default' is used.

@option options [Proc] :retry_backoff
  A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
  This option is only used in the `legacy` retry mode.

@option options [Float] :retry_base_delay (0.3)
  The base delay in seconds used by the default backoff function. This option
  is only used in the `legacy` retry mode.

@option options [Symbol] :retry_jitter (: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

@option options [Integer] :retry_limit (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.

@option options [Integer] :retry_max_delay (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.

@option options [String] :retry_mode ("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.

@option options [String] :secret_access_key

@option options [String] :session_token

@option options [Boolean] :stub_responses (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.

@option options [Boolean] :validate_params (true)
  When `true`, request parameters are validated before
  sending the request.

@option options [URI::HTTP,String] :http_proxy A proxy to send
  requests through.  Formatted like 'http://proxy.com:123'.

@option options [Float] :http_open_timeout (15) The number of
  seconds to wait when opening a HTTP session before raising a
  `Timeout::Error`.

@option options [Integer] :http_read_timeout (60) The default
  number of seconds to wait for response data.  This value can
  safely be set per-request on the session.

@option options [Float] :http_idle_timeout (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.

@option options [Float] :http_continue_timeout (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.

@option options [Boolean] :http_wire_trace (false) When `true`,
  HTTP debug output will be sent to the `:logger`.

@option options [Boolean] :ssl_verify_peer (true) When `true`,
  SSL peer certificates are verified when establishing a
  connection.

@option options [String] :ssl_ca_bundle 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.

@option options [String] :ssl_ca_directory 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.
Calls superclass method
# File lib/aws-sdk-workdocs/client.rb, line 324
def initialize(*args)
  super
end

Public Instance Methods

abort_document_version_upload(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The ID of the version.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload AWS API Documentation

@overload abort_document_version_upload(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 359
def abort_document_version_upload(params = {}, options = {})
  req = build_request(:abort_document_version_upload, params)
  req.send_request(options)
end
activate_user(params = {}, options = {}) click to toggle source

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

@option params [required, String] :user_id

The ID of the user.

@option params [String] :authentication_token

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

@return [Types::ActivateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::ActivateUserResponse#user #user} => Types::User

@example Request syntax with placeholder values

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

@example 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"

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser AWS API Documentation

@overload activate_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 409
def activate_user(params = {}, options = {})
  req = build_request(:activate_user, params)
  req.send_request(options)
end
add_resource_permissions(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

The ID of the resource.

@option params [required, Array<Types::SharePrincipal>] :principals

The users, groups, or organization being granted permission.

@option params [Types::NotificationOptions] :notification_options

The notification options.

@return [Types::AddResourcePermissionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::AddResourcePermissionsResponse#share_results #share_results} => Array&lt;Types::ShareResult&gt;

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions AWS API Documentation

@overload add_resource_permissions(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 467
def add_resource_permissions(params = {}, options = {})
  req = build_request(:add_resource_permissions, params)
  req.send_request(options)
end
build_request(operation_name, params = {}) click to toggle source

@param params ({}) @api private

# File lib/aws-sdk-workdocs/client.rb, line 2570
def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config)
  context[:gem_name] = 'aws-sdk-workdocs'
  context[:gem_version] = '1.33.0'
  Seahorse::Client::Request.new(handlers, context)
end
create_comment(params = {}, options = {}) click to toggle source

Adds a new comment to the specified document version.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The ID of the document version.

@option params [String] :parent_id

The ID of the parent comment.

@option params [String] :thread_id

The ID of the root comment in the thread.

@option params [required, String] :text

The text of the comment.

@option params [String] :visibility

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.

@option params [Boolean] :notify_collaborators

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

@return [Types::CreateCommentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::CreateCommentResponse#comment #comment} => Types::Comment

@example 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,
})

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment AWS API Documentation

@overload create_comment(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 552
def create_comment(params = {}, options = {})
  req = build_request(:create_comment, params)
  req.send_request(options)
end
create_custom_metadata(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

The ID of the resource.

@option params [String] :version_id

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

@option params [required, Hash<String,String>] :custom_metadata

Custom metadata in the form of name-value pairs.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata AWS API Documentation

@overload create_custom_metadata(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 591
def create_custom_metadata(params = {}, options = {})
  req = build_request(:create_custom_metadata, params)
  req.send_request(options)
end
create_folder(params = {}, options = {}) click to toggle source

Creates a folder with the specified name and parent folder.

@option params [String] :authentication_token

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

@option params [String] :name

The name of the new folder.

@option params [required, String] :parent_folder_id

The ID of the parent folder.

@return [Types::CreateFolderResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::CreateFolderResponse#metadata #metadata} => Types::FolderMetadata

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder AWS API Documentation

@overload create_folder(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 639
def create_folder(params = {}, options = {})
  req = build_request(:create_folder, params)
  req.send_request(options)
end
create_labels(params = {}, options = {}) click to toggle source

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

@option params [required, String] :resource_id

The ID of the resource.

@option params [required, Array<String>] :labels

List of labels to add to the resource.

@option params [String] :authentication_token

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels AWS API Documentation

@overload create_labels(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 671
def create_labels(params = {}, options = {})
  req = build_request(:create_labels, params)
  req.send_request(options)
end
create_notification_subscription(params = {}, options = {}) click to toggle source

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

For more information, see [Subscribe to Notifications] in the *Amazon WorkDocs Developer Guide*.

[1]: docs.aws.amazon.com/workdocs/latest/developerguide/subscribe-notifications.html

@option params [required, String] :organization_id

The ID of the organization.

@option params [required, String] :endpoint

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

@option params [required, String] :protocol

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

@option params [required, String] :subscription_type

The notification type.

@return [Types::CreateNotificationSubscriptionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::CreateNotificationSubscriptionResponse#subscription #subscription} => Types::Subscription

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription AWS API Documentation

@overload create_notification_subscription(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 724
def create_notification_subscription(params = {}, options = {})
  req = build_request(:create_notification_subscription, params)
  req.send_request(options)
end
create_user(params = {}, options = {}) click to toggle source

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.

@option params [String] :organization_id

The ID of the organization.

@option params [required, String] :username

The login name of the user.

@option params [String] :email_address

The email address of the user.

@option params [required, String] :given_name

The given name of the user.

@option params [required, String] :surname

The surname of the user.

@option params [required, String] :password

The password of the user.

@option params [String] :time_zone_id

The time zone ID of the user.

@option params [Types::StorageRuleType] :storage_rule

The amount of storage for the user.

@option params [String] :authentication_token

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

@return [Types::CreateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::CreateUserResponse#user #user} => Types::User

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

@example 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"

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser AWS API Documentation

@overload create_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 806
def create_user(params = {}, options = {})
  req = build_request(:create_user, params)
  req.send_request(options)
end
deactivate_user(params = {}, options = {}) click to toggle source

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

@option params [required, String] :user_id

The ID of the user.

@option params [String] :authentication_token

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser AWS API Documentation

@overload deactivate_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 834
def deactivate_user(params = {}, options = {})
  req = build_request(:deactivate_user, params)
  req.send_request(options)
end
delete_comment(params = {}, options = {}) click to toggle source

Deletes the specified comment from the document version.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The ID of the document version.

@option params [required, String] :comment_id

The ID of the comment.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment AWS API Documentation

@overload delete_comment(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 869
def delete_comment(params = {}, options = {})
  req = build_request(:delete_comment, params)
  req.send_request(options)
end
delete_custom_metadata(params = {}, options = {}) click to toggle source

Deletes custom metadata from the specified resource.

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

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

@option params [String] :version_id

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

@option params [Array<String>] :keys

List of properties to remove.

@option params [Boolean] :delete_all

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata AWS API Documentation

@overload delete_custom_metadata(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 910
def delete_custom_metadata(params = {}, options = {})
  req = build_request(:delete_custom_metadata, params)
  req.send_request(options)
end
delete_document(params = {}, options = {}) click to toggle source

Permanently deletes the specified document and its associated metadata.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument AWS API Documentation

@overload delete_document(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 938
def delete_document(params = {}, options = {})
  req = build_request(:delete_document, params)
  req.send_request(options)
end
delete_folder(params = {}, options = {}) click to toggle source

Permanently deletes the specified folder and its contents.

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder AWS API Documentation

@overload delete_folder(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 965
def delete_folder(params = {}, options = {})
  req = build_request(:delete_folder, params)
  req.send_request(options)
end
delete_folder_contents(params = {}, options = {}) click to toggle source

Deletes the contents of the specified folder.

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents AWS API Documentation

@overload delete_folder_contents(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 992
def delete_folder_contents(params = {}, options = {})
  req = build_request(:delete_folder_contents, params)
  req.send_request(options)
end
delete_labels(params = {}, options = {}) click to toggle source

Deletes the specified list of labels from a resource.

@option params [required, String] :resource_id

The ID of the resource.

@option params [String] :authentication_token

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

@option params [Array<String>] :labels

List of labels to delete from the resource.

@option params [Boolean] :delete_all

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels AWS API Documentation

@overload delete_labels(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1027
def delete_labels(params = {}, options = {})
  req = build_request(:delete_labels, params)
  req.send_request(options)
end
delete_notification_subscription(params = {}, options = {}) click to toggle source

Deletes the specified subscription from the specified organization.

@option params [required, String] :subscription_id

The ID of the subscription.

@option params [required, String] :organization_id

The ID of the organization.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription AWS API Documentation

@overload delete_notification_subscription(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1053
def delete_notification_subscription(params = {}, options = {})
  req = build_request(:delete_notification_subscription, params)
  req.send_request(options)
end
delete_user(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :user_id

The ID of the user.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser AWS API Documentation

@overload delete_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1081
def delete_user(params = {}, options = {})
  req = build_request(:delete_user, params)
  req.send_request(options)
end
describe_activities(params = {}, options = {}) click to toggle source

Describes the user activities in a specified time period.

@option params [String] :authentication_token

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

@option params [Time,DateTime,Date,Integer,String] :start_time

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

@option params [Time,DateTime,Date,Integer,String] :end_time

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

@option params [String] :organization_id

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

@option params [String] :activity_types

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

@option params [String] :resource_id

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

@option params [String] :user_id

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.

@option params [Boolean] :include_indirect_activities

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

@option params [Integer] :limit

The maximum number of items to return.

@option params [String] :marker

The marker for the next set of results.

@return [Types::DescribeActivitiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeActivitiesResponse#user_activities #user_activities} => Array&lt;Types::Activity&gt;
* {Types::DescribeActivitiesResponse#marker #marker} => String

@example Request syntax with placeholder values

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

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities AWS API Documentation

@overload describe_activities(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1220
def describe_activities(params = {}, options = {})
  req = build_request(:describe_activities, params)
  req.send_request(options)
end
describe_comments(params = {}, options = {}) click to toggle source

List all the comments for the specified document version.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The ID of the document version.

@option params [Integer] :limit

The maximum number of items to return.

@option params [String] :marker

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

@return [Types::DescribeCommentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeCommentsResponse#comments #comments} => Array&lt;Types::Comment&gt;
* {Types::DescribeCommentsResponse#marker #marker} => String

@example Request syntax with placeholder values

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeComments AWS API Documentation

@overload describe_comments(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1293
def describe_comments(params = {}, options = {})
  req = build_request(:describe_comments, params)
  req.send_request(options)
end
describe_document_versions(params = {}, options = {}) click to toggle source

Retrieves the document versions for the specified document.

By default, only active versions are returned.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [String] :marker

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

@option params [Integer] :limit

The maximum number of versions to return with this call.

@option params [String] :include

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

@option params [String] :fields

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

@return [Types::DescribeDocumentVersionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeDocumentVersionsResponse#document_versions #document_versions} => Array&lt;Types::DocumentVersionMetadata&gt;
* {Types::DescribeDocumentVersionsResponse#marker #marker} => String

The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions AWS API Documentation

@overload describe_document_versions(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1366
def describe_document_versions(params = {}, options = {})
  req = build_request(:describe_document_versions, params)
  req.send_request(options)
end
describe_folder_contents(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@option params [String] :sort

The sorting criteria.

@option params [String] :order

The order for the contents of the folder.

@option params [Integer] :limit

The maximum number of items to return with this call.

@option params [String] :marker

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

@option params [String] :type

The type of items.

@option params [String] :include

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

@return [Types::DescribeFolderContentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeFolderContentsResponse#folders #folders} => Array&lt;Types::FolderMetadata&gt;
* {Types::DescribeFolderContentsResponse#documents #documents} => Array&lt;Types::DocumentMetadata&gt;
* {Types::DescribeFolderContentsResponse#marker #marker} => String

The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.

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

@example 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].latest_version_metadata.id #=> String
resp.documents[0].latest_version_metadata.name #=> String
resp.documents[0].latest_version_metadata.content_type #=> String
resp.documents[0].latest_version_metadata.size #=> Integer
resp.documents[0].latest_version_metadata.signature #=> String
resp.documents[0].latest_version_metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
resp.documents[0].latest_version_metadata.created_timestamp #=> Time
resp.documents[0].latest_version_metadata.modified_timestamp #=> Time
resp.documents[0].latest_version_metadata.content_created_timestamp #=> Time
resp.documents[0].latest_version_metadata.content_modified_timestamp #=> Time
resp.documents[0].latest_version_metadata.creator_id #=> String
resp.documents[0].latest_version_metadata.thumbnail #=> Hash
resp.documents[0].latest_version_metadata.thumbnail["DocumentThumbnailType"] #=> String
resp.documents[0].latest_version_metadata.source #=> Hash
resp.documents[0].latest_version_metadata.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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents AWS API Documentation

@overload describe_folder_contents(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1472
def describe_folder_contents(params = {}, options = {})
  req = build_request(:describe_folder_contents, params)
  req.send_request(options)
end
describe_groups(params = {}, options = {}) click to toggle source

Describes the groups specified by the query. Groups are defined by the underlying Active Directory.

@option params [String] :authentication_token

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

@option params [required, String] :search_query

A query to describe groups by group name.

@option params [String] :organization_id

The ID of the organization.

@option params [String] :marker

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

@option params [Integer] :limit

The maximum number of items to return with this call.

@return [Types::DescribeGroupsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeGroupsResponse#groups #groups} => Array&lt;Types::GroupMetadata&gt;
* {Types::DescribeGroupsResponse#marker #marker} => String

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroups AWS API Documentation

@overload describe_groups(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1523
def describe_groups(params = {}, options = {})
  req = build_request(:describe_groups, params)
  req.send_request(options)
end
describe_notification_subscriptions(params = {}, options = {}) click to toggle source

Lists the specified notification subscriptions.

@option params [required, String] :organization_id

The ID of the organization.

@option params [String] :marker

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

@option params [Integer] :limit

The maximum number of items to return with this call.

@return [Types::DescribeNotificationSubscriptionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeNotificationSubscriptionsResponse#subscriptions #subscriptions} => Array&lt;Types::Subscription&gt;
* {Types::DescribeNotificationSubscriptionsResponse#marker #marker} => String

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions AWS API Documentation

@overload describe_notification_subscriptions(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1565
def describe_notification_subscriptions(params = {}, options = {})
  req = build_request(:describe_notification_subscriptions, params)
  req.send_request(options)
end
describe_resource_permissions(params = {}, options = {}) click to toggle source

Describes the permissions of a specified resource.

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

The ID of the resource.

@option params [String] :principal_id

The ID of the principal to filter permissions by.

@option params [Integer] :limit

The maximum number of items to return with this call.

@option params [String] :marker

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

@return [Types::DescribeResourcePermissionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeResourcePermissionsResponse#principals #principals} => Array&lt;Types::Principal&gt;
* {Types::DescribeResourcePermissionsResponse#marker #marker} => String

@example Request syntax with placeholder values

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions AWS API Documentation

@overload describe_resource_permissions(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1618
def describe_resource_permissions(params = {}, options = {})
  req = build_request(:describe_resource_permissions, params)
  req.send_request(options)
end
describe_root_folders(params = {}, options = {}) click to toggle source

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

[1]: docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html

@option params [required, String] :authentication_token

Amazon WorkDocs authentication token.

@option params [Integer] :limit

The maximum number of items to return.

@option params [String] :marker

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

@return [Types::DescribeRootFoldersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeRootFoldersResponse#folders #folders} => Array&lt;Types::FolderMetadata&gt;
* {Types::DescribeRootFoldersResponse#marker #marker} => String

@example Request syntax with placeholder values

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFolders AWS API Documentation

@overload describe_root_folders(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1681
def describe_root_folders(params = {}, options = {})
  req = build_request(:describe_root_folders, params)
  req.send_request(options)
end
describe_users(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [String] :organization_id

The ID of the organization.

@option params [String] :user_ids

The IDs of the users.

@option params [String] :query

A query to filter users by user name.

@option params [String] :include

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

@option params [String] :order

The order for the results.

@option params [String] :sort

The sorting criteria.

@option params [String] :marker

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

@option params [Integer] :limit

The maximum number of items to return.

@option params [String] :fields

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

@return [Types::DescribeUsersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::DescribeUsersResponse#users #users} => Array&lt;Types::User&gt;
* {Types::DescribeUsersResponse#total_number_of_users #total_number_of_users} => Integer
* {Types::DescribeUsersResponse#marker #marker} => String

The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.

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

@example 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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers AWS API Documentation

@overload describe_users(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1776
def describe_users(params = {}, options = {})
  req = build_request(:describe_users, params)
  req.send_request(options)
end
get_current_user(params = {}, options = {}) click to toggle source

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

[1]: docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html

@option params [required, String] :authentication_token

Amazon WorkDocs authentication token.

@return [Types::GetCurrentUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetCurrentUserResponse#user #user} => Types::User

@example Request syntax with placeholder values

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

@example 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"

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUser AWS API Documentation

@overload get_current_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1831
def get_current_user(params = {}, options = {})
  req = build_request(:get_current_user, params)
  req.send_request(options)
end
get_document(params = {}, options = {}) click to toggle source

Retrieves details of a document.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [Boolean] :include_custom_metadata

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

@return [Types::GetDocumentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetDocumentResponse#metadata #metadata} => Types::DocumentMetadata
* {Types::GetDocumentResponse#custom_metadata #custom_metadata} => Hash&lt;String,String&gt;

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument AWS API Documentation

@overload get_document(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1893
def get_document(params = {}, options = {})
  req = build_request(:get_document, params)
  req.send_request(options)
end
get_document_path(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [Integer] :limit

The maximum number of levels in the hierarchy to return.

@option params [String] :fields

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

@option params [String] :marker

This value is not supported.

@return [Types::GetDocumentPathResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetDocumentPathResponse#path #path} => Types::ResourcePath

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath AWS API Documentation

@overload get_document_path(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 1947
def get_document_path(params = {}, options = {})
  req = build_request(:get_document_path, params)
  req.send_request(options)
end
get_document_version(params = {}, options = {}) click to toggle source

Retrieves version metadata for the specified document.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The version ID of the document.

@option params [String] :fields

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

@option params [Boolean] :include_custom_metadata

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

@return [Types::GetDocumentVersionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetDocumentVersionResponse#metadata #metadata} => Types::DocumentVersionMetadata
* {Types::GetDocumentVersionResponse#custom_metadata #custom_metadata} => Hash&lt;String,String&gt;

@example 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,
})

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion AWS API Documentation

@overload get_document_version(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2010
def get_document_version(params = {}, options = {})
  req = build_request(:get_document_version, params)
  req.send_request(options)
end
get_folder(params = {}, options = {}) click to toggle source

Retrieves the metadata of the specified folder.

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@option params [Boolean] :include_custom_metadata

Set to TRUE to include custom metadata in the response.

@return [Types::GetFolderResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetFolderResponse#metadata #metadata} => Types::FolderMetadata
* {Types::GetFolderResponse#custom_metadata #custom_metadata} => Hash&lt;String,String&gt;

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder AWS API Documentation

@overload get_folder(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2061
def get_folder(params = {}, options = {})
  req = build_request(:get_folder, params)
  req.send_request(options)
end
get_folder_path(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@option params [Integer] :limit

The maximum number of levels in the hierarchy to return.

@option params [String] :fields

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

@option params [String] :marker

This value is not supported.

@return [Types::GetFolderPathResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetFolderPathResponse#path #path} => Types::ResourcePath

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath AWS API Documentation

@overload get_folder_path(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2115
def get_folder_path(params = {}, options = {})
  req = build_request(:get_folder_path, params)
  req.send_request(options)
end
get_resources(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

The Amazon WorkDocs authentication token. Not required when using AWS
administrator credentials to access the API.

@option params [String] :user_id

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

@option params [String] :collection_type

The collection type.

@option params [Integer] :limit

The maximum number of resources to return.

@option params [String] :marker

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

@return [Types::GetResourcesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::GetResourcesResponse#folders #folders} => Array&lt;Types::FolderMetadata&gt;
* {Types::GetResourcesResponse#documents #documents} => Array&lt;Types::DocumentMetadata&gt;
* {Types::GetResourcesResponse#marker #marker} => String

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

@example 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].latest_version_metadata.id #=> String
resp.documents[0].latest_version_metadata.name #=> String
resp.documents[0].latest_version_metadata.content_type #=> String
resp.documents[0].latest_version_metadata.size #=> Integer
resp.documents[0].latest_version_metadata.signature #=> String
resp.documents[0].latest_version_metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
resp.documents[0].latest_version_metadata.created_timestamp #=> Time
resp.documents[0].latest_version_metadata.modified_timestamp #=> Time
resp.documents[0].latest_version_metadata.content_created_timestamp #=> Time
resp.documents[0].latest_version_metadata.content_modified_timestamp #=> Time
resp.documents[0].latest_version_metadata.creator_id #=> String
resp.documents[0].latest_version_metadata.thumbnail #=> Hash
resp.documents[0].latest_version_metadata.thumbnail["DocumentThumbnailType"] #=> String
resp.documents[0].latest_version_metadata.source #=> Hash
resp.documents[0].latest_version_metadata.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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetResources AWS API Documentation

@overload get_resources(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2202
def get_resources(params = {}, options = {})
  req = build_request(:get_resources, params)
  req.send_request(options)
end
initiate_document_version_upload(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [String] :id

The ID of the document.

@option params [String] :name

The name of the document.

@option params [Time,DateTime,Date,Integer,String] :content_created_timestamp

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

@option params [Time,DateTime,Date,Integer,String] :content_modified_timestamp

The timestamp when the content of the document was modified.

@option params [String] :content_type

The content type of the document.

@option params [Integer] :document_size_in_bytes

The size of the document, in bytes.

@option params [required, String] :parent_folder_id

The ID of the parent folder.

@return [Types::InitiateDocumentVersionUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::InitiateDocumentVersionUploadResponse#metadata #metadata} => Types::DocumentMetadata
* {Types::InitiateDocumentVersionUploadResponse#upload_metadata #upload_metadata} => Types::UploadMetadata

@example Request syntax with placeholder values

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

@example Response structure

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUpload AWS API Documentation

@overload initiate_document_version_upload(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2293
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 = {}, options = {}) click to toggle source

Removes all the permissions from the specified resource.

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

The ID of the resource.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

@example Request syntax with placeholder values

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissions AWS API Documentation

@overload remove_all_resource_permissions(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2320
def remove_all_resource_permissions(params = {}, options = {})
  req = build_request(:remove_all_resource_permissions, params)
  req.send_request(options)
end
remove_resource_permission(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :resource_id

The ID of the resource.

@option params [required, String] :principal_id

The principal ID of the resource.

@option params [String] :principal_type

The principal type of the resource.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermission AWS API Documentation

@overload remove_resource_permission(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2356
def remove_resource_permission(params = {}, options = {})
  req = build_request(:remove_resource_permission, params)
  req.send_request(options)
end
update_document(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [String] :name

The name of the document.

@option params [String] :parent_folder_id

The ID of the parent folder.

@option params [String] :resource_state

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocument AWS API Documentation

@overload update_document(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2397
def update_document(params = {}, options = {})
  req = build_request(:update_document, params)
  req.send_request(options)
end
update_document_version(params = {}, options = {}) click to toggle source

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.

@option params [String] :authentication_token

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

@option params [required, String] :document_id

The ID of the document.

@option params [required, String] :version_id

The version ID of the document.

@option params [String] :version_status

The status of the version.

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersion AWS API Documentation

@overload update_document_version(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2437
def update_document_version(params = {}, options = {})
  req = build_request(:update_document_version, params)
  req.send_request(options)
end
update_folder(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :folder_id

The ID of the folder.

@option params [String] :name

The name of the folder.

@option params [String] :parent_folder_id

The ID of the parent folder.

@option params [String] :resource_state

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

@return [Struct] Returns an empty {Seahorse::Client::Response response}.

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

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolder AWS API Documentation

@overload update_folder(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2479
def update_folder(params = {}, options = {})
  req = build_request(:update_folder, params)
  req.send_request(options)
end
update_user(params = {}, options = {}) click to toggle source

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

@option params [String] :authentication_token

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

@option params [required, String] :user_id

The ID of the user.

@option params [String] :given_name

The given name of the user.

@option params [String] :surname

The surname of the user.

@option params [String] :type

The type of the user.

@option params [Types::StorageRuleType] :storage_rule

The amount of storage for the user.

@option params [String] :time_zone_id

The time zone ID of the user.

@option params [String] :locale

The locale of the user.

@option params [String] :grant_poweruser_privileges

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

@return [Types::UpdateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:

* {Types::UpdateUserResponse#user #user} => Types::User

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

@example 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"

@see docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUser AWS API Documentation

@overload update_user(params = {}) @param [Hash] params ({})

# File lib/aws-sdk-workdocs/client.rb, line 2561
def update_user(params = {}, options = {})
  req = build_request(:update_user, params)
  req.send_request(options)
end
waiter_names() click to toggle source

@api private @deprecated

# File lib/aws-sdk-workdocs/client.rb, line 2585
def waiter_names
  []
end