aws-sdk-workdocs 1.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0679735e7759400ef0a91fabc335c5bdefdaafab
4
+ data.tar.gz: 2f9a18aae9b53e8934299e514598dbc080ec7eea
5
+ SHA512:
6
+ metadata.gz: 0af9e3932dd88e9e609d9c54a1d1514f73de8b5c4c001ea967abd246217a4e2fa5c71394ef75f3c91838be7d47e34db21e95af0726f9a34f656d438c69d258fd
7
+ data.tar.gz: 03c81abc4d9071bab785aac193ad78c1cc1e3b13e995c4d1a0a64372dd160ddd6c3303e8225b1a9588b90a11f91fba48b9e1c7f959765c8d67abbc6d4745ddec
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-workdocs/types'
12
+ require_relative 'aws-sdk-workdocs/client_api'
13
+ require_relative 'aws-sdk-workdocs/client'
14
+ require_relative 'aws-sdk-workdocs/errors'
15
+ require_relative 'aws-sdk-workdocs/resource'
16
+ require_relative 'aws-sdk-workdocs/customizations'
17
+
18
+ # This module provides support for Amazon WorkDocs. This module is available in the
19
+ # `aws-sdk-workdocs` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon WorkDocs all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::WorkDocs::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::WorkDocs
44
+
45
+ GEM_VERSION = '1.0.0.rc1'
46
+
47
+ end
@@ -0,0 +1,1486 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/response_paging.rb'
19
+ require 'aws-sdk-core/plugins/stub_responses.rb'
20
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/signature_v4.rb'
22
+ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
23
+
24
+ Aws::Plugins::GlobalConfiguration.add_identifier(:workdocs)
25
+
26
+ module Aws::WorkDocs
27
+ class Client < Seahorse::Client::Base
28
+
29
+ include Aws::ClientStubs
30
+
31
+ @identifier = :workdocs
32
+
33
+ set_api(ClientApi::API)
34
+
35
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
36
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
37
+ add_plugin(Aws::Plugins::Logging)
38
+ add_plugin(Aws::Plugins::ParamConverter)
39
+ add_plugin(Aws::Plugins::ParamValidator)
40
+ add_plugin(Aws::Plugins::UserAgent)
41
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
42
+ add_plugin(Aws::Plugins::RetryErrors)
43
+ add_plugin(Aws::Plugins::GlobalConfiguration)
44
+ add_plugin(Aws::Plugins::RegionalEndpoint)
45
+ add_plugin(Aws::Plugins::ResponsePaging)
46
+ add_plugin(Aws::Plugins::StubResponses)
47
+ add_plugin(Aws::Plugins::IdempotencyToken)
48
+ add_plugin(Aws::Plugins::SignatureV4)
49
+ add_plugin(Aws::Plugins::Protocols::RestJson)
50
+
51
+ # @option options [required, Aws::CredentialProvider] :credentials
52
+ # Your AWS credentials. This can be an instance of any one of the
53
+ # following classes:
54
+ #
55
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
56
+ # credentials.
57
+ #
58
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
59
+ # from an EC2 IMDS on an EC2 instance.
60
+ #
61
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
62
+ # shared file, such as `~/.aws/config`.
63
+ #
64
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
65
+ #
66
+ # When `:credentials` are not configured directly, the following
67
+ # locations will be searched for credentials:
68
+ #
69
+ # * `Aws.config[:credentials]`
70
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
71
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
72
+ # * `~/.aws/credentials`
73
+ # * `~/.aws/config`
74
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
75
+ # very aggressive. Construct and pass an instance of
76
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
77
+ # timeouts.
78
+ #
79
+ # @option options [required, String] :region
80
+ # The AWS region to connect to. The configured `:region` is
81
+ # used to determine the service `:endpoint`. When not passed,
82
+ # a default `:region` is search for in the following locations:
83
+ #
84
+ # * `Aws.config[:region]`
85
+ # * `ENV['AWS_REGION']`
86
+ # * `ENV['AMAZON_REGION']`
87
+ # * `ENV['AWS_DEFAULT_REGION']`
88
+ # * `~/.aws/credentials`
89
+ # * `~/.aws/config`
90
+ #
91
+ # @option options [String] :access_key_id
92
+ #
93
+ # @option options [Boolean] :convert_params (true)
94
+ # When `true`, an attempt is made to coerce request parameters into
95
+ # the required types.
96
+ #
97
+ # @option options [String] :endpoint
98
+ # The client endpoint is normally constructed from the `:region`
99
+ # option. You should only configure an `:endpoint` when connecting
100
+ # to test endpoints. This should be avalid HTTP(S) URI.
101
+ #
102
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
103
+ # The log formatter.
104
+ #
105
+ # @option options [Symbol] :log_level (:info)
106
+ # The log level to send messages to the `:logger` at.
107
+ #
108
+ # @option options [Logger] :logger
109
+ # The Logger instance to send log messages to. If this option
110
+ # is not set, logging will be disabled.
111
+ #
112
+ # @option options [String] :profile ("default")
113
+ # Used when loading credentials from the shared credentials file
114
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
115
+ #
116
+ # @option options [Integer] :retry_limit (3)
117
+ # The maximum number of times to retry failed requests. Only
118
+ # ~ 500 level server errors and certain ~ 400 level client errors
119
+ # are retried. Generally, these are throttling errors, data
120
+ # checksum errors, networking errors, timeout errors and auth
121
+ # errors from expired credentials.
122
+ #
123
+ # @option options [String] :secret_access_key
124
+ #
125
+ # @option options [String] :session_token
126
+ #
127
+ # @option options [Boolean] :stub_responses (false)
128
+ # Causes the client to return stubbed responses. By default
129
+ # fake responses are generated and returned. You can specify
130
+ # the response data to return or errors to raise by calling
131
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
132
+ #
133
+ # ** Please note ** When response stubbing is enabled, no HTTP
134
+ # requests are made, and retries are disabled.
135
+ #
136
+ # @option options [Boolean] :validate_params (true)
137
+ # When `true`, request parameters are validated before
138
+ # sending the request.
139
+ #
140
+ def initialize(*args)
141
+ super
142
+ end
143
+
144
+ # @!group API Operations
145
+
146
+ # Aborts the upload of the specified document version that was
147
+ # previously initiated by InitiateDocumentVersionUpload. The client
148
+ # should make this call only when it no longer intends or fails to
149
+ # upload the document version.
150
+ #
151
+ # @option params [required, String] :document_id
152
+ # The ID of the document.
153
+ #
154
+ # @option params [required, String] :version_id
155
+ # The ID of the version.
156
+ #
157
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
158
+ #
159
+ # @example Request syntax with placeholder values
160
+ #
161
+ # resp = client.abort_document_version_upload({
162
+ # document_id: "ResourceIdType", # required
163
+ # version_id: "DocumentVersionIdType", # required
164
+ # })
165
+ #
166
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload AWS API Documentation
167
+ #
168
+ # @overload abort_document_version_upload(params = {})
169
+ # @param [Hash] params ({})
170
+ def abort_document_version_upload(params = {}, options = {})
171
+ req = build_request(:abort_document_version_upload, params)
172
+ req.send_request(options)
173
+ end
174
+
175
+ # Activates the specified user. Only active users can access Amazon
176
+ # WorkDocs.
177
+ #
178
+ # @option params [required, String] :user_id
179
+ # The ID of the user.
180
+ #
181
+ # @return [Types::ActivateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
182
+ #
183
+ # * {Types::ActivateUserResponse#user #user} => Types::User
184
+ #
185
+ # @example Request syntax with placeholder values
186
+ #
187
+ # resp = client.activate_user({
188
+ # user_id: "IdType", # required
189
+ # })
190
+ #
191
+ # @example Response structure
192
+ #
193
+ # resp.user.id #=> String
194
+ # resp.user.username #=> String
195
+ # resp.user.email_address #=> String
196
+ # resp.user.given_name #=> String
197
+ # resp.user.surname #=> String
198
+ # resp.user.organization_id #=> String
199
+ # resp.user.root_folder_id #=> String
200
+ # resp.user.recycle_bin_folder_id #=> String
201
+ # resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
202
+ # resp.user.type #=> String, one of "USER", "ADMIN"
203
+ # resp.user.created_timestamp #=> Time
204
+ # resp.user.modified_timestamp #=> Time
205
+ # resp.user.time_zone_id #=> String
206
+ # resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
207
+ # resp.user.storage.storage_utilized_in_bytes #=> Integer
208
+ # resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
209
+ # resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
210
+ #
211
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser AWS API Documentation
212
+ #
213
+ # @overload activate_user(params = {})
214
+ # @param [Hash] params ({})
215
+ def activate_user(params = {}, options = {})
216
+ req = build_request(:activate_user, params)
217
+ req.send_request(options)
218
+ end
219
+
220
+ # Creates a set of permissions for the specified folder or document. The
221
+ # resource permissions are overwritten if the principals already have
222
+ # different permissions.
223
+ #
224
+ # @option params [required, String] :resource_id
225
+ # The ID of the resource.
226
+ #
227
+ # @option params [required, Array<Types::SharePrincipal>] :principals
228
+ # The users, groups, or organization being granted permission.
229
+ #
230
+ # @return [Types::AddResourcePermissionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
231
+ #
232
+ # * {Types::AddResourcePermissionsResponse#share_results #share_results} => Array&lt;Types::ShareResult&gt;
233
+ #
234
+ # @example Request syntax with placeholder values
235
+ #
236
+ # resp = client.add_resource_permissions({
237
+ # resource_id: "ResourceIdType", # required
238
+ # principals: [ # required
239
+ # {
240
+ # id: "IdType", # required
241
+ # type: "USER", # required, accepts USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION
242
+ # role: "VIEWER", # required, accepts VIEWER, CONTRIBUTOR, OWNER, COOWNER
243
+ # },
244
+ # ],
245
+ # })
246
+ #
247
+ # @example Response structure
248
+ #
249
+ # resp.share_results #=> Array
250
+ # resp.share_results[0].principal_id #=> String
251
+ # resp.share_results[0].role #=> String, one of "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER"
252
+ # resp.share_results[0].status #=> String, one of "SUCCESS", "FAILURE"
253
+ # resp.share_results[0].share_id #=> String
254
+ # resp.share_results[0].status_message #=> String
255
+ #
256
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions AWS API Documentation
257
+ #
258
+ # @overload add_resource_permissions(params = {})
259
+ # @param [Hash] params ({})
260
+ def add_resource_permissions(params = {}, options = {})
261
+ req = build_request(:add_resource_permissions, params)
262
+ req.send_request(options)
263
+ end
264
+
265
+ # Creates a folder with the specified name and parent folder.
266
+ #
267
+ # @option params [String] :name
268
+ # The name of the new folder.
269
+ #
270
+ # @option params [required, String] :parent_folder_id
271
+ # The ID of the parent folder.
272
+ #
273
+ # @return [Types::CreateFolderResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
274
+ #
275
+ # * {Types::CreateFolderResponse#metadata #metadata} => Types::FolderMetadata
276
+ #
277
+ # @example Request syntax with placeholder values
278
+ #
279
+ # resp = client.create_folder({
280
+ # name: "ResourceNameType",
281
+ # parent_folder_id: "ResourceIdType", # required
282
+ # })
283
+ #
284
+ # @example Response structure
285
+ #
286
+ # resp.metadata.id #=> String
287
+ # resp.metadata.name #=> String
288
+ # resp.metadata.creator_id #=> String
289
+ # resp.metadata.parent_folder_id #=> String
290
+ # resp.metadata.created_timestamp #=> Time
291
+ # resp.metadata.modified_timestamp #=> Time
292
+ # resp.metadata.resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
293
+ # resp.metadata.signature #=> String
294
+ #
295
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder AWS API Documentation
296
+ #
297
+ # @overload create_folder(params = {})
298
+ # @param [Hash] params ({})
299
+ def create_folder(params = {}, options = {})
300
+ req = build_request(:create_folder, params)
301
+ req.send_request(options)
302
+ end
303
+
304
+ # Configure WorkDocs to use Amazon SNS notifications.
305
+ #
306
+ # The endpoint receives a confirmation message, and must confirm the
307
+ # subscription. For more information, see [Confirm the Subscription][1]
308
+ # in the *Amazon Simple Notification Service Developer Guide*.
309
+ #
310
+ #
311
+ #
312
+ # [1]: http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.confirm
313
+ #
314
+ # @option params [required, String] :organization_id
315
+ # The ID of the organization.
316
+ #
317
+ # @option params [required, String] :endpoint
318
+ # The endpoint to receive the notifications. If the protocol is HTTPS,
319
+ # the endpoint is a URL that begins with "https://".
320
+ #
321
+ # @option params [required, String] :protocol
322
+ # The protocol to use. The supported value is https, which delivers
323
+ # JSON-encoded messasges using HTTPS POST.
324
+ #
325
+ # @option params [required, String] :subscription_type
326
+ # The notification type.
327
+ #
328
+ # @return [Types::CreateNotificationSubscriptionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
329
+ #
330
+ # * {Types::CreateNotificationSubscriptionResponse#subscription #subscription} => Types::Subscription
331
+ #
332
+ # @example Request syntax with placeholder values
333
+ #
334
+ # resp = client.create_notification_subscription({
335
+ # organization_id: "IdType", # required
336
+ # endpoint: "SubscriptionEndPointType", # required
337
+ # protocol: "HTTPS", # required, accepts HTTPS
338
+ # subscription_type: "ALL", # required, accepts ALL
339
+ # })
340
+ #
341
+ # @example Response structure
342
+ #
343
+ # resp.subscription.subscription_id #=> String
344
+ # resp.subscription.end_point #=> String
345
+ # resp.subscription.protocol #=> String, one of "HTTPS"
346
+ #
347
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription AWS API Documentation
348
+ #
349
+ # @overload create_notification_subscription(params = {})
350
+ # @param [Hash] params ({})
351
+ def create_notification_subscription(params = {}, options = {})
352
+ req = build_request(:create_notification_subscription, params)
353
+ req.send_request(options)
354
+ end
355
+
356
+ # Creates a user in a Simple AD or Microsoft AD directory. The status of
357
+ # a newly created user is "ACTIVE". New users can access Amazon
358
+ # WorkDocs.
359
+ #
360
+ # @option params [String] :organization_id
361
+ # The ID of the organization.
362
+ #
363
+ # @option params [required, String] :username
364
+ # The login name of the user.
365
+ #
366
+ # @option params [required, String] :given_name
367
+ # The given name of the user.
368
+ #
369
+ # @option params [required, String] :surname
370
+ # The surname of the user.
371
+ #
372
+ # @option params [required, String] :password
373
+ # The password of the user.
374
+ #
375
+ # @option params [String] :time_zone_id
376
+ # The time zone ID of the user.
377
+ #
378
+ # @option params [Types::StorageRuleType] :storage_rule
379
+ # The amount of storage for the user.
380
+ #
381
+ # @return [Types::CreateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
382
+ #
383
+ # * {Types::CreateUserResponse#user #user} => Types::User
384
+ #
385
+ # @example Request syntax with placeholder values
386
+ #
387
+ # resp = client.create_user({
388
+ # organization_id: "IdType",
389
+ # username: "UsernameType", # required
390
+ # given_name: "UserAttributeValueType", # required
391
+ # surname: "UserAttributeValueType", # required
392
+ # password: "PasswordType", # required
393
+ # time_zone_id: "TimeZoneIdType",
394
+ # storage_rule: {
395
+ # storage_allocated_in_bytes: 1,
396
+ # storage_type: "UNLIMITED", # accepts UNLIMITED, QUOTA
397
+ # },
398
+ # })
399
+ #
400
+ # @example Response structure
401
+ #
402
+ # resp.user.id #=> String
403
+ # resp.user.username #=> String
404
+ # resp.user.email_address #=> String
405
+ # resp.user.given_name #=> String
406
+ # resp.user.surname #=> String
407
+ # resp.user.organization_id #=> String
408
+ # resp.user.root_folder_id #=> String
409
+ # resp.user.recycle_bin_folder_id #=> String
410
+ # resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
411
+ # resp.user.type #=> String, one of "USER", "ADMIN"
412
+ # resp.user.created_timestamp #=> Time
413
+ # resp.user.modified_timestamp #=> Time
414
+ # resp.user.time_zone_id #=> String
415
+ # resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
416
+ # resp.user.storage.storage_utilized_in_bytes #=> Integer
417
+ # resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
418
+ # resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
419
+ #
420
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser AWS API Documentation
421
+ #
422
+ # @overload create_user(params = {})
423
+ # @param [Hash] params ({})
424
+ def create_user(params = {}, options = {})
425
+ req = build_request(:create_user, params)
426
+ req.send_request(options)
427
+ end
428
+
429
+ # Deactivates the specified user, which revokes the user's access to
430
+ # Amazon WorkDocs.
431
+ #
432
+ # @option params [required, String] :user_id
433
+ # The ID of the user.
434
+ #
435
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
436
+ #
437
+ # @example Request syntax with placeholder values
438
+ #
439
+ # resp = client.deactivate_user({
440
+ # user_id: "IdType", # required
441
+ # })
442
+ #
443
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser AWS API Documentation
444
+ #
445
+ # @overload deactivate_user(params = {})
446
+ # @param [Hash] params ({})
447
+ def deactivate_user(params = {}, options = {})
448
+ req = build_request(:deactivate_user, params)
449
+ req.send_request(options)
450
+ end
451
+
452
+ # Permanently deletes the specified document and its associated
453
+ # metadata.
454
+ #
455
+ # @option params [required, String] :document_id
456
+ # The ID of the document.
457
+ #
458
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
459
+ #
460
+ # @example Request syntax with placeholder values
461
+ #
462
+ # resp = client.delete_document({
463
+ # document_id: "ResourceIdType", # required
464
+ # })
465
+ #
466
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument AWS API Documentation
467
+ #
468
+ # @overload delete_document(params = {})
469
+ # @param [Hash] params ({})
470
+ def delete_document(params = {}, options = {})
471
+ req = build_request(:delete_document, params)
472
+ req.send_request(options)
473
+ end
474
+
475
+ # Permanently deletes the specified folder and its contents.
476
+ #
477
+ # @option params [required, String] :folder_id
478
+ # The ID of the folder.
479
+ #
480
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
481
+ #
482
+ # @example Request syntax with placeholder values
483
+ #
484
+ # resp = client.delete_folder({
485
+ # folder_id: "ResourceIdType", # required
486
+ # })
487
+ #
488
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder AWS API Documentation
489
+ #
490
+ # @overload delete_folder(params = {})
491
+ # @param [Hash] params ({})
492
+ def delete_folder(params = {}, options = {})
493
+ req = build_request(:delete_folder, params)
494
+ req.send_request(options)
495
+ end
496
+
497
+ # Deletes the contents of the specified folder.
498
+ #
499
+ # @option params [required, String] :folder_id
500
+ # The ID of the folder.
501
+ #
502
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
503
+ #
504
+ # @example Request syntax with placeholder values
505
+ #
506
+ # resp = client.delete_folder_contents({
507
+ # folder_id: "ResourceIdType", # required
508
+ # })
509
+ #
510
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents AWS API Documentation
511
+ #
512
+ # @overload delete_folder_contents(params = {})
513
+ # @param [Hash] params ({})
514
+ def delete_folder_contents(params = {}, options = {})
515
+ req = build_request(:delete_folder_contents, params)
516
+ req.send_request(options)
517
+ end
518
+
519
+ # Deletes the specified subscription from the specified organization.
520
+ #
521
+ # @option params [required, String] :subscription_id
522
+ # The ID of the subscription.
523
+ #
524
+ # @option params [required, String] :organization_id
525
+ # The ID of the organization.
526
+ #
527
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
528
+ #
529
+ # @example Request syntax with placeholder values
530
+ #
531
+ # resp = client.delete_notification_subscription({
532
+ # subscription_id: "IdType", # required
533
+ # organization_id: "IdType", # required
534
+ # })
535
+ #
536
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription AWS API Documentation
537
+ #
538
+ # @overload delete_notification_subscription(params = {})
539
+ # @param [Hash] params ({})
540
+ def delete_notification_subscription(params = {}, options = {})
541
+ req = build_request(:delete_notification_subscription, params)
542
+ req.send_request(options)
543
+ end
544
+
545
+ # Deletes the specified user from a Simple AD or Microsoft AD directory.
546
+ #
547
+ # @option params [required, String] :user_id
548
+ # The ID of the user.
549
+ #
550
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
551
+ #
552
+ # @example Request syntax with placeholder values
553
+ #
554
+ # resp = client.delete_user({
555
+ # user_id: "IdType", # required
556
+ # })
557
+ #
558
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser AWS API Documentation
559
+ #
560
+ # @overload delete_user(params = {})
561
+ # @param [Hash] params ({})
562
+ def delete_user(params = {}, options = {})
563
+ req = build_request(:delete_user, params)
564
+ req.send_request(options)
565
+ end
566
+
567
+ # Retrieves the document versions for the specified document.
568
+ #
569
+ # By default, only active versions are returned.
570
+ #
571
+ # @option params [required, String] :document_id
572
+ # The ID of the document.
573
+ #
574
+ # @option params [String] :marker
575
+ # The marker for the next set of results. (You received this marker from
576
+ # a previous call.)
577
+ #
578
+ # @option params [Integer] :limit
579
+ # The maximum number of versions to return with this call.
580
+ #
581
+ # @option params [String] :include
582
+ # A comma-separated list of values. Specify "INITIALIZED" to include
583
+ # incomplete versions.
584
+ #
585
+ # @option params [String] :fields
586
+ # Specify "SOURCE" to include initialized versions and a URL for the
587
+ # source document.
588
+ #
589
+ # @return [Types::DescribeDocumentVersionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
590
+ #
591
+ # * {Types::DescribeDocumentVersionsResponse#document_versions #document_versions} => Array&lt;Types::DocumentVersionMetadata&gt;
592
+ # * {Types::DescribeDocumentVersionsResponse#marker #marker} => String
593
+ #
594
+ # @example Request syntax with placeholder values
595
+ #
596
+ # resp = client.describe_document_versions({
597
+ # document_id: "ResourceIdType", # required
598
+ # marker: "PageMarkerType",
599
+ # limit: 1,
600
+ # include: "FieldNamesType",
601
+ # fields: "FieldNamesType",
602
+ # })
603
+ #
604
+ # @example Response structure
605
+ #
606
+ # resp.document_versions #=> Array
607
+ # resp.document_versions[0].id #=> String
608
+ # resp.document_versions[0].name #=> String
609
+ # resp.document_versions[0].content_type #=> String
610
+ # resp.document_versions[0].size #=> Integer
611
+ # resp.document_versions[0].signature #=> String
612
+ # resp.document_versions[0].status #=> String, one of "INITIALIZED", "ACTIVE"
613
+ # resp.document_versions[0].created_timestamp #=> Time
614
+ # resp.document_versions[0].modified_timestamp #=> Time
615
+ # resp.document_versions[0].content_created_timestamp #=> Time
616
+ # resp.document_versions[0].content_modified_timestamp #=> Time
617
+ # resp.document_versions[0].creator_id #=> String
618
+ # resp.document_versions[0].thumbnail #=> Hash
619
+ # resp.document_versions[0].thumbnail["DocumentThumbnailType"] #=> String
620
+ # resp.document_versions[0].source #=> Hash
621
+ # resp.document_versions[0].source["DocumentSourceType"] #=> String
622
+ # resp.marker #=> String
623
+ #
624
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions AWS API Documentation
625
+ #
626
+ # @overload describe_document_versions(params = {})
627
+ # @param [Hash] params ({})
628
+ def describe_document_versions(params = {}, options = {})
629
+ req = build_request(:describe_document_versions, params)
630
+ req.send_request(options)
631
+ end
632
+
633
+ # Describes the contents of the specified folder, including its
634
+ # documents and sub-folders.
635
+ #
636
+ # By default, Amazon WorkDocs returns the first 100 active document and
637
+ # folder metadata items. If there are more results, the response
638
+ # includes a marker that you can use to request the next set of results.
639
+ # You can also request initialized documents.
640
+ #
641
+ # @option params [required, String] :folder_id
642
+ # The ID of the folder.
643
+ #
644
+ # @option params [String] :sort
645
+ # The sorting criteria.
646
+ #
647
+ # @option params [String] :order
648
+ # The order for the contents of the folder.
649
+ #
650
+ # @option params [Integer] :limit
651
+ # The maximum number of items to return with this call.
652
+ #
653
+ # @option params [String] :marker
654
+ # The marker for the next set of results. (You received this marker from
655
+ # a previous call.)
656
+ #
657
+ # @option params [String] :type
658
+ # The type of items.
659
+ #
660
+ # @option params [String] :include
661
+ # The contents to include. Specify "INITIALIZED" to include
662
+ # initialized documents.
663
+ #
664
+ # @return [Types::DescribeFolderContentsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
665
+ #
666
+ # * {Types::DescribeFolderContentsResponse#folders #folders} => Array&lt;Types::FolderMetadata&gt;
667
+ # * {Types::DescribeFolderContentsResponse#documents #documents} => Array&lt;Types::DocumentMetadata&gt;
668
+ # * {Types::DescribeFolderContentsResponse#marker #marker} => String
669
+ #
670
+ # @example Request syntax with placeholder values
671
+ #
672
+ # resp = client.describe_folder_contents({
673
+ # folder_id: "ResourceIdType", # required
674
+ # sort: "DATE", # accepts DATE, NAME
675
+ # order: "ASCENDING", # accepts ASCENDING, DESCENDING
676
+ # limit: 1,
677
+ # marker: "PageMarkerType",
678
+ # type: "ALL", # accepts ALL, DOCUMENT, FOLDER
679
+ # include: "FieldNamesType",
680
+ # })
681
+ #
682
+ # @example Response structure
683
+ #
684
+ # resp.folders #=> Array
685
+ # resp.folders[0].id #=> String
686
+ # resp.folders[0].name #=> String
687
+ # resp.folders[0].creator_id #=> String
688
+ # resp.folders[0].parent_folder_id #=> String
689
+ # resp.folders[0].created_timestamp #=> Time
690
+ # resp.folders[0].modified_timestamp #=> Time
691
+ # resp.folders[0].resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
692
+ # resp.folders[0].signature #=> String
693
+ # resp.documents #=> Array
694
+ # resp.documents[0].id #=> String
695
+ # resp.documents[0].creator_id #=> String
696
+ # resp.documents[0].parent_folder_id #=> String
697
+ # resp.documents[0].created_timestamp #=> Time
698
+ # resp.documents[0].modified_timestamp #=> Time
699
+ # resp.documents[0].latest_version_metadata.id #=> String
700
+ # resp.documents[0].latest_version_metadata.name #=> String
701
+ # resp.documents[0].latest_version_metadata.content_type #=> String
702
+ # resp.documents[0].latest_version_metadata.size #=> Integer
703
+ # resp.documents[0].latest_version_metadata.signature #=> String
704
+ # resp.documents[0].latest_version_metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
705
+ # resp.documents[0].latest_version_metadata.created_timestamp #=> Time
706
+ # resp.documents[0].latest_version_metadata.modified_timestamp #=> Time
707
+ # resp.documents[0].latest_version_metadata.content_created_timestamp #=> Time
708
+ # resp.documents[0].latest_version_metadata.content_modified_timestamp #=> Time
709
+ # resp.documents[0].latest_version_metadata.creator_id #=> String
710
+ # resp.documents[0].latest_version_metadata.thumbnail #=> Hash
711
+ # resp.documents[0].latest_version_metadata.thumbnail["DocumentThumbnailType"] #=> String
712
+ # resp.documents[0].latest_version_metadata.source #=> Hash
713
+ # resp.documents[0].latest_version_metadata.source["DocumentSourceType"] #=> String
714
+ # resp.documents[0].resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
715
+ # resp.marker #=> String
716
+ #
717
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents AWS API Documentation
718
+ #
719
+ # @overload describe_folder_contents(params = {})
720
+ # @param [Hash] params ({})
721
+ def describe_folder_contents(params = {}, options = {})
722
+ req = build_request(:describe_folder_contents, params)
723
+ req.send_request(options)
724
+ end
725
+
726
+ # Lists the specified notification subscriptions.
727
+ #
728
+ # @option params [required, String] :organization_id
729
+ # The ID of the organization.
730
+ #
731
+ # @option params [String] :marker
732
+ # The marker for the next set of results. (You received this marker from
733
+ # a previous call.)
734
+ #
735
+ # @option params [Integer] :limit
736
+ # The maximum number of items to return with this call.
737
+ #
738
+ # @return [Types::DescribeNotificationSubscriptionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
739
+ #
740
+ # * {Types::DescribeNotificationSubscriptionsResponse#subscriptions #subscriptions} => Array&lt;Types::Subscription&gt;
741
+ # * {Types::DescribeNotificationSubscriptionsResponse#marker #marker} => String
742
+ #
743
+ # @example Request syntax with placeholder values
744
+ #
745
+ # resp = client.describe_notification_subscriptions({
746
+ # organization_id: "IdType", # required
747
+ # marker: "PageMarkerType",
748
+ # limit: 1,
749
+ # })
750
+ #
751
+ # @example Response structure
752
+ #
753
+ # resp.subscriptions #=> Array
754
+ # resp.subscriptions[0].subscription_id #=> String
755
+ # resp.subscriptions[0].end_point #=> String
756
+ # resp.subscriptions[0].protocol #=> String, one of "HTTPS"
757
+ # resp.marker #=> String
758
+ #
759
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions AWS API Documentation
760
+ #
761
+ # @overload describe_notification_subscriptions(params = {})
762
+ # @param [Hash] params ({})
763
+ def describe_notification_subscriptions(params = {}, options = {})
764
+ req = build_request(:describe_notification_subscriptions, params)
765
+ req.send_request(options)
766
+ end
767
+
768
+ # Describes the permissions of a specified resource.
769
+ #
770
+ # @option params [required, String] :resource_id
771
+ # The ID of the resource.
772
+ #
773
+ # @option params [Integer] :limit
774
+ # The maximum number of items to return with this call.
775
+ #
776
+ # @option params [String] :marker
777
+ # The marker for the next set of results. (You received this marker from
778
+ # a previous call)
779
+ #
780
+ # @return [Types::DescribeResourcePermissionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
781
+ #
782
+ # * {Types::DescribeResourcePermissionsResponse#principals #principals} => Array&lt;Types::Principal&gt;
783
+ # * {Types::DescribeResourcePermissionsResponse#marker #marker} => String
784
+ #
785
+ # @example Request syntax with placeholder values
786
+ #
787
+ # resp = client.describe_resource_permissions({
788
+ # resource_id: "ResourceIdType", # required
789
+ # limit: 1,
790
+ # marker: "PageMarkerType",
791
+ # })
792
+ #
793
+ # @example Response structure
794
+ #
795
+ # resp.principals #=> Array
796
+ # resp.principals[0].id #=> String
797
+ # resp.principals[0].type #=> String, one of "USER", "GROUP", "INVITE", "ANONYMOUS", "ORGANIZATION"
798
+ # resp.principals[0].roles #=> Array
799
+ # resp.principals[0].roles[0].role #=> String, one of "VIEWER", "CONTRIBUTOR", "OWNER", "COOWNER"
800
+ # resp.principals[0].roles[0].type #=> String, one of "DIRECT", "INHERITED"
801
+ # resp.marker #=> String
802
+ #
803
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions AWS API Documentation
804
+ #
805
+ # @overload describe_resource_permissions(params = {})
806
+ # @param [Hash] params ({})
807
+ def describe_resource_permissions(params = {}, options = {})
808
+ req = build_request(:describe_resource_permissions, params)
809
+ req.send_request(options)
810
+ end
811
+
812
+ # Describes the specified users. You can describe all users or filter
813
+ # the results (for example, by status or organization).
814
+ #
815
+ # By default, Amazon WorkDocs returns the first 24 active or pending
816
+ # users. If there are more results, the response includes a marker that
817
+ # you can use to request the next set of results.
818
+ #
819
+ # @option params [String] :organization_id
820
+ # The ID of the organization.
821
+ #
822
+ # @option params [String] :user_ids
823
+ # The IDs of the users.
824
+ #
825
+ # @option params [String] :query
826
+ # A query to filter users by user name.
827
+ #
828
+ # @option params [String] :include
829
+ # The state of the users. Specify "ALL" to include inactive users.
830
+ #
831
+ # @option params [String] :order
832
+ # The order for the results.
833
+ #
834
+ # @option params [String] :sort
835
+ # The sorting criteria.
836
+ #
837
+ # @option params [String] :marker
838
+ # The marker for the next set of results. (You received this marker from
839
+ # a previous call.)
840
+ #
841
+ # @option params [Integer] :limit
842
+ # The maximum number of items to return.
843
+ #
844
+ # @option params [String] :fields
845
+ # A comma-separated list of values. Specify "STORAGE\_METADATA" to
846
+ # include the user storage quota and utilization information.
847
+ #
848
+ # @return [Types::DescribeUsersResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
849
+ #
850
+ # * {Types::DescribeUsersResponse#users #users} => Array&lt;Types::User&gt;
851
+ # * {Types::DescribeUsersResponse#total_number_of_users #total_number_of_users} => Integer
852
+ # * {Types::DescribeUsersResponse#marker #marker} => String
853
+ #
854
+ # @example Request syntax with placeholder values
855
+ #
856
+ # resp = client.describe_users({
857
+ # organization_id: "IdType",
858
+ # user_ids: "UserIdsType",
859
+ # query: "SearchQueryType",
860
+ # include: "ALL", # accepts ALL, ACTIVE_PENDING
861
+ # order: "ASCENDING", # accepts ASCENDING, DESCENDING
862
+ # sort: "USER_NAME", # accepts USER_NAME, FULL_NAME, STORAGE_LIMIT, USER_STATUS, STORAGE_USED
863
+ # marker: "PageMarkerType",
864
+ # limit: 1,
865
+ # fields: "FieldNamesType",
866
+ # })
867
+ #
868
+ # @example Response structure
869
+ #
870
+ # resp.users #=> Array
871
+ # resp.users[0].id #=> String
872
+ # resp.users[0].username #=> String
873
+ # resp.users[0].email_address #=> String
874
+ # resp.users[0].given_name #=> String
875
+ # resp.users[0].surname #=> String
876
+ # resp.users[0].organization_id #=> String
877
+ # resp.users[0].root_folder_id #=> String
878
+ # resp.users[0].recycle_bin_folder_id #=> String
879
+ # resp.users[0].status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
880
+ # resp.users[0].type #=> String, one of "USER", "ADMIN"
881
+ # resp.users[0].created_timestamp #=> Time
882
+ # resp.users[0].modified_timestamp #=> Time
883
+ # resp.users[0].time_zone_id #=> String
884
+ # resp.users[0].locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
885
+ # resp.users[0].storage.storage_utilized_in_bytes #=> Integer
886
+ # resp.users[0].storage.storage_rule.storage_allocated_in_bytes #=> Integer
887
+ # resp.users[0].storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
888
+ # resp.total_number_of_users #=> Integer
889
+ # resp.marker #=> String
890
+ #
891
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers AWS API Documentation
892
+ #
893
+ # @overload describe_users(params = {})
894
+ # @param [Hash] params ({})
895
+ def describe_users(params = {}, options = {})
896
+ req = build_request(:describe_users, params)
897
+ req.send_request(options)
898
+ end
899
+
900
+ # Retrieves the specified document object.
901
+ #
902
+ # @option params [required, String] :document_id
903
+ # The ID of the document object.
904
+ #
905
+ # @return [Types::GetDocumentResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
906
+ #
907
+ # * {Types::GetDocumentResponse#metadata #metadata} => Types::DocumentMetadata
908
+ #
909
+ # @example Request syntax with placeholder values
910
+ #
911
+ # resp = client.get_document({
912
+ # document_id: "ResourceIdType", # required
913
+ # })
914
+ #
915
+ # @example Response structure
916
+ #
917
+ # resp.metadata.id #=> String
918
+ # resp.metadata.creator_id #=> String
919
+ # resp.metadata.parent_folder_id #=> String
920
+ # resp.metadata.created_timestamp #=> Time
921
+ # resp.metadata.modified_timestamp #=> Time
922
+ # resp.metadata.latest_version_metadata.id #=> String
923
+ # resp.metadata.latest_version_metadata.name #=> String
924
+ # resp.metadata.latest_version_metadata.content_type #=> String
925
+ # resp.metadata.latest_version_metadata.size #=> Integer
926
+ # resp.metadata.latest_version_metadata.signature #=> String
927
+ # resp.metadata.latest_version_metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
928
+ # resp.metadata.latest_version_metadata.created_timestamp #=> Time
929
+ # resp.metadata.latest_version_metadata.modified_timestamp #=> Time
930
+ # resp.metadata.latest_version_metadata.content_created_timestamp #=> Time
931
+ # resp.metadata.latest_version_metadata.content_modified_timestamp #=> Time
932
+ # resp.metadata.latest_version_metadata.creator_id #=> String
933
+ # resp.metadata.latest_version_metadata.thumbnail #=> Hash
934
+ # resp.metadata.latest_version_metadata.thumbnail["DocumentThumbnailType"] #=> String
935
+ # resp.metadata.latest_version_metadata.source #=> Hash
936
+ # resp.metadata.latest_version_metadata.source["DocumentSourceType"] #=> String
937
+ # resp.metadata.resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
938
+ #
939
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument AWS API Documentation
940
+ #
941
+ # @overload get_document(params = {})
942
+ # @param [Hash] params ({})
943
+ def get_document(params = {}, options = {})
944
+ req = build_request(:get_document, params)
945
+ req.send_request(options)
946
+ end
947
+
948
+ # Retrieves the path information (the hierarchy from the root folder)
949
+ # for the requested document.
950
+ #
951
+ # By default, Amazon WorkDocs returns a maximum of 100 levels upwards
952
+ # from the requested document and only includes the IDs of the parent
953
+ # folders in the path. You can limit the maximum number of levels. You
954
+ # can also request the names of the parent folders.
955
+ #
956
+ # @option params [required, String] :document_id
957
+ # The ID of the document.
958
+ #
959
+ # @option params [Integer] :limit
960
+ # The maximum number of levels in the hierarchy to return.
961
+ #
962
+ # @option params [String] :fields
963
+ # A comma-separated list of values. Specify "NAME" to include the
964
+ # names of the parent folders.
965
+ #
966
+ # @option params [String] :marker
967
+ # This value is not supported.
968
+ #
969
+ # @return [Types::GetDocumentPathResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
970
+ #
971
+ # * {Types::GetDocumentPathResponse#path #path} => Types::ResourcePath
972
+ #
973
+ # @example Request syntax with placeholder values
974
+ #
975
+ # resp = client.get_document_path({
976
+ # document_id: "IdType", # required
977
+ # limit: 1,
978
+ # fields: "FieldNamesType",
979
+ # marker: "PageMarkerType",
980
+ # })
981
+ #
982
+ # @example Response structure
983
+ #
984
+ # resp.path.components #=> Array
985
+ # resp.path.components[0].id #=> String
986
+ # resp.path.components[0].name #=> String
987
+ #
988
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath AWS API Documentation
989
+ #
990
+ # @overload get_document_path(params = {})
991
+ # @param [Hash] params ({})
992
+ def get_document_path(params = {}, options = {})
993
+ req = build_request(:get_document_path, params)
994
+ req.send_request(options)
995
+ end
996
+
997
+ # Retrieves version metadata for the specified document.
998
+ #
999
+ # @option params [required, String] :document_id
1000
+ # The ID of the document.
1001
+ #
1002
+ # @option params [required, String] :version_id
1003
+ # The version ID of the document.
1004
+ #
1005
+ # @option params [String] :fields
1006
+ # A comma-separated list of values. Specify "SOURCE" to include a URL
1007
+ # for the source document.
1008
+ #
1009
+ # @return [Types::GetDocumentVersionResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1010
+ #
1011
+ # * {Types::GetDocumentVersionResponse#metadata #metadata} => Types::DocumentVersionMetadata
1012
+ #
1013
+ # @example Request syntax with placeholder values
1014
+ #
1015
+ # resp = client.get_document_version({
1016
+ # document_id: "ResourceIdType", # required
1017
+ # version_id: "DocumentVersionIdType", # required
1018
+ # fields: "FieldNamesType",
1019
+ # })
1020
+ #
1021
+ # @example Response structure
1022
+ #
1023
+ # resp.metadata.id #=> String
1024
+ # resp.metadata.name #=> String
1025
+ # resp.metadata.content_type #=> String
1026
+ # resp.metadata.size #=> Integer
1027
+ # resp.metadata.signature #=> String
1028
+ # resp.metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
1029
+ # resp.metadata.created_timestamp #=> Time
1030
+ # resp.metadata.modified_timestamp #=> Time
1031
+ # resp.metadata.content_created_timestamp #=> Time
1032
+ # resp.metadata.content_modified_timestamp #=> Time
1033
+ # resp.metadata.creator_id #=> String
1034
+ # resp.metadata.thumbnail #=> Hash
1035
+ # resp.metadata.thumbnail["DocumentThumbnailType"] #=> String
1036
+ # resp.metadata.source #=> Hash
1037
+ # resp.metadata.source["DocumentSourceType"] #=> String
1038
+ #
1039
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion AWS API Documentation
1040
+ #
1041
+ # @overload get_document_version(params = {})
1042
+ # @param [Hash] params ({})
1043
+ def get_document_version(params = {}, options = {})
1044
+ req = build_request(:get_document_version, params)
1045
+ req.send_request(options)
1046
+ end
1047
+
1048
+ # Retrieves the metadata of the specified folder.
1049
+ #
1050
+ # @option params [required, String] :folder_id
1051
+ # The ID of the folder.
1052
+ #
1053
+ # @return [Types::GetFolderResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1054
+ #
1055
+ # * {Types::GetFolderResponse#metadata #metadata} => Types::FolderMetadata
1056
+ #
1057
+ # @example Request syntax with placeholder values
1058
+ #
1059
+ # resp = client.get_folder({
1060
+ # folder_id: "ResourceIdType", # required
1061
+ # })
1062
+ #
1063
+ # @example Response structure
1064
+ #
1065
+ # resp.metadata.id #=> String
1066
+ # resp.metadata.name #=> String
1067
+ # resp.metadata.creator_id #=> String
1068
+ # resp.metadata.parent_folder_id #=> String
1069
+ # resp.metadata.created_timestamp #=> Time
1070
+ # resp.metadata.modified_timestamp #=> Time
1071
+ # resp.metadata.resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
1072
+ # resp.metadata.signature #=> String
1073
+ #
1074
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder AWS API Documentation
1075
+ #
1076
+ # @overload get_folder(params = {})
1077
+ # @param [Hash] params ({})
1078
+ def get_folder(params = {}, options = {})
1079
+ req = build_request(:get_folder, params)
1080
+ req.send_request(options)
1081
+ end
1082
+
1083
+ # Retrieves the path information (the hierarchy from the root folder)
1084
+ # for the specified folder.
1085
+ #
1086
+ # By default, Amazon WorkDocs returns a maximum of 100 levels upwards
1087
+ # from the requested folder and only includes the IDs of the parent
1088
+ # folders in the path. You can limit the maximum number of levels. You
1089
+ # can also request the parent folder names.
1090
+ #
1091
+ # @option params [required, String] :folder_id
1092
+ # The ID of the folder.
1093
+ #
1094
+ # @option params [Integer] :limit
1095
+ # The maximum number of levels in the hierarchy to return.
1096
+ #
1097
+ # @option params [String] :fields
1098
+ # A comma-separated list of values. Specify "NAME" to include the
1099
+ # names of the parent folders.
1100
+ #
1101
+ # @option params [String] :marker
1102
+ # This value is not supported.
1103
+ #
1104
+ # @return [Types::GetFolderPathResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1105
+ #
1106
+ # * {Types::GetFolderPathResponse#path #path} => Types::ResourcePath
1107
+ #
1108
+ # @example Request syntax with placeholder values
1109
+ #
1110
+ # resp = client.get_folder_path({
1111
+ # folder_id: "IdType", # required
1112
+ # limit: 1,
1113
+ # fields: "FieldNamesType",
1114
+ # marker: "PageMarkerType",
1115
+ # })
1116
+ #
1117
+ # @example Response structure
1118
+ #
1119
+ # resp.path.components #=> Array
1120
+ # resp.path.components[0].id #=> String
1121
+ # resp.path.components[0].name #=> String
1122
+ #
1123
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath AWS API Documentation
1124
+ #
1125
+ # @overload get_folder_path(params = {})
1126
+ # @param [Hash] params ({})
1127
+ def get_folder_path(params = {}, options = {})
1128
+ req = build_request(:get_folder_path, params)
1129
+ req.send_request(options)
1130
+ end
1131
+
1132
+ # Creates a new document object and version object.
1133
+ #
1134
+ # The client specifies the parent folder ID and name of the document to
1135
+ # upload. The ID is optionally specified when creating a new version of
1136
+ # an existing document. This is the first step to upload a document.
1137
+ # Next, upload the document to the URL returned from the call, and then
1138
+ # call UpdateDocumentVersion.
1139
+ #
1140
+ # To cancel the document upload, call AbortDocumentVersionUpload.
1141
+ #
1142
+ # @option params [String] :id
1143
+ # The ID of the document.
1144
+ #
1145
+ # @option params [String] :name
1146
+ # The name of the document.
1147
+ #
1148
+ # @option params [Time,DateTime,Date,Integer,String] :content_created_timestamp
1149
+ # The time stamp when the content of the document was originally
1150
+ # created.
1151
+ #
1152
+ # @option params [Time,DateTime,Date,Integer,String] :content_modified_timestamp
1153
+ # The time stamp when the content of the document was modified.
1154
+ #
1155
+ # @option params [String] :content_type
1156
+ # The content type of the document.
1157
+ #
1158
+ # @option params [Integer] :document_size_in_bytes
1159
+ # The size of the document, in bytes.
1160
+ #
1161
+ # @option params [required, String] :parent_folder_id
1162
+ # The ID of the parent folder.
1163
+ #
1164
+ # @return [Types::InitiateDocumentVersionUploadResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1165
+ #
1166
+ # * {Types::InitiateDocumentVersionUploadResponse#metadata #metadata} => Types::DocumentMetadata
1167
+ # * {Types::InitiateDocumentVersionUploadResponse#upload_metadata #upload_metadata} => Types::UploadMetadata
1168
+ #
1169
+ # @example Request syntax with placeholder values
1170
+ #
1171
+ # resp = client.initiate_document_version_upload({
1172
+ # id: "ResourceIdType",
1173
+ # name: "ResourceNameType",
1174
+ # content_created_timestamp: Time.now,
1175
+ # content_modified_timestamp: Time.now,
1176
+ # content_type: "DocumentContentType",
1177
+ # document_size_in_bytes: 1,
1178
+ # parent_folder_id: "ResourceIdType", # required
1179
+ # })
1180
+ #
1181
+ # @example Response structure
1182
+ #
1183
+ # resp.metadata.id #=> String
1184
+ # resp.metadata.creator_id #=> String
1185
+ # resp.metadata.parent_folder_id #=> String
1186
+ # resp.metadata.created_timestamp #=> Time
1187
+ # resp.metadata.modified_timestamp #=> Time
1188
+ # resp.metadata.latest_version_metadata.id #=> String
1189
+ # resp.metadata.latest_version_metadata.name #=> String
1190
+ # resp.metadata.latest_version_metadata.content_type #=> String
1191
+ # resp.metadata.latest_version_metadata.size #=> Integer
1192
+ # resp.metadata.latest_version_metadata.signature #=> String
1193
+ # resp.metadata.latest_version_metadata.status #=> String, one of "INITIALIZED", "ACTIVE"
1194
+ # resp.metadata.latest_version_metadata.created_timestamp #=> Time
1195
+ # resp.metadata.latest_version_metadata.modified_timestamp #=> Time
1196
+ # resp.metadata.latest_version_metadata.content_created_timestamp #=> Time
1197
+ # resp.metadata.latest_version_metadata.content_modified_timestamp #=> Time
1198
+ # resp.metadata.latest_version_metadata.creator_id #=> String
1199
+ # resp.metadata.latest_version_metadata.thumbnail #=> Hash
1200
+ # resp.metadata.latest_version_metadata.thumbnail["DocumentThumbnailType"] #=> String
1201
+ # resp.metadata.latest_version_metadata.source #=> Hash
1202
+ # resp.metadata.latest_version_metadata.source["DocumentSourceType"] #=> String
1203
+ # resp.metadata.resource_state #=> String, one of "ACTIVE", "RESTORING", "RECYCLING", "RECYCLED"
1204
+ # resp.upload_metadata.upload_url #=> String
1205
+ # resp.upload_metadata.signed_headers #=> Hash
1206
+ # resp.upload_metadata.signed_headers["HeaderNameType"] #=> String
1207
+ #
1208
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUpload AWS API Documentation
1209
+ #
1210
+ # @overload initiate_document_version_upload(params = {})
1211
+ # @param [Hash] params ({})
1212
+ def initiate_document_version_upload(params = {}, options = {})
1213
+ req = build_request(:initiate_document_version_upload, params)
1214
+ req.send_request(options)
1215
+ end
1216
+
1217
+ # Removes all the permissions from the specified resource.
1218
+ #
1219
+ # @option params [required, String] :resource_id
1220
+ # The ID of the resource.
1221
+ #
1222
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1223
+ #
1224
+ # @example Request syntax with placeholder values
1225
+ #
1226
+ # resp = client.remove_all_resource_permissions({
1227
+ # resource_id: "ResourceIdType", # required
1228
+ # })
1229
+ #
1230
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissions AWS API Documentation
1231
+ #
1232
+ # @overload remove_all_resource_permissions(params = {})
1233
+ # @param [Hash] params ({})
1234
+ def remove_all_resource_permissions(params = {}, options = {})
1235
+ req = build_request(:remove_all_resource_permissions, params)
1236
+ req.send_request(options)
1237
+ end
1238
+
1239
+ # Removes the permission for the specified principal from the specified
1240
+ # resource.
1241
+ #
1242
+ # @option params [required, String] :resource_id
1243
+ # The ID of the resource.
1244
+ #
1245
+ # @option params [required, String] :principal_id
1246
+ # The principal ID of the resource.
1247
+ #
1248
+ # @option params [String] :principal_type
1249
+ # The principal type of the resource.
1250
+ #
1251
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1252
+ #
1253
+ # @example Request syntax with placeholder values
1254
+ #
1255
+ # resp = client.remove_resource_permission({
1256
+ # resource_id: "ResourceIdType", # required
1257
+ # principal_id: "IdType", # required
1258
+ # principal_type: "USER", # accepts USER, GROUP, INVITE, ANONYMOUS, ORGANIZATION
1259
+ # })
1260
+ #
1261
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermission AWS API Documentation
1262
+ #
1263
+ # @overload remove_resource_permission(params = {})
1264
+ # @param [Hash] params ({})
1265
+ def remove_resource_permission(params = {}, options = {})
1266
+ req = build_request(:remove_resource_permission, params)
1267
+ req.send_request(options)
1268
+ end
1269
+
1270
+ # Updates the specified attributes of the specified document. The user
1271
+ # must have access to both the document and its parent folder, if
1272
+ # applicable.
1273
+ #
1274
+ # @option params [required, String] :document_id
1275
+ # The ID of the document.
1276
+ #
1277
+ # @option params [String] :name
1278
+ # The name of the document.
1279
+ #
1280
+ # @option params [String] :parent_folder_id
1281
+ # The ID of the parent folder.
1282
+ #
1283
+ # @option params [String] :resource_state
1284
+ # The resource state of the document. Note that only ACTIVE and RECYCLED
1285
+ # are supported.
1286
+ #
1287
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1288
+ #
1289
+ # @example Request syntax with placeholder values
1290
+ #
1291
+ # resp = client.update_document({
1292
+ # document_id: "ResourceIdType", # required
1293
+ # name: "ResourceNameType",
1294
+ # parent_folder_id: "ResourceIdType",
1295
+ # resource_state: "ACTIVE", # accepts ACTIVE, RESTORING, RECYCLING, RECYCLED
1296
+ # })
1297
+ #
1298
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocument AWS API Documentation
1299
+ #
1300
+ # @overload update_document(params = {})
1301
+ # @param [Hash] params ({})
1302
+ def update_document(params = {}, options = {})
1303
+ req = build_request(:update_document, params)
1304
+ req.send_request(options)
1305
+ end
1306
+
1307
+ # Changes the status of the document version to ACTIVE.
1308
+ #
1309
+ # Amazon WorkDocs also sets its document container to ACTIVE. This is
1310
+ # the last step in a document upload, after the client uploads the
1311
+ # document to an S3-presigned URL returned by
1312
+ # InitiateDocumentVersionUpload.
1313
+ #
1314
+ # @option params [required, String] :document_id
1315
+ # The ID of the document.
1316
+ #
1317
+ # @option params [required, String] :version_id
1318
+ # The version ID of the document.
1319
+ #
1320
+ # @option params [String] :version_status
1321
+ # The status of the version.
1322
+ #
1323
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1324
+ #
1325
+ # @example Request syntax with placeholder values
1326
+ #
1327
+ # resp = client.update_document_version({
1328
+ # document_id: "ResourceIdType", # required
1329
+ # version_id: "DocumentVersionIdType", # required
1330
+ # version_status: "ACTIVE", # accepts ACTIVE
1331
+ # })
1332
+ #
1333
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersion AWS API Documentation
1334
+ #
1335
+ # @overload update_document_version(params = {})
1336
+ # @param [Hash] params ({})
1337
+ def update_document_version(params = {}, options = {})
1338
+ req = build_request(:update_document_version, params)
1339
+ req.send_request(options)
1340
+ end
1341
+
1342
+ # Updates the specified attributes of the specified folder. The user
1343
+ # must have access to both the folder and its parent folder, if
1344
+ # applicable.
1345
+ #
1346
+ # @option params [required, String] :folder_id
1347
+ # The ID of the folder.
1348
+ #
1349
+ # @option params [String] :name
1350
+ # The name of the folder.
1351
+ #
1352
+ # @option params [String] :parent_folder_id
1353
+ # The ID of the parent folder.
1354
+ #
1355
+ # @option params [String] :resource_state
1356
+ # The resource state of the folder. Note that only ACTIVE and RECYCLED
1357
+ # are accepted values from the API.
1358
+ #
1359
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1360
+ #
1361
+ # @example Request syntax with placeholder values
1362
+ #
1363
+ # resp = client.update_folder({
1364
+ # folder_id: "ResourceIdType", # required
1365
+ # name: "ResourceNameType",
1366
+ # parent_folder_id: "ResourceIdType",
1367
+ # resource_state: "ACTIVE", # accepts ACTIVE, RESTORING, RECYCLING, RECYCLED
1368
+ # })
1369
+ #
1370
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolder AWS API Documentation
1371
+ #
1372
+ # @overload update_folder(params = {})
1373
+ # @param [Hash] params ({})
1374
+ def update_folder(params = {}, options = {})
1375
+ req = build_request(:update_folder, params)
1376
+ req.send_request(options)
1377
+ end
1378
+
1379
+ # Updates the specified attributes of the specified user, and grants or
1380
+ # revokes administrative privileges to the Amazon WorkDocs site.
1381
+ #
1382
+ # @option params [required, String] :user_id
1383
+ # The ID of the user.
1384
+ #
1385
+ # @option params [String] :given_name
1386
+ # The given name of the user.
1387
+ #
1388
+ # @option params [String] :surname
1389
+ # The surname of the user.
1390
+ #
1391
+ # @option params [String] :type
1392
+ # The type of the user.
1393
+ #
1394
+ # @option params [Types::StorageRuleType] :storage_rule
1395
+ # The amount of storage for the user.
1396
+ #
1397
+ # @option params [String] :time_zone_id
1398
+ # The time zone ID of the user.
1399
+ #
1400
+ # @option params [String] :locale
1401
+ # The locale of the user.
1402
+ #
1403
+ # @return [Types::UpdateUserResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1404
+ #
1405
+ # * {Types::UpdateUserResponse#user #user} => Types::User
1406
+ #
1407
+ # @example Request syntax with placeholder values
1408
+ #
1409
+ # resp = client.update_user({
1410
+ # user_id: "IdType", # required
1411
+ # given_name: "UserAttributeValueType",
1412
+ # surname: "UserAttributeValueType",
1413
+ # type: "USER", # accepts USER, ADMIN
1414
+ # storage_rule: {
1415
+ # storage_allocated_in_bytes: 1,
1416
+ # storage_type: "UNLIMITED", # accepts UNLIMITED, QUOTA
1417
+ # },
1418
+ # time_zone_id: "TimeZoneIdType",
1419
+ # locale: "en", # accepts en, fr, ko, de, es, ja, ru, zh_CN, zh_TW, pt_BR, default
1420
+ # })
1421
+ #
1422
+ # @example Response structure
1423
+ #
1424
+ # resp.user.id #=> String
1425
+ # resp.user.username #=> String
1426
+ # resp.user.email_address #=> String
1427
+ # resp.user.given_name #=> String
1428
+ # resp.user.surname #=> String
1429
+ # resp.user.organization_id #=> String
1430
+ # resp.user.root_folder_id #=> String
1431
+ # resp.user.recycle_bin_folder_id #=> String
1432
+ # resp.user.status #=> String, one of "ACTIVE", "INACTIVE", "PENDING"
1433
+ # resp.user.type #=> String, one of "USER", "ADMIN"
1434
+ # resp.user.created_timestamp #=> Time
1435
+ # resp.user.modified_timestamp #=> Time
1436
+ # resp.user.time_zone_id #=> String
1437
+ # resp.user.locale #=> String, one of "en", "fr", "ko", "de", "es", "ja", "ru", "zh_CN", "zh_TW", "pt_BR", "default"
1438
+ # resp.user.storage.storage_utilized_in_bytes #=> Integer
1439
+ # resp.user.storage.storage_rule.storage_allocated_in_bytes #=> Integer
1440
+ # resp.user.storage.storage_rule.storage_type #=> String, one of "UNLIMITED", "QUOTA"
1441
+ #
1442
+ # @see http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUser AWS API Documentation
1443
+ #
1444
+ # @overload update_user(params = {})
1445
+ # @param [Hash] params ({})
1446
+ def update_user(params = {}, options = {})
1447
+ req = build_request(:update_user, params)
1448
+ req.send_request(options)
1449
+ end
1450
+
1451
+ # @!endgroup
1452
+
1453
+ # @param params ({})
1454
+ # @api private
1455
+ def build_request(operation_name, params = {})
1456
+ handlers = @handlers.for(operation_name)
1457
+ context = Seahorse::Client::RequestContext.new(
1458
+ operation_name: operation_name,
1459
+ operation: config.api.operation(operation_name),
1460
+ client: self,
1461
+ params: params,
1462
+ config: config)
1463
+ context[:gem_name] = 'aws-sdk-workdocs'
1464
+ context[:gem_version] = '1.0.0.rc1'
1465
+ Seahorse::Client::Request.new(handlers, context)
1466
+ end
1467
+
1468
+ # @api private
1469
+ # @deprecated
1470
+ def waiter_names
1471
+ []
1472
+ end
1473
+
1474
+ class << self
1475
+
1476
+ # @api private
1477
+ attr_reader :identifier
1478
+
1479
+ # @api private
1480
+ def errors_module
1481
+ Errors
1482
+ end
1483
+
1484
+ end
1485
+ end
1486
+ end