Method: Aws::WorkDocs::Client#describe_users

Defined in:
lib/aws-sdk-workdocs/client.rb

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

Describes the specified users. You can describe all users or filter the results (for example, by status or organization).

By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.

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

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :authentication_token (String)

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

  • :organization_id (String)

    The ID of the organization.

  • :user_ids (String)

    The IDs of the users.

  • :query (String)

    A query to filter users by user name. Remember the following about the Userids and Query parameters:

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

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

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

    • The Query parameter runs a “prefix” search for users by the GivenName, SurName, or UserName fields included in a

      CreateUser][1

      API call. For example, querying on Ma returns

      Márcia Oliveira, María García, and Mateo Jackson. If you use multiple characters, the API only returns data that matches all characters. For example, querying on ‘Ma J` only returns Mateo Jackson.

    [1]: docs.aws.amazon.com/workdocs/latest/APIReference/API_CreateUser.html

  • :include (String)

    The state of the users. Specify “ALL” to include inactive users.

  • :order (String)

    The order for the results.

  • :sort (String)

    The sorting criteria.

  • :marker (String)

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

  • :limit (Integer)

    The maximum number of items to return.

  • :fields (String)

    A comma-separated list of values. Specify “STORAGE_METADATA” to include the user storage quota and utilization information.

Returns:

See Also:



1998
1999
2000
2001
# File 'lib/aws-sdk-workdocs/client.rb', line 1998

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