capo-workdocs 0.1.0__py3-none-any.whl

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.
Files changed (315) hide show
  1. capo_workdocs/__init__.py +70 -0
  2. capo_workdocs/_async.py +25 -0
  3. capo_workdocs/_auth/_identity.py +16 -0
  4. capo_workdocs/_auth/_providers.py +886 -0
  5. capo_workdocs/_auth/_signers.py +88 -0
  6. capo_workdocs/_auth/_sigv4.py +434 -0
  7. capo_workdocs/_auth/_zapros_handler.py +80 -0
  8. capo_workdocs/_iter.py +113 -0
  9. capo_workdocs/_operations/aws_gorilla_boy_service/abort_document_version_upload.py +151 -0
  10. capo_workdocs/_operations/aws_gorilla_boy_service/activate_user.py +166 -0
  11. capo_workdocs/_operations/aws_gorilla_boy_service/add_resource_permissions.py +174 -0
  12. capo_workdocs/_operations/aws_gorilla_boy_service/create_comment.py +190 -0
  13. capo_workdocs/_operations/aws_gorilla_boy_service/create_custom_metadata.py +176 -0
  14. capo_workdocs/_operations/aws_gorilla_boy_service/create_folder.py +193 -0
  15. capo_workdocs/_operations/aws_gorilla_boy_service/create_labels.py +167 -0
  16. capo_workdocs/_operations/aws_gorilla_boy_service/create_notification_subscription.py +168 -0
  17. capo_workdocs/_operations/aws_gorilla_boy_service/create_user.py +168 -0
  18. capo_workdocs/_operations/aws_gorilla_boy_service/deactivate_user.py +138 -0
  19. capo_workdocs/_operations/aws_gorilla_boy_service/delete_comment.py +153 -0
  20. capo_workdocs/_operations/aws_gorilla_boy_service/delete_custom_metadata.py +171 -0
  21. capo_workdocs/_operations/aws_gorilla_boy_service/delete_document.py +158 -0
  22. capo_workdocs/_operations/aws_gorilla_boy_service/delete_document_version.py +163 -0
  23. capo_workdocs/_operations/aws_gorilla_boy_service/delete_folder.py +158 -0
  24. capo_workdocs/_operations/aws_gorilla_boy_service/delete_folder_contents.py +148 -0
  25. capo_workdocs/_operations/aws_gorilla_boy_service/delete_labels.py +167 -0
  26. capo_workdocs/_operations/aws_gorilla_boy_service/delete_notification_subscription.py +135 -0
  27. capo_workdocs/_operations/aws_gorilla_boy_service/delete_user.py +138 -0
  28. capo_workdocs/_operations/aws_gorilla_boy_service/describe_activities.py +201 -0
  29. capo_workdocs/_operations/aws_gorilla_boy_service/describe_comments.py +181 -0
  30. capo_workdocs/_operations/aws_gorilla_boy_service/describe_document_versions.py +187 -0
  31. capo_workdocs/_operations/aws_gorilla_boy_service/describe_folder_contents.py +205 -0
  32. capo_workdocs/_operations/aws_gorilla_boy_service/describe_groups.py +167 -0
  33. capo_workdocs/_operations/aws_gorilla_boy_service/describe_notification_subscriptions.py +159 -0
  34. capo_workdocs/_operations/aws_gorilla_boy_service/describe_resource_permissions.py +170 -0
  35. capo_workdocs/_operations/aws_gorilla_boy_service/describe_root_folders.py +166 -0
  36. capo_workdocs/_operations/aws_gorilla_boy_service/describe_users.py +208 -0
  37. capo_workdocs/_operations/aws_gorilla_boy_service/get_current_user.py +166 -0
  38. capo_workdocs/_operations/aws_gorilla_boy_service/get_document.py +183 -0
  39. capo_workdocs/_operations/aws_gorilla_boy_service/get_document_path.py +174 -0
  40. capo_workdocs/_operations/aws_gorilla_boy_service/get_document_version.py +186 -0
  41. capo_workdocs/_operations/aws_gorilla_boy_service/get_folder.py +179 -0
  42. capo_workdocs/_operations/aws_gorilla_boy_service/get_folder_path.py +172 -0
  43. capo_workdocs/_operations/aws_gorilla_boy_service/get_resources.py +183 -0
  44. capo_workdocs/_operations/aws_gorilla_boy_service/initiate_document_version_upload.py +215 -0
  45. capo_workdocs/_operations/aws_gorilla_boy_service/remove_all_resource_permissions.py +133 -0
  46. capo_workdocs/_operations/aws_gorilla_boy_service/remove_resource_permission.py +149 -0
  47. capo_workdocs/_operations/aws_gorilla_boy_service/restore_document_versions.py +153 -0
  48. capo_workdocs/_operations/aws_gorilla_boy_service/search_resources.py +169 -0
  49. capo_workdocs/_operations/aws_gorilla_boy_service/update_document.py +168 -0
  50. capo_workdocs/_operations/aws_gorilla_boy_service/update_document_version.py +161 -0
  51. capo_workdocs/_operations/aws_gorilla_boy_service/update_folder.py +168 -0
  52. capo_workdocs/_operations/aws_gorilla_boy_service/update_user.py +193 -0
  53. capo_workdocs/_pagination.py +21 -0
  54. capo_workdocs/_protocol/__init__.py +1 -0
  55. capo_workdocs/_protocol/errors.py +93 -0
  56. capo_workdocs/_protocol/eventstream.py +238 -0
  57. capo_workdocs/_protocol/serialize.py +47 -0
  58. capo_workdocs/_protocol/xml.py +33 -0
  59. capo_workdocs/_rule_engine/__init__.py +0 -0
  60. capo_workdocs/_rule_engine/_aws_partition.py +160 -0
  61. capo_workdocs/_rule_engine/_endpoint_rule_set.py +136 -0
  62. capo_workdocs/_rule_engine/_endpoint_runtime.py +389 -0
  63. capo_workdocs/_services/_aws_config.py +160 -0
  64. capo_workdocs/_services/_pipeline.py +198 -0
  65. capo_workdocs/_services/async_work_docs.py +3513 -0
  66. capo_workdocs/_services/work_docs.py +3469 -0
  67. capo_workdocs/errors/__init__.py +94 -0
  68. capo_workdocs/errors/_base.py +94 -0
  69. capo_workdocs/errors/concurrent_modification_exception.py +53 -0
  70. capo_workdocs/errors/conflicting_operation_exception.py +53 -0
  71. capo_workdocs/errors/custom_metadata_limit_exceeded_exception.py +53 -0
  72. capo_workdocs/errors/deactivating_last_system_user_exception.py +59 -0
  73. capo_workdocs/errors/document_locked_for_comments_exception.py +53 -0
  74. capo_workdocs/errors/draft_upload_out_of_sync_exception.py +53 -0
  75. capo_workdocs/errors/entity_already_exists_exception.py +51 -0
  76. capo_workdocs/errors/entity_not_exists_exception.py +66 -0
  77. capo_workdocs/errors/failed_dependency_exception.py +51 -0
  78. capo_workdocs/errors/illegal_user_state_exception.py +51 -0
  79. capo_workdocs/errors/invalid_argument_exception.py +51 -0
  80. capo_workdocs/errors/invalid_comment_operation_exception.py +53 -0
  81. capo_workdocs/errors/invalid_operation_exception.py +51 -0
  82. capo_workdocs/errors/invalid_password_exception.py +51 -0
  83. capo_workdocs/errors/limit_exceeded_exception.py +51 -0
  84. capo_workdocs/errors/prohibited_state_exception.py +51 -0
  85. capo_workdocs/errors/requested_entity_too_large_exception.py +53 -0
  86. capo_workdocs/errors/resource_already_checked_out_exception.py +53 -0
  87. capo_workdocs/errors/service_unavailable_exception.py +51 -0
  88. capo_workdocs/errors/storage_limit_exceeded_exception.py +53 -0
  89. capo_workdocs/errors/storage_limit_will_exceed_exception.py +53 -0
  90. capo_workdocs/errors/too_many_labels_exception.py +51 -0
  91. capo_workdocs/errors/too_many_subscriptions_exception.py +53 -0
  92. capo_workdocs/errors/unauthorized_operation_exception.py +59 -0
  93. capo_workdocs/errors/unauthorized_resource_access_exception.py +53 -0
  94. capo_workdocs/py.typed +0 -0
  95. capo_workdocs/types/_prelude/blob.py +12 -0
  96. capo_workdocs/types/_prelude/timestamp.py +17 -0
  97. capo_workdocs/types/abort_document_version_upload_request.py +32 -0
  98. capo_workdocs/types/activate_user_request.py +29 -0
  99. capo_workdocs/types/activate_user_response.py +32 -0
  100. capo_workdocs/types/activity.py +144 -0
  101. capo_workdocs/types/activity_names_filter_type.py +5 -0
  102. capo_workdocs/types/activity_type.py +48 -0
  103. capo_workdocs/types/add_resource_permissions_request.py +68 -0
  104. capo_workdocs/types/add_resource_permissions_response.py +38 -0
  105. capo_workdocs/types/additional_response_field_type.py +14 -0
  106. capo_workdocs/types/additional_response_fields_list.py +35 -0
  107. capo_workdocs/types/authentication_header_type.py +5 -0
  108. capo_workdocs/types/boolean_enum_type.py +17 -0
  109. capo_workdocs/types/boolean_type.py +5 -0
  110. capo_workdocs/types/comment.py +121 -0
  111. capo_workdocs/types/comment_id_type.py +5 -0
  112. capo_workdocs/types/comment_list.py +29 -0
  113. capo_workdocs/types/comment_metadata.py +90 -0
  114. capo_workdocs/types/comment_status_type.py +18 -0
  115. capo_workdocs/types/comment_text_type.py +5 -0
  116. capo_workdocs/types/comment_visibility_type.py +17 -0
  117. capo_workdocs/types/content_category_type.py +24 -0
  118. capo_workdocs/types/create_comment_request.py +82 -0
  119. capo_workdocs/types/create_comment_response.py +32 -0
  120. capo_workdocs/types/create_custom_metadata_request.py +56 -0
  121. capo_workdocs/types/create_custom_metadata_response.py +18 -0
  122. capo_workdocs/types/create_folder_request.py +43 -0
  123. capo_workdocs/types/create_folder_response.py +36 -0
  124. capo_workdocs/types/create_labels_request.py +45 -0
  125. capo_workdocs/types/create_labels_response.py +18 -0
  126. capo_workdocs/types/create_notification_subscription_request.py +76 -0
  127. capo_workdocs/types/create_notification_subscription_response.py +36 -0
  128. capo_workdocs/types/create_user_request.py +97 -0
  129. capo_workdocs/types/create_user_response.py +32 -0
  130. capo_workdocs/types/custom_metadata_key_list.py +19 -0
  131. capo_workdocs/types/custom_metadata_key_type.py +5 -0
  132. capo_workdocs/types/custom_metadata_map.py +29 -0
  133. capo_workdocs/types/custom_metadata_value_type.py +5 -0
  134. capo_workdocs/types/date_range_type.py +50 -0
  135. capo_workdocs/types/deactivate_user_request.py +29 -0
  136. capo_workdocs/types/delete_comment_request.py +35 -0
  137. capo_workdocs/types/delete_custom_metadata_request.py +42 -0
  138. capo_workdocs/types/delete_custom_metadata_response.py +18 -0
  139. capo_workdocs/types/delete_document_request.py +29 -0
  140. capo_workdocs/types/delete_document_version_request.py +35 -0
  141. capo_workdocs/types/delete_folder_contents_request.py +29 -0
  142. capo_workdocs/types/delete_folder_request.py +29 -0
  143. capo_workdocs/types/delete_labels_request.py +35 -0
  144. capo_workdocs/types/delete_labels_response.py +18 -0
  145. capo_workdocs/types/delete_notification_subscription_request.py +26 -0
  146. capo_workdocs/types/delete_user_request.py +29 -0
  147. capo_workdocs/types/describe_activities_request.py +52 -0
  148. capo_workdocs/types/describe_activities_response.py +43 -0
  149. capo_workdocs/types/describe_comments_request.py +38 -0
  150. capo_workdocs/types/describe_comments_response.py +43 -0
  151. capo_workdocs/types/describe_document_versions_request.py +40 -0
  152. capo_workdocs/types/describe_document_versions_response.py +49 -0
  153. capo_workdocs/types/describe_folder_contents_request.py +47 -0
  154. capo_workdocs/types/describe_folder_contents_response.py +60 -0
  155. capo_workdocs/types/describe_groups_request.py +38 -0
  156. capo_workdocs/types/describe_groups_response.py +43 -0
  157. capo_workdocs/types/describe_notification_subscriptions_request.py +30 -0
  158. capo_workdocs/types/describe_notification_subscriptions_response.py +43 -0
  159. capo_workdocs/types/describe_resource_permissions_request.py +38 -0
  160. capo_workdocs/types/describe_resource_permissions_response.py +43 -0
  161. capo_workdocs/types/describe_root_folders_request.py +32 -0
  162. capo_workdocs/types/describe_root_folders_response.py +43 -0
  163. capo_workdocs/types/describe_users_request.py +53 -0
  164. capo_workdocs/types/describe_users_response.py +52 -0
  165. capo_workdocs/types/document_content_type.py +5 -0
  166. capo_workdocs/types/document_metadata.py +125 -0
  167. capo_workdocs/types/document_metadata_list.py +31 -0
  168. capo_workdocs/types/document_source_type.py +17 -0
  169. capo_workdocs/types/document_source_url_map.py +33 -0
  170. capo_workdocs/types/document_status_type.py +17 -0
  171. capo_workdocs/types/document_thumbnail_type.py +18 -0
  172. capo_workdocs/types/document_thumbnail_url_map.py +33 -0
  173. capo_workdocs/types/document_version_id_type.py +5 -0
  174. capo_workdocs/types/document_version_metadata.py +189 -0
  175. capo_workdocs/types/document_version_metadata_list.py +31 -0
  176. capo_workdocs/types/document_version_status.py +14 -0
  177. capo_workdocs/types/email_address_type.py +5 -0
  178. capo_workdocs/types/entity_id_list.py +17 -0
  179. capo_workdocs/types/error_message_type.py +5 -0
  180. capo_workdocs/types/exception_code_type.py +5 -0
  181. capo_workdocs/types/field_names_type.py +5 -0
  182. capo_workdocs/types/filters.py +202 -0
  183. capo_workdocs/types/folder_content_type.py +18 -0
  184. capo_workdocs/types/folder_metadata.py +131 -0
  185. capo_workdocs/types/folder_metadata_list.py +31 -0
  186. capo_workdocs/types/get_current_user_request.py +26 -0
  187. capo_workdocs/types/get_current_user_response.py +32 -0
  188. capo_workdocs/types/get_document_path_request.py +38 -0
  189. capo_workdocs/types/get_document_path_response.py +32 -0
  190. capo_workdocs/types/get_document_request.py +32 -0
  191. capo_workdocs/types/get_document_response.py +55 -0
  192. capo_workdocs/types/get_document_version_request.py +38 -0
  193. capo_workdocs/types/get_document_version_response.py +59 -0
  194. capo_workdocs/types/get_folder_path_request.py +38 -0
  195. capo_workdocs/types/get_folder_path_response.py +32 -0
  196. capo_workdocs/types/get_folder_request.py +32 -0
  197. capo_workdocs/types/get_folder_response.py +55 -0
  198. capo_workdocs/types/get_resources_request.py +40 -0
  199. capo_workdocs/types/get_resources_response.py +60 -0
  200. capo_workdocs/types/group_metadata.py +35 -0
  201. capo_workdocs/types/group_metadata_list.py +29 -0
  202. capo_workdocs/types/group_name_type.py +5 -0
  203. capo_workdocs/types/hash_type.py +5 -0
  204. capo_workdocs/types/header_name_type.py +5 -0
  205. capo_workdocs/types/header_value_type.py +5 -0
  206. capo_workdocs/types/id_type.py +5 -0
  207. capo_workdocs/types/initiate_document_version_upload_request.py +103 -0
  208. capo_workdocs/types/initiate_document_version_upload_response.py +51 -0
  209. capo_workdocs/types/language_code_type.py +46 -0
  210. capo_workdocs/types/limit_type.py +5 -0
  211. capo_workdocs/types/locale_type.py +26 -0
  212. capo_workdocs/types/long_range_type.py +34 -0
  213. capo_workdocs/types/long_type.py +5 -0
  214. capo_workdocs/types/marker_type.py +5 -0
  215. capo_workdocs/types/message_type.py +5 -0
  216. capo_workdocs/types/next_marker_type.py +5 -0
  217. capo_workdocs/types/notification_options.py +36 -0
  218. capo_workdocs/types/order_by_field_type.py +20 -0
  219. capo_workdocs/types/order_type.py +17 -0
  220. capo_workdocs/types/organization_user_list.py +29 -0
  221. capo_workdocs/types/page_marker_type.py +5 -0
  222. capo_workdocs/types/participants.py +51 -0
  223. capo_workdocs/types/password_type.py +5 -0
  224. capo_workdocs/types/permission_info.py +47 -0
  225. capo_workdocs/types/permission_info_list.py +31 -0
  226. capo_workdocs/types/positive_integer_type.py +5 -0
  227. capo_workdocs/types/positive_size_type.py +5 -0
  228. capo_workdocs/types/principal.py +54 -0
  229. capo_workdocs/types/principal_list.py +29 -0
  230. capo_workdocs/types/principal_role_type.py +19 -0
  231. capo_workdocs/types/principal_type.py +20 -0
  232. capo_workdocs/types/remove_all_resource_permissions_request.py +29 -0
  233. capo_workdocs/types/remove_resource_permission_request.py +35 -0
  234. capo_workdocs/types/resource_collection_type.py +14 -0
  235. capo_workdocs/types/resource_id_type.py +5 -0
  236. capo_workdocs/types/resource_metadata.py +80 -0
  237. capo_workdocs/types/resource_name_type.py +5 -0
  238. capo_workdocs/types/resource_path.py +42 -0
  239. capo_workdocs/types/resource_path_component.py +35 -0
  240. capo_workdocs/types/resource_path_component_list.py +31 -0
  241. capo_workdocs/types/resource_sort_type.py +17 -0
  242. capo_workdocs/types/resource_state_type.py +19 -0
  243. capo_workdocs/types/resource_type.py +17 -0
  244. capo_workdocs/types/response_item.py +117 -0
  245. capo_workdocs/types/response_item_type.py +19 -0
  246. capo_workdocs/types/response_item_web_url.py +5 -0
  247. capo_workdocs/types/response_items_list.py +29 -0
  248. capo_workdocs/types/restore_document_versions_request.py +29 -0
  249. capo_workdocs/types/role_permission_type.py +17 -0
  250. capo_workdocs/types/role_type.py +19 -0
  251. capo_workdocs/types/search_ancestor_id.py +5 -0
  252. capo_workdocs/types/search_ancestor_id_list.py +19 -0
  253. capo_workdocs/types/search_collection_type.py +17 -0
  254. capo_workdocs/types/search_collection_type_list.py +31 -0
  255. capo_workdocs/types/search_content_category_type_list.py +31 -0
  256. capo_workdocs/types/search_label.py +5 -0
  257. capo_workdocs/types/search_label_list.py +17 -0
  258. capo_workdocs/types/search_marker_type.py +5 -0
  259. capo_workdocs/types/search_principal_role_list.py +31 -0
  260. capo_workdocs/types/search_principal_type.py +48 -0
  261. capo_workdocs/types/search_principal_type_list.py +31 -0
  262. capo_workdocs/types/search_query_scope_type.py +17 -0
  263. capo_workdocs/types/search_query_scope_type_list.py +31 -0
  264. capo_workdocs/types/search_query_type.py +5 -0
  265. capo_workdocs/types/search_resource_type.py +19 -0
  266. capo_workdocs/types/search_resource_type_list.py +31 -0
  267. capo_workdocs/types/search_resources_request.py +126 -0
  268. capo_workdocs/types/search_resources_response.py +43 -0
  269. capo_workdocs/types/search_result_sort_list.py +31 -0
  270. capo_workdocs/types/search_results_limit_type.py +5 -0
  271. capo_workdocs/types/search_sort_result.py +47 -0
  272. capo_workdocs/types/share_principal.py +55 -0
  273. capo_workdocs/types/share_principal_list.py +31 -0
  274. capo_workdocs/types/share_result.py +74 -0
  275. capo_workdocs/types/share_results_list.py +29 -0
  276. capo_workdocs/types/share_status_type.py +17 -0
  277. capo_workdocs/types/shared_label.py +5 -0
  278. capo_workdocs/types/shared_labels.py +17 -0
  279. capo_workdocs/types/signed_header_map.py +29 -0
  280. capo_workdocs/types/size_type.py +5 -0
  281. capo_workdocs/types/sort_order.py +17 -0
  282. capo_workdocs/types/storage_rule_type.py +45 -0
  283. capo_workdocs/types/storage_type.py +17 -0
  284. capo_workdocs/types/subscription.py +56 -0
  285. capo_workdocs/types/subscription_end_point_type.py +5 -0
  286. capo_workdocs/types/subscription_list.py +29 -0
  287. capo_workdocs/types/subscription_protocol_type.py +17 -0
  288. capo_workdocs/types/subscription_type.py +14 -0
  289. capo_workdocs/types/text_locale_type_list.py +31 -0
  290. capo_workdocs/types/time_zone_id_type.py +5 -0
  291. capo_workdocs/types/timestamp_type.py +20 -0
  292. capo_workdocs/types/update_document_request.py +61 -0
  293. capo_workdocs/types/update_document_version_request.py +53 -0
  294. capo_workdocs/types/update_folder_request.py +61 -0
  295. capo_workdocs/types/update_user_request.py +111 -0
  296. capo_workdocs/types/update_user_response.py +32 -0
  297. capo_workdocs/types/upload_metadata.py +43 -0
  298. capo_workdocs/types/url_type.py +5 -0
  299. capo_workdocs/types/user.py +172 -0
  300. capo_workdocs/types/user_activities.py +29 -0
  301. capo_workdocs/types/user_attribute_value_type.py +5 -0
  302. capo_workdocs/types/user_filter_type.py +17 -0
  303. capo_workdocs/types/user_ids_type.py +5 -0
  304. capo_workdocs/types/user_metadata.py +61 -0
  305. capo_workdocs/types/user_metadata_list.py +29 -0
  306. capo_workdocs/types/user_sort_type.py +20 -0
  307. capo_workdocs/types/user_status_type.py +18 -0
  308. capo_workdocs/types/user_storage_metadata.py +43 -0
  309. capo_workdocs/types/user_type.py +20 -0
  310. capo_workdocs/types/username_type.py +5 -0
  311. capo_workdocs-0.1.0.dist-info/METADATA +101 -0
  312. capo_workdocs-0.1.0.dist-info/RECORD +315 -0
  313. capo_workdocs-0.1.0.dist-info/WHEEL +5 -0
  314. capo_workdocs-0.1.0.dist-info/licenses/LICENSE +21 -0
  315. capo_workdocs-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3469 @@
1
+ """Generated from Smithy shape ``com.amazonaws.workdocs#AWSGorillaBoyService``."""
2
+
3
+ import warnings
4
+ from collections.abc import Iterator
5
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
6
+
7
+ from typing_extensions import Self, TypedDict
8
+ from zapros import BaseHandler, Client
9
+
10
+ import capo_workdocs._auth._signers
11
+ import capo_workdocs._auth._sigv4
12
+ from capo_workdocs._auth._identity import Credentials
13
+ from capo_workdocs._auth._providers import (
14
+ CredentialsProvider,
15
+ IdentityProvider,
16
+ StaticAwsCredentialsProvider,
17
+ default_aws_credentials_chain,
18
+ )
19
+ from capo_workdocs._auth._zapros_handler import AuthMiddleware
20
+ from capo_workdocs._pagination import resolve_path as _resolve_path
21
+ from capo_workdocs._services._aws_config import aws_config
22
+ from capo_workdocs._services._pipeline import (
23
+ Interceptor,
24
+ OperationOptions,
25
+ OperationRequest,
26
+ OperationResponse,
27
+ execute_pipeline,
28
+ retry,
29
+ )
30
+
31
+ if TYPE_CHECKING:
32
+ import capo_workdocs.types.abort_document_version_upload_request
33
+ import capo_workdocs.types.activate_user_request
34
+ import capo_workdocs.types.activate_user_response
35
+ import capo_workdocs.types.activity
36
+ import capo_workdocs.types.activity_names_filter_type
37
+ import capo_workdocs.types.add_resource_permissions_request
38
+ import capo_workdocs.types.add_resource_permissions_response
39
+ import capo_workdocs.types.additional_response_fields_list
40
+ import capo_workdocs.types.authentication_header_type
41
+ import capo_workdocs.types.boolean_enum_type
42
+ import capo_workdocs.types.boolean_type
43
+ import capo_workdocs.types.comment
44
+ import capo_workdocs.types.comment_id_type
45
+ import capo_workdocs.types.comment_text_type
46
+ import capo_workdocs.types.comment_visibility_type
47
+ import capo_workdocs.types.create_comment_request
48
+ import capo_workdocs.types.create_comment_response
49
+ import capo_workdocs.types.create_custom_metadata_request
50
+ import capo_workdocs.types.create_custom_metadata_response
51
+ import capo_workdocs.types.create_folder_request
52
+ import capo_workdocs.types.create_folder_response
53
+ import capo_workdocs.types.create_labels_request
54
+ import capo_workdocs.types.create_labels_response
55
+ import capo_workdocs.types.create_notification_subscription_request
56
+ import capo_workdocs.types.create_notification_subscription_response
57
+ import capo_workdocs.types.create_user_request
58
+ import capo_workdocs.types.create_user_response
59
+ import capo_workdocs.types.custom_metadata_key_list
60
+ import capo_workdocs.types.custom_metadata_map
61
+ import capo_workdocs.types.deactivate_user_request
62
+ import capo_workdocs.types.delete_comment_request
63
+ import capo_workdocs.types.delete_custom_metadata_request
64
+ import capo_workdocs.types.delete_custom_metadata_response
65
+ import capo_workdocs.types.delete_document_request
66
+ import capo_workdocs.types.delete_document_version_request
67
+ import capo_workdocs.types.delete_folder_contents_request
68
+ import capo_workdocs.types.delete_folder_request
69
+ import capo_workdocs.types.delete_labels_request
70
+ import capo_workdocs.types.delete_labels_response
71
+ import capo_workdocs.types.delete_notification_subscription_request
72
+ import capo_workdocs.types.delete_user_request
73
+ import capo_workdocs.types.describe_activities_request
74
+ import capo_workdocs.types.describe_activities_response
75
+ import capo_workdocs.types.describe_comments_request
76
+ import capo_workdocs.types.describe_comments_response
77
+ import capo_workdocs.types.describe_document_versions_request
78
+ import capo_workdocs.types.describe_document_versions_response
79
+ import capo_workdocs.types.describe_folder_contents_request
80
+ import capo_workdocs.types.describe_folder_contents_response
81
+ import capo_workdocs.types.describe_groups_request
82
+ import capo_workdocs.types.describe_groups_response
83
+ import capo_workdocs.types.describe_notification_subscriptions_request
84
+ import capo_workdocs.types.describe_notification_subscriptions_response
85
+ import capo_workdocs.types.describe_resource_permissions_request
86
+ import capo_workdocs.types.describe_resource_permissions_response
87
+ import capo_workdocs.types.describe_root_folders_request
88
+ import capo_workdocs.types.describe_root_folders_response
89
+ import capo_workdocs.types.describe_users_request
90
+ import capo_workdocs.types.describe_users_response
91
+ import capo_workdocs.types.document_content_type
92
+ import capo_workdocs.types.document_version_id_type
93
+ import capo_workdocs.types.document_version_metadata
94
+ import capo_workdocs.types.document_version_status
95
+ import capo_workdocs.types.email_address_type
96
+ import capo_workdocs.types.field_names_type
97
+ import capo_workdocs.types.filters
98
+ import capo_workdocs.types.folder_content_type
99
+ import capo_workdocs.types.folder_metadata
100
+ import capo_workdocs.types.get_current_user_request
101
+ import capo_workdocs.types.get_current_user_response
102
+ import capo_workdocs.types.get_document_path_request
103
+ import capo_workdocs.types.get_document_path_response
104
+ import capo_workdocs.types.get_document_request
105
+ import capo_workdocs.types.get_document_response
106
+ import capo_workdocs.types.get_document_version_request
107
+ import capo_workdocs.types.get_document_version_response
108
+ import capo_workdocs.types.get_folder_path_request
109
+ import capo_workdocs.types.get_folder_path_response
110
+ import capo_workdocs.types.get_folder_request
111
+ import capo_workdocs.types.get_folder_response
112
+ import capo_workdocs.types.get_resources_request
113
+ import capo_workdocs.types.get_resources_response
114
+ import capo_workdocs.types.group_metadata
115
+ import capo_workdocs.types.id_type
116
+ import capo_workdocs.types.initiate_document_version_upload_request
117
+ import capo_workdocs.types.initiate_document_version_upload_response
118
+ import capo_workdocs.types.limit_type
119
+ import capo_workdocs.types.locale_type
120
+ import capo_workdocs.types.marker_type
121
+ import capo_workdocs.types.next_marker_type
122
+ import capo_workdocs.types.notification_options
123
+ import capo_workdocs.types.order_type
124
+ import capo_workdocs.types.page_marker_type
125
+ import capo_workdocs.types.password_type
126
+ import capo_workdocs.types.positive_integer_type
127
+ import capo_workdocs.types.principal
128
+ import capo_workdocs.types.principal_type
129
+ import capo_workdocs.types.remove_all_resource_permissions_request
130
+ import capo_workdocs.types.remove_resource_permission_request
131
+ import capo_workdocs.types.resource_collection_type
132
+ import capo_workdocs.types.resource_id_type
133
+ import capo_workdocs.types.resource_name_type
134
+ import capo_workdocs.types.resource_sort_type
135
+ import capo_workdocs.types.resource_state_type
136
+ import capo_workdocs.types.response_item
137
+ import capo_workdocs.types.restore_document_versions_request
138
+ import capo_workdocs.types.search_marker_type
139
+ import capo_workdocs.types.search_query_scope_type_list
140
+ import capo_workdocs.types.search_query_type
141
+ import capo_workdocs.types.search_resources_request
142
+ import capo_workdocs.types.search_resources_response
143
+ import capo_workdocs.types.search_result_sort_list
144
+ import capo_workdocs.types.search_results_limit_type
145
+ import capo_workdocs.types.share_principal_list
146
+ import capo_workdocs.types.shared_labels
147
+ import capo_workdocs.types.size_type
148
+ import capo_workdocs.types.storage_rule_type
149
+ import capo_workdocs.types.subscription
150
+ import capo_workdocs.types.subscription_end_point_type
151
+ import capo_workdocs.types.subscription_protocol_type
152
+ import capo_workdocs.types.subscription_type
153
+ import capo_workdocs.types.time_zone_id_type
154
+ import capo_workdocs.types.timestamp_type
155
+ import capo_workdocs.types.update_document_request
156
+ import capo_workdocs.types.update_document_version_request
157
+ import capo_workdocs.types.update_folder_request
158
+ import capo_workdocs.types.update_user_request
159
+ import capo_workdocs.types.update_user_response
160
+ import capo_workdocs.types.user
161
+ import capo_workdocs.types.user_attribute_value_type
162
+ import capo_workdocs.types.user_filter_type
163
+ import capo_workdocs.types.user_ids_type
164
+ import capo_workdocs.types.user_sort_type
165
+ import capo_workdocs.types.user_type
166
+ import capo_workdocs.types.username_type
167
+
168
+
169
+ class WorkDocsClientConfig(TypedDict, total=False, closed=True):
170
+ operation_interceptors: Iterable[Interceptor[Any, Any]]
171
+ retry_max_attempts: int | None
172
+ region: str | None
173
+ use_dual_stack: bool | None
174
+ use_fips: bool | None
175
+ endpoint: str | None
176
+ credentials_provider: IdentityProvider[Credentials] | None
177
+
178
+
179
+ class WorkDocsClient:
180
+ """A client for the ``WorkDocs`` service.
181
+
182
+ Args:
183
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
184
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
185
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
186
+ region: The value of the ``AWS::Region`` endpoint parameter.
187
+ use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
188
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
189
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
190
+ credentials: AWS credentials for request signing.
191
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
192
+ """
193
+
194
+ def __init__(
195
+ self,
196
+ http_handler: BaseHandler | None = None,
197
+ operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
198
+ retry_max_attempts: int | None = None,
199
+ region: str | None = None,
200
+ use_dual_stack: bool | None = None,
201
+ use_fips: bool | None = None,
202
+ endpoint: str | None = None,
203
+ credentials: Credentials | None = None,
204
+ credentials_provider: CredentialsProvider | None = None,
205
+ ):
206
+ self._client = Client(http_handler).wrap_with_middleware(
207
+ lambda next: AuthMiddleware(next)
208
+ )
209
+ if credentials is not None and credentials_provider is not None:
210
+ warnings.warn(
211
+ "Both credentials and credentials_provider given; provider takes precedence"
212
+ )
213
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
214
+ credentials_provider
215
+ )
216
+ if resolved_credentials_provider is None and credentials is not None:
217
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
218
+ if resolved_credentials_provider is None and credentials is None:
219
+ resolved_credentials_provider = default_aws_credentials_chain(
220
+ Client(http_handler)
221
+ )
222
+ self._config = WorkDocsClientConfig(
223
+ {
224
+ "operation_interceptors": operation_interceptors or [],
225
+ "retry_max_attempts": retry_max_attempts,
226
+ "region": region,
227
+ "use_dual_stack": use_dual_stack,
228
+ "use_fips": use_fips,
229
+ "endpoint": endpoint,
230
+ "credentials_provider": resolved_credentials_provider,
231
+ }
232
+ )
233
+
234
+ def operation_options(
235
+ self, config_overrides: Optional[WorkDocsClientConfig] = None
236
+ ) -> tuple[Iterable[Interceptor[Any, Any]], OperationOptions]:
237
+ overrides: WorkDocsClientConfig = config_overrides or {}
238
+ interceptors_: list[Interceptor[Any, Any]] = [
239
+ *overrides.get(
240
+ "operation_interceptors", self._config.get("operation_interceptors", [])
241
+ ),
242
+ aws_config(),
243
+ retry(),
244
+ ]
245
+ options_: OperationOptions = OperationOptions(
246
+ client=self._client,
247
+ retry_max_attempts=overrides.get(
248
+ "retry_max_attempts", self._config.get("retry_max_attempts")
249
+ ),
250
+ region=overrides.get("region", self._config.get("region")),
251
+ use_dual_stack=overrides.get(
252
+ "use_dual_stack", self._config.get("use_dual_stack")
253
+ ),
254
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
255
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
256
+ credentials_provider=overrides.get(
257
+ "credentials_provider", self._config.get("credentials_provider")
258
+ ),
259
+ )
260
+ return interceptors_, options_
261
+
262
+ def abort_document_version_upload(
263
+ self,
264
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
265
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
266
+ *,
267
+ config_overrides: Optional[WorkDocsClientConfig] = None,
268
+ authentication_token: Optional[
269
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
270
+ ] = None,
271
+ ) -> None:
272
+ """<p>Aborts the upload of the specified document version that was previously initiated by <a>InitiateDocumentVersionUpload</a>. The client should make this call only when it no longer intends to upload the document version, or fails to do so.</p>
273
+
274
+ Args:
275
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
276
+ document_id: <p>The ID of the document.</p>
277
+ version_id: <p>The ID of the version.</p>
278
+
279
+ Raises:
280
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
281
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
282
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
283
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
284
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
285
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
286
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
287
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
288
+ """
289
+
290
+ def _handler(
291
+ req: "OperationRequest[capo_workdocs.types.abort_document_version_upload_request.AbortDocumentVersionUploadRequest]",
292
+ ) -> OperationResponse[None]:
293
+ import capo_workdocs._operations.aws_gorilla_boy_service.abort_document_version_upload
294
+
295
+ output, http_response = (
296
+ capo_workdocs._operations.aws_gorilla_boy_service.abort_document_version_upload.abort_document_version_upload(
297
+ req.options, req.input
298
+ )
299
+ )
300
+ return OperationResponse(output=output, response=http_response)
301
+
302
+ interceptors_, options_ = self.operation_options(config_overrides)
303
+ input_: capo_workdocs.types.abort_document_version_upload_request.AbortDocumentVersionUploadRequest = {
304
+ "document_id": document_id,
305
+ "version_id": version_id,
306
+ }
307
+ if authentication_token is not None:
308
+ input_["authentication_token"] = authentication_token
309
+
310
+ response = execute_pipeline(
311
+ OperationRequest(input=input_, options=options_),
312
+ handler=_handler,
313
+ interceptors=list(interceptors_),
314
+ )
315
+ response.response.close()
316
+ return response.output
317
+
318
+ def activate_user(
319
+ self,
320
+ user_id: "capo_workdocs.types.id_type.IdType",
321
+ *,
322
+ config_overrides: Optional[WorkDocsClientConfig] = None,
323
+ authentication_token: Optional[
324
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
325
+ ] = None,
326
+ ) -> "capo_workdocs.types.activate_user_response.ActivateUserResponse":
327
+ """<p>Activates the specified user. Only active users can access Amazon WorkDocs.</p>
328
+
329
+ Args:
330
+ user_id: <p>The ID of the user.</p>
331
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
332
+
333
+ Raises:
334
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
335
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
336
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
337
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
338
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
339
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
340
+ """
341
+
342
+ def _handler(
343
+ req: "OperationRequest[capo_workdocs.types.activate_user_request.ActivateUserRequest]",
344
+ ) -> OperationResponse[
345
+ "capo_workdocs.types.activate_user_response.ActivateUserResponse"
346
+ ]:
347
+ import capo_workdocs._operations.aws_gorilla_boy_service.activate_user
348
+
349
+ output, http_response = (
350
+ capo_workdocs._operations.aws_gorilla_boy_service.activate_user.activate_user(
351
+ req.options, req.input
352
+ )
353
+ )
354
+ return OperationResponse(output=output, response=http_response)
355
+
356
+ interceptors_, options_ = self.operation_options(config_overrides)
357
+ input_: capo_workdocs.types.activate_user_request.ActivateUserRequest = {
358
+ "user_id": user_id
359
+ }
360
+ if authentication_token is not None:
361
+ input_["authentication_token"] = authentication_token
362
+
363
+ response = execute_pipeline(
364
+ OperationRequest(input=input_, options=options_),
365
+ handler=_handler,
366
+ interceptors=list(interceptors_),
367
+ )
368
+ response.response.close()
369
+ return response.output
370
+
371
+ def add_resource_permissions(
372
+ self,
373
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
374
+ principals: "capo_workdocs.types.share_principal_list.SharePrincipalList",
375
+ *,
376
+ config_overrides: Optional[WorkDocsClientConfig] = None,
377
+ authentication_token: Optional[
378
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
379
+ ] = None,
380
+ notification_options: Optional[
381
+ "capo_workdocs.types.notification_options.NotificationOptions"
382
+ ] = None,
383
+ ) -> "capo_workdocs.types.add_resource_permissions_response.AddResourcePermissionsResponse":
384
+ """<p>Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.</p>
385
+
386
+ Args:
387
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
388
+ resource_id: <p>The ID of the resource.</p>
389
+ principals: <p>The users, groups, or organization being granted permission.</p>
390
+ notification_options: <p>The notification options.</p>
391
+
392
+ Raises:
393
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
394
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
395
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
396
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
397
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
398
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
399
+ """
400
+
401
+ def _handler(
402
+ req: "OperationRequest[capo_workdocs.types.add_resource_permissions_request.AddResourcePermissionsRequest]",
403
+ ) -> OperationResponse[
404
+ "capo_workdocs.types.add_resource_permissions_response.AddResourcePermissionsResponse"
405
+ ]:
406
+ import capo_workdocs._operations.aws_gorilla_boy_service.add_resource_permissions
407
+
408
+ output, http_response = (
409
+ capo_workdocs._operations.aws_gorilla_boy_service.add_resource_permissions.add_resource_permissions(
410
+ req.options, req.input
411
+ )
412
+ )
413
+ return OperationResponse(output=output, response=http_response)
414
+
415
+ interceptors_, options_ = self.operation_options(config_overrides)
416
+ input_: capo_workdocs.types.add_resource_permissions_request.AddResourcePermissionsRequest = {
417
+ "resource_id": resource_id,
418
+ "principals": principals,
419
+ }
420
+ if authentication_token is not None:
421
+ input_["authentication_token"] = authentication_token
422
+ if notification_options is not None:
423
+ input_["notification_options"] = notification_options
424
+
425
+ response = execute_pipeline(
426
+ OperationRequest(input=input_, options=options_),
427
+ handler=_handler,
428
+ interceptors=list(interceptors_),
429
+ )
430
+ response.response.close()
431
+ return response.output
432
+
433
+ def create_comment(
434
+ self,
435
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
436
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
437
+ text: "capo_workdocs.types.comment_text_type.CommentTextType",
438
+ *,
439
+ config_overrides: Optional[WorkDocsClientConfig] = None,
440
+ authentication_token: Optional[
441
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
442
+ ] = None,
443
+ parent_id: Optional["capo_workdocs.types.comment_id_type.CommentIdType"] = None,
444
+ thread_id: Optional["capo_workdocs.types.comment_id_type.CommentIdType"] = None,
445
+ visibility: Optional[
446
+ "capo_workdocs.types.comment_visibility_type.CommentVisibilityType"
447
+ ] = None,
448
+ notify_collaborators: Optional[
449
+ "capo_workdocs.types.boolean_type.BooleanType"
450
+ ] = None,
451
+ ) -> "capo_workdocs.types.create_comment_response.CreateCommentResponse":
452
+ """<p>Adds a new comment to the specified document version.</p>
453
+
454
+ Args:
455
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
456
+ document_id: <p>The ID of the document.</p>
457
+ version_id: <p>The ID of the document version.</p>
458
+ parent_id: <p>The ID of the parent comment.</p>
459
+ thread_id: <p>The ID of the root comment in the thread.</p>
460
+ text: <p>The text of the comment.</p>
461
+ visibility: <p>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.</p>
462
+ notify_collaborators: <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
463
+
464
+ Raises:
465
+ capo_workdocs.errors.document_locked_for_comments_exception.DocumentLockedForCommentsException: <p>This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.</p>
466
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
467
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
468
+ capo_workdocs.errors.invalid_comment_operation_exception.InvalidCommentOperationException: <p>The requested operation is not allowed on the specified comment object.</p>
469
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
470
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
471
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
472
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
473
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
474
+ """
475
+
476
+ def _handler(
477
+ req: "OperationRequest[capo_workdocs.types.create_comment_request.CreateCommentRequest]",
478
+ ) -> OperationResponse[
479
+ "capo_workdocs.types.create_comment_response.CreateCommentResponse"
480
+ ]:
481
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_comment
482
+
483
+ output, http_response = (
484
+ capo_workdocs._operations.aws_gorilla_boy_service.create_comment.create_comment(
485
+ req.options, req.input
486
+ )
487
+ )
488
+ return OperationResponse(output=output, response=http_response)
489
+
490
+ interceptors_, options_ = self.operation_options(config_overrides)
491
+ input_: capo_workdocs.types.create_comment_request.CreateCommentRequest = {
492
+ "document_id": document_id,
493
+ "version_id": version_id,
494
+ "text": text,
495
+ }
496
+ if authentication_token is not None:
497
+ input_["authentication_token"] = authentication_token
498
+ if parent_id is not None:
499
+ input_["parent_id"] = parent_id
500
+ if thread_id is not None:
501
+ input_["thread_id"] = thread_id
502
+ if visibility is not None:
503
+ input_["visibility"] = visibility
504
+ if notify_collaborators is not None:
505
+ input_["notify_collaborators"] = notify_collaborators
506
+
507
+ response = execute_pipeline(
508
+ OperationRequest(input=input_, options=options_),
509
+ handler=_handler,
510
+ interceptors=list(interceptors_),
511
+ )
512
+ response.response.close()
513
+ return response.output
514
+
515
+ def create_custom_metadata(
516
+ self,
517
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
518
+ custom_metadata: "capo_workdocs.types.custom_metadata_map.CustomMetadataMap",
519
+ *,
520
+ config_overrides: Optional[WorkDocsClientConfig] = None,
521
+ authentication_token: Optional[
522
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
523
+ ] = None,
524
+ version_id: Optional[
525
+ "capo_workdocs.types.document_version_id_type.DocumentVersionIdType"
526
+ ] = None,
527
+ ) -> "capo_workdocs.types.create_custom_metadata_response.CreateCustomMetadataResponse":
528
+ """<p>Adds one or more custom properties to the specified resource (a folder, document, or version).</p>
529
+
530
+ Args:
531
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
532
+ resource_id: <p>The ID of the resource.</p>
533
+ version_id: <p>The ID of the version, if the custom metadata is being added to a document version.</p>
534
+ custom_metadata: <p>Custom metadata in the form of name-value pairs.</p>
535
+
536
+ Raises:
537
+ capo_workdocs.errors.custom_metadata_limit_exceeded_exception.CustomMetadataLimitExceededException: <p>The limit has been reached on the number of custom properties for the specified resource.</p>
538
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
539
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
540
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
541
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
542
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
543
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
544
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
545
+ """
546
+
547
+ def _handler(
548
+ req: "OperationRequest[capo_workdocs.types.create_custom_metadata_request.CreateCustomMetadataRequest]",
549
+ ) -> OperationResponse[
550
+ "capo_workdocs.types.create_custom_metadata_response.CreateCustomMetadataResponse"
551
+ ]:
552
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_custom_metadata
553
+
554
+ output, http_response = (
555
+ capo_workdocs._operations.aws_gorilla_boy_service.create_custom_metadata.create_custom_metadata(
556
+ req.options, req.input
557
+ )
558
+ )
559
+ return OperationResponse(output=output, response=http_response)
560
+
561
+ interceptors_, options_ = self.operation_options(config_overrides)
562
+ input_: capo_workdocs.types.create_custom_metadata_request.CreateCustomMetadataRequest = {
563
+ "resource_id": resource_id,
564
+ "custom_metadata": custom_metadata,
565
+ }
566
+ if authentication_token is not None:
567
+ input_["authentication_token"] = authentication_token
568
+ if version_id is not None:
569
+ input_["version_id"] = version_id
570
+
571
+ response = execute_pipeline(
572
+ OperationRequest(input=input_, options=options_),
573
+ handler=_handler,
574
+ interceptors=list(interceptors_),
575
+ )
576
+ response.response.close()
577
+ return response.output
578
+
579
+ def create_folder(
580
+ self,
581
+ parent_folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
582
+ *,
583
+ config_overrides: Optional[WorkDocsClientConfig] = None,
584
+ authentication_token: Optional[
585
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
586
+ ] = None,
587
+ name: Optional[
588
+ "capo_workdocs.types.resource_name_type.ResourceNameType"
589
+ ] = None,
590
+ ) -> "capo_workdocs.types.create_folder_response.CreateFolderResponse":
591
+ """<p>Creates a folder with the specified name and parent folder.</p>
592
+
593
+ Args:
594
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
595
+ name: <p>The name of the new folder.</p>
596
+ parent_folder_id: <p>The ID of the parent folder.</p>
597
+
598
+ Raises:
599
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
600
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
601
+ capo_workdocs.errors.entity_already_exists_exception.EntityAlreadyExistsException: <p>The resource already exists.</p>
602
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
603
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
604
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
605
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
606
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
607
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
608
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
609
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
610
+ """
611
+
612
+ def _handler(
613
+ req: "OperationRequest[capo_workdocs.types.create_folder_request.CreateFolderRequest]",
614
+ ) -> OperationResponse[
615
+ "capo_workdocs.types.create_folder_response.CreateFolderResponse"
616
+ ]:
617
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_folder
618
+
619
+ output, http_response = (
620
+ capo_workdocs._operations.aws_gorilla_boy_service.create_folder.create_folder(
621
+ req.options, req.input
622
+ )
623
+ )
624
+ return OperationResponse(output=output, response=http_response)
625
+
626
+ interceptors_, options_ = self.operation_options(config_overrides)
627
+ input_: capo_workdocs.types.create_folder_request.CreateFolderRequest = {
628
+ "parent_folder_id": parent_folder_id
629
+ }
630
+ if authentication_token is not None:
631
+ input_["authentication_token"] = authentication_token
632
+ if name is not None:
633
+ input_["name"] = name
634
+
635
+ response = execute_pipeline(
636
+ OperationRequest(input=input_, options=options_),
637
+ handler=_handler,
638
+ interceptors=list(interceptors_),
639
+ )
640
+ response.response.close()
641
+ return response.output
642
+
643
+ def create_labels(
644
+ self,
645
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
646
+ labels: "capo_workdocs.types.shared_labels.SharedLabels",
647
+ *,
648
+ config_overrides: Optional[WorkDocsClientConfig] = None,
649
+ authentication_token: Optional[
650
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
651
+ ] = None,
652
+ ) -> "capo_workdocs.types.create_labels_response.CreateLabelsResponse":
653
+ """<p>Adds the specified list of labels to the given resource (a document or folder)</p>
654
+
655
+ Args:
656
+ resource_id: <p>The ID of the resource.</p>
657
+ labels: <p>List of labels to add to the resource.</p>
658
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
659
+
660
+ Raises:
661
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
662
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
663
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
664
+ capo_workdocs.errors.too_many_labels_exception.TooManyLabelsException: <p>The limit has been reached on the number of labels for the specified resource.</p>
665
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
666
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
667
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
668
+ """
669
+
670
+ def _handler(
671
+ req: "OperationRequest[capo_workdocs.types.create_labels_request.CreateLabelsRequest]",
672
+ ) -> OperationResponse[
673
+ "capo_workdocs.types.create_labels_response.CreateLabelsResponse"
674
+ ]:
675
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_labels
676
+
677
+ output, http_response = (
678
+ capo_workdocs._operations.aws_gorilla_boy_service.create_labels.create_labels(
679
+ req.options, req.input
680
+ )
681
+ )
682
+ return OperationResponse(output=output, response=http_response)
683
+
684
+ interceptors_, options_ = self.operation_options(config_overrides)
685
+ input_: capo_workdocs.types.create_labels_request.CreateLabelsRequest = {
686
+ "resource_id": resource_id,
687
+ "labels": labels,
688
+ }
689
+ if authentication_token is not None:
690
+ input_["authentication_token"] = authentication_token
691
+
692
+ response = execute_pipeline(
693
+ OperationRequest(input=input_, options=options_),
694
+ handler=_handler,
695
+ interceptors=list(interceptors_),
696
+ )
697
+ response.response.close()
698
+ return response.output
699
+
700
+ def create_notification_subscription(
701
+ self,
702
+ organization_id: "capo_workdocs.types.id_type.IdType",
703
+ endpoint: "capo_workdocs.types.subscription_end_point_type.SubscriptionEndPointType",
704
+ protocol: "capo_workdocs.types.subscription_protocol_type.SubscriptionProtocolType",
705
+ subscription_type: "capo_workdocs.types.subscription_type.SubscriptionType",
706
+ *,
707
+ config_overrides: Optional[WorkDocsClientConfig] = None,
708
+ ) -> "capo_workdocs.types.create_notification_subscription_response.CreateNotificationSubscriptionResponse":
709
+ r"""<p>Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/workdocs/latest/developerguide/manage-notifications.html\">Setting up notifications for an IAM user or role</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
710
+
711
+ Args:
712
+ organization_id: <p>The ID of the organization.</p>
713
+ endpoint: <p>The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with <code>https</code>.</p>
714
+ protocol: <p>The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.</p>
715
+ subscription_type: <p>The notification type.</p>
716
+
717
+ Raises:
718
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
719
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
720
+ capo_workdocs.errors.too_many_subscriptions_exception.TooManySubscriptionsException: <p>You've reached the limit on the number of subscriptions for the WorkDocs instance.</p>
721
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
722
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
723
+ """
724
+
725
+ def _handler(
726
+ req: "OperationRequest[capo_workdocs.types.create_notification_subscription_request.CreateNotificationSubscriptionRequest]",
727
+ ) -> OperationResponse[
728
+ "capo_workdocs.types.create_notification_subscription_response.CreateNotificationSubscriptionResponse"
729
+ ]:
730
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_notification_subscription
731
+
732
+ output, http_response = (
733
+ capo_workdocs._operations.aws_gorilla_boy_service.create_notification_subscription.create_notification_subscription(
734
+ req.options, req.input
735
+ )
736
+ )
737
+ return OperationResponse(output=output, response=http_response)
738
+
739
+ interceptors_, options_ = self.operation_options(config_overrides)
740
+ input_: capo_workdocs.types.create_notification_subscription_request.CreateNotificationSubscriptionRequest = {
741
+ "organization_id": organization_id,
742
+ "endpoint": endpoint,
743
+ "protocol": protocol,
744
+ "subscription_type": subscription_type,
745
+ }
746
+
747
+ response = execute_pipeline(
748
+ OperationRequest(input=input_, options=options_),
749
+ handler=_handler,
750
+ interceptors=list(interceptors_),
751
+ )
752
+ response.response.close()
753
+ return response.output
754
+
755
+ def create_user(
756
+ self,
757
+ username: "capo_workdocs.types.username_type.UsernameType",
758
+ given_name: "capo_workdocs.types.user_attribute_value_type.UserAttributeValueType",
759
+ surname: "capo_workdocs.types.user_attribute_value_type.UserAttributeValueType",
760
+ password: "capo_workdocs.types.password_type.PasswordType",
761
+ *,
762
+ config_overrides: Optional[WorkDocsClientConfig] = None,
763
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
764
+ email_address: Optional[
765
+ "capo_workdocs.types.email_address_type.EmailAddressType"
766
+ ] = None,
767
+ time_zone_id: Optional[
768
+ "capo_workdocs.types.time_zone_id_type.TimeZoneIdType"
769
+ ] = None,
770
+ storage_rule: Optional[
771
+ "capo_workdocs.types.storage_rule_type.StorageRuleType"
772
+ ] = None,
773
+ authentication_token: Optional[
774
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
775
+ ] = None,
776
+ ) -> "capo_workdocs.types.create_user_response.CreateUserResponse":
777
+ r"""<p>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.</p>
778
+
779
+ Args:
780
+ organization_id: <p>The ID of the organization.</p>
781
+ username: <p>The login name of the user.</p>
782
+ email_address: <p>The email address of the user.</p>
783
+ given_name: <p>The given name of the user.</p>
784
+ surname: <p>The surname of the user.</p>
785
+ password: <p>The password of the user.</p>
786
+ time_zone_id: <p>The time zone ID of the user.</p>
787
+ storage_rule: <p>The amount of storage for the user.</p>
788
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
789
+
790
+ Raises:
791
+ capo_workdocs.errors.entity_already_exists_exception.EntityAlreadyExistsException: <p>The resource already exists.</p>
792
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
793
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
794
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
795
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
796
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
797
+ """
798
+
799
+ def _handler(
800
+ req: "OperationRequest[capo_workdocs.types.create_user_request.CreateUserRequest]",
801
+ ) -> OperationResponse[
802
+ "capo_workdocs.types.create_user_response.CreateUserResponse"
803
+ ]:
804
+ import capo_workdocs._operations.aws_gorilla_boy_service.create_user
805
+
806
+ output, http_response = (
807
+ capo_workdocs._operations.aws_gorilla_boy_service.create_user.create_user(
808
+ req.options, req.input
809
+ )
810
+ )
811
+ return OperationResponse(output=output, response=http_response)
812
+
813
+ interceptors_, options_ = self.operation_options(config_overrides)
814
+ input_: capo_workdocs.types.create_user_request.CreateUserRequest = {
815
+ "username": username,
816
+ "given_name": given_name,
817
+ "surname": surname,
818
+ "password": password,
819
+ }
820
+ if organization_id is not None:
821
+ input_["organization_id"] = organization_id
822
+ if email_address is not None:
823
+ input_["email_address"] = email_address
824
+ if time_zone_id is not None:
825
+ input_["time_zone_id"] = time_zone_id
826
+ if storage_rule is not None:
827
+ input_["storage_rule"] = storage_rule
828
+ if authentication_token is not None:
829
+ input_["authentication_token"] = authentication_token
830
+
831
+ response = execute_pipeline(
832
+ OperationRequest(input=input_, options=options_),
833
+ handler=_handler,
834
+ interceptors=list(interceptors_),
835
+ )
836
+ response.response.close()
837
+ return response.output
838
+
839
+ def deactivate_user(
840
+ self,
841
+ user_id: "capo_workdocs.types.id_type.IdType",
842
+ *,
843
+ config_overrides: Optional[WorkDocsClientConfig] = None,
844
+ authentication_token: Optional[
845
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
846
+ ] = None,
847
+ ) -> None:
848
+ """<p>Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.</p>
849
+
850
+ Args:
851
+ user_id: <p>The ID of the user.</p>
852
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
853
+
854
+ Raises:
855
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
856
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
857
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
858
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
859
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
860
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
861
+ """
862
+
863
+ def _handler(
864
+ req: "OperationRequest[capo_workdocs.types.deactivate_user_request.DeactivateUserRequest]",
865
+ ) -> OperationResponse[None]:
866
+ import capo_workdocs._operations.aws_gorilla_boy_service.deactivate_user
867
+
868
+ output, http_response = (
869
+ capo_workdocs._operations.aws_gorilla_boy_service.deactivate_user.deactivate_user(
870
+ req.options, req.input
871
+ )
872
+ )
873
+ return OperationResponse(output=output, response=http_response)
874
+
875
+ interceptors_, options_ = self.operation_options(config_overrides)
876
+ input_: capo_workdocs.types.deactivate_user_request.DeactivateUserRequest = {
877
+ "user_id": user_id
878
+ }
879
+ if authentication_token is not None:
880
+ input_["authentication_token"] = authentication_token
881
+
882
+ response = execute_pipeline(
883
+ OperationRequest(input=input_, options=options_),
884
+ handler=_handler,
885
+ interceptors=list(interceptors_),
886
+ )
887
+ response.response.close()
888
+ return response.output
889
+
890
+ def delete_comment(
891
+ self,
892
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
893
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
894
+ comment_id: "capo_workdocs.types.comment_id_type.CommentIdType",
895
+ *,
896
+ config_overrides: Optional[WorkDocsClientConfig] = None,
897
+ authentication_token: Optional[
898
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
899
+ ] = None,
900
+ ) -> None:
901
+ """<p>Deletes the specified comment from the document version.</p>
902
+
903
+ Args:
904
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
905
+ document_id: <p>The ID of the document.</p>
906
+ version_id: <p>The ID of the document version.</p>
907
+ comment_id: <p>The ID of the comment.</p>
908
+
909
+ Raises:
910
+ capo_workdocs.errors.document_locked_for_comments_exception.DocumentLockedForCommentsException: <p>This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.</p>
911
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
912
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
913
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
914
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
915
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
916
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
917
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
918
+ """
919
+
920
+ def _handler(
921
+ req: "OperationRequest[capo_workdocs.types.delete_comment_request.DeleteCommentRequest]",
922
+ ) -> OperationResponse[None]:
923
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_comment
924
+
925
+ output, http_response = (
926
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_comment.delete_comment(
927
+ req.options, req.input
928
+ )
929
+ )
930
+ return OperationResponse(output=output, response=http_response)
931
+
932
+ interceptors_, options_ = self.operation_options(config_overrides)
933
+ input_: capo_workdocs.types.delete_comment_request.DeleteCommentRequest = {
934
+ "document_id": document_id,
935
+ "version_id": version_id,
936
+ "comment_id": comment_id,
937
+ }
938
+ if authentication_token is not None:
939
+ input_["authentication_token"] = authentication_token
940
+
941
+ response = execute_pipeline(
942
+ OperationRequest(input=input_, options=options_),
943
+ handler=_handler,
944
+ interceptors=list(interceptors_),
945
+ )
946
+ response.response.close()
947
+ return response.output
948
+
949
+ def delete_custom_metadata(
950
+ self,
951
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
952
+ *,
953
+ config_overrides: Optional[WorkDocsClientConfig] = None,
954
+ authentication_token: Optional[
955
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
956
+ ] = None,
957
+ version_id: Optional[
958
+ "capo_workdocs.types.document_version_id_type.DocumentVersionIdType"
959
+ ] = None,
960
+ keys: Optional[
961
+ "capo_workdocs.types.custom_metadata_key_list.CustomMetadataKeyList"
962
+ ] = None,
963
+ delete_all: Optional["capo_workdocs.types.boolean_type.BooleanType"] = None,
964
+ ) -> "capo_workdocs.types.delete_custom_metadata_response.DeleteCustomMetadataResponse":
965
+ """<p>Deletes custom metadata from the specified resource.</p>
966
+
967
+ Args:
968
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
969
+ resource_id: <p>The ID of the resource, either a document or folder.</p>
970
+ version_id: <p>The ID of the version, if the custom metadata is being deleted from a document version.</p>
971
+ keys: <p>List of properties to remove.</p>
972
+ delete_all: <p>Flag to indicate removal of all custom metadata properties from the specified resource.</p>
973
+
974
+ Raises:
975
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
976
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
977
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
978
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
979
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
980
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
981
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
982
+ """
983
+
984
+ def _handler(
985
+ req: "OperationRequest[capo_workdocs.types.delete_custom_metadata_request.DeleteCustomMetadataRequest]",
986
+ ) -> OperationResponse[
987
+ "capo_workdocs.types.delete_custom_metadata_response.DeleteCustomMetadataResponse"
988
+ ]:
989
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_custom_metadata
990
+
991
+ output, http_response = (
992
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_custom_metadata.delete_custom_metadata(
993
+ req.options, req.input
994
+ )
995
+ )
996
+ return OperationResponse(output=output, response=http_response)
997
+
998
+ interceptors_, options_ = self.operation_options(config_overrides)
999
+ input_: capo_workdocs.types.delete_custom_metadata_request.DeleteCustomMetadataRequest = {
1000
+ "resource_id": resource_id
1001
+ }
1002
+ if authentication_token is not None:
1003
+ input_["authentication_token"] = authentication_token
1004
+ if version_id is not None:
1005
+ input_["version_id"] = version_id
1006
+ if keys is not None:
1007
+ input_["keys"] = keys
1008
+ if delete_all is not None:
1009
+ input_["delete_all"] = delete_all
1010
+
1011
+ response = execute_pipeline(
1012
+ OperationRequest(input=input_, options=options_),
1013
+ handler=_handler,
1014
+ interceptors=list(interceptors_),
1015
+ )
1016
+ response.response.close()
1017
+ return response.output
1018
+
1019
+ def delete_document(
1020
+ self,
1021
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1022
+ *,
1023
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1024
+ authentication_token: Optional[
1025
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1026
+ ] = None,
1027
+ ) -> None:
1028
+ """<p>Permanently deletes the specified document and its associated metadata.</p>
1029
+
1030
+ Args:
1031
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1032
+ document_id: <p>The ID of the document.</p>
1033
+
1034
+ Raises:
1035
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
1036
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
1037
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1038
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1039
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
1040
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1041
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1042
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1043
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1044
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1045
+ """
1046
+
1047
+ def _handler(
1048
+ req: "OperationRequest[capo_workdocs.types.delete_document_request.DeleteDocumentRequest]",
1049
+ ) -> OperationResponse[None]:
1050
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_document
1051
+
1052
+ output, http_response = (
1053
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_document.delete_document(
1054
+ req.options, req.input
1055
+ )
1056
+ )
1057
+ return OperationResponse(output=output, response=http_response)
1058
+
1059
+ interceptors_, options_ = self.operation_options(config_overrides)
1060
+ input_: capo_workdocs.types.delete_document_request.DeleteDocumentRequest = {
1061
+ "document_id": document_id
1062
+ }
1063
+ if authentication_token is not None:
1064
+ input_["authentication_token"] = authentication_token
1065
+
1066
+ response = execute_pipeline(
1067
+ OperationRequest(input=input_, options=options_),
1068
+ handler=_handler,
1069
+ interceptors=list(interceptors_),
1070
+ )
1071
+ response.response.close()
1072
+ return response.output
1073
+
1074
+ def delete_document_version(
1075
+ self,
1076
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1077
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
1078
+ delete_prior_versions: "capo_workdocs.types.boolean_type.BooleanType",
1079
+ *,
1080
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1081
+ authentication_token: Optional[
1082
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1083
+ ] = None,
1084
+ ) -> None:
1085
+ """<p>Deletes a specific version of a document.</p>
1086
+
1087
+ Args:
1088
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1089
+ document_id: <p>The ID of the document associated with the version being deleted.</p>
1090
+ version_id: <p>The ID of the version being deleted.</p>
1091
+ delete_prior_versions: <p>Deletes all versions of a document prior to the current version.</p>
1092
+
1093
+ Raises:
1094
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
1095
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
1096
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1097
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1098
+ capo_workdocs.errors.invalid_operation_exception.InvalidOperationException: <p>The operation is invalid.</p>
1099
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1100
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1101
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1102
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1103
+ """
1104
+
1105
+ def _handler(
1106
+ req: "OperationRequest[capo_workdocs.types.delete_document_version_request.DeleteDocumentVersionRequest]",
1107
+ ) -> OperationResponse[None]:
1108
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_document_version
1109
+
1110
+ output, http_response = (
1111
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_document_version.delete_document_version(
1112
+ req.options, req.input
1113
+ )
1114
+ )
1115
+ return OperationResponse(output=output, response=http_response)
1116
+
1117
+ interceptors_, options_ = self.operation_options(config_overrides)
1118
+ input_: capo_workdocs.types.delete_document_version_request.DeleteDocumentVersionRequest = {
1119
+ "document_id": document_id,
1120
+ "version_id": version_id,
1121
+ "delete_prior_versions": delete_prior_versions,
1122
+ }
1123
+ if authentication_token is not None:
1124
+ input_["authentication_token"] = authentication_token
1125
+
1126
+ response = execute_pipeline(
1127
+ OperationRequest(input=input_, options=options_),
1128
+ handler=_handler,
1129
+ interceptors=list(interceptors_),
1130
+ )
1131
+ response.response.close()
1132
+ return response.output
1133
+
1134
+ def delete_folder(
1135
+ self,
1136
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1137
+ *,
1138
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1139
+ authentication_token: Optional[
1140
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1141
+ ] = None,
1142
+ ) -> None:
1143
+ """<p>Permanently deletes the specified folder and its contents.</p>
1144
+
1145
+ Args:
1146
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1147
+ folder_id: <p>The ID of the folder.</p>
1148
+
1149
+ Raises:
1150
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
1151
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
1152
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1153
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1154
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
1155
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1156
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1157
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1158
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1159
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1160
+ """
1161
+
1162
+ def _handler(
1163
+ req: "OperationRequest[capo_workdocs.types.delete_folder_request.DeleteFolderRequest]",
1164
+ ) -> OperationResponse[None]:
1165
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_folder
1166
+
1167
+ output, http_response = (
1168
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_folder.delete_folder(
1169
+ req.options, req.input
1170
+ )
1171
+ )
1172
+ return OperationResponse(output=output, response=http_response)
1173
+
1174
+ interceptors_, options_ = self.operation_options(config_overrides)
1175
+ input_: capo_workdocs.types.delete_folder_request.DeleteFolderRequest = {
1176
+ "folder_id": folder_id
1177
+ }
1178
+ if authentication_token is not None:
1179
+ input_["authentication_token"] = authentication_token
1180
+
1181
+ response = execute_pipeline(
1182
+ OperationRequest(input=input_, options=options_),
1183
+ handler=_handler,
1184
+ interceptors=list(interceptors_),
1185
+ )
1186
+ response.response.close()
1187
+ return response.output
1188
+
1189
+ def delete_folder_contents(
1190
+ self,
1191
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1192
+ *,
1193
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1194
+ authentication_token: Optional[
1195
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1196
+ ] = None,
1197
+ ) -> None:
1198
+ """<p>Deletes the contents of the specified folder.</p>
1199
+
1200
+ Args:
1201
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1202
+ folder_id: <p>The ID of the folder.</p>
1203
+
1204
+ Raises:
1205
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
1206
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1207
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1208
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1209
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1210
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1211
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1212
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1213
+ """
1214
+
1215
+ def _handler(
1216
+ req: "OperationRequest[capo_workdocs.types.delete_folder_contents_request.DeleteFolderContentsRequest]",
1217
+ ) -> OperationResponse[None]:
1218
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_folder_contents
1219
+
1220
+ output, http_response = (
1221
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_folder_contents.delete_folder_contents(
1222
+ req.options, req.input
1223
+ )
1224
+ )
1225
+ return OperationResponse(output=output, response=http_response)
1226
+
1227
+ interceptors_, options_ = self.operation_options(config_overrides)
1228
+ input_: capo_workdocs.types.delete_folder_contents_request.DeleteFolderContentsRequest = {
1229
+ "folder_id": folder_id
1230
+ }
1231
+ if authentication_token is not None:
1232
+ input_["authentication_token"] = authentication_token
1233
+
1234
+ response = execute_pipeline(
1235
+ OperationRequest(input=input_, options=options_),
1236
+ handler=_handler,
1237
+ interceptors=list(interceptors_),
1238
+ )
1239
+ response.response.close()
1240
+ return response.output
1241
+
1242
+ def delete_labels(
1243
+ self,
1244
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1245
+ *,
1246
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1247
+ authentication_token: Optional[
1248
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1249
+ ] = None,
1250
+ labels: Optional["capo_workdocs.types.shared_labels.SharedLabels"] = None,
1251
+ delete_all: Optional["capo_workdocs.types.boolean_type.BooleanType"] = None,
1252
+ ) -> "capo_workdocs.types.delete_labels_response.DeleteLabelsResponse":
1253
+ """<p>Deletes the specified list of labels from a resource.</p>
1254
+
1255
+ Args:
1256
+ resource_id: <p>The ID of the resource.</p>
1257
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1258
+ labels: <p>List of labels to delete from the resource.</p>
1259
+ delete_all: <p>Flag to request removal of all labels from the specified resource.</p>
1260
+
1261
+ Raises:
1262
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1263
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1264
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1265
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1266
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1267
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1268
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1269
+ """
1270
+
1271
+ def _handler(
1272
+ req: "OperationRequest[capo_workdocs.types.delete_labels_request.DeleteLabelsRequest]",
1273
+ ) -> OperationResponse[
1274
+ "capo_workdocs.types.delete_labels_response.DeleteLabelsResponse"
1275
+ ]:
1276
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_labels
1277
+
1278
+ output, http_response = (
1279
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_labels.delete_labels(
1280
+ req.options, req.input
1281
+ )
1282
+ )
1283
+ return OperationResponse(output=output, response=http_response)
1284
+
1285
+ interceptors_, options_ = self.operation_options(config_overrides)
1286
+ input_: capo_workdocs.types.delete_labels_request.DeleteLabelsRequest = {
1287
+ "resource_id": resource_id
1288
+ }
1289
+ if authentication_token is not None:
1290
+ input_["authentication_token"] = authentication_token
1291
+ if labels is not None:
1292
+ input_["labels"] = labels
1293
+ if delete_all is not None:
1294
+ input_["delete_all"] = delete_all
1295
+
1296
+ response = execute_pipeline(
1297
+ OperationRequest(input=input_, options=options_),
1298
+ handler=_handler,
1299
+ interceptors=list(interceptors_),
1300
+ )
1301
+ response.response.close()
1302
+ return response.output
1303
+
1304
+ def delete_notification_subscription(
1305
+ self,
1306
+ subscription_id: "capo_workdocs.types.id_type.IdType",
1307
+ organization_id: "capo_workdocs.types.id_type.IdType",
1308
+ *,
1309
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1310
+ ) -> None:
1311
+ """<p>Deletes the specified subscription from the specified organization.</p>
1312
+
1313
+ Args:
1314
+ subscription_id: <p>The ID of the subscription.</p>
1315
+ organization_id: <p>The ID of the organization.</p>
1316
+
1317
+ Raises:
1318
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1319
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1320
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1321
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1322
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1323
+ """
1324
+
1325
+ def _handler(
1326
+ req: "OperationRequest[capo_workdocs.types.delete_notification_subscription_request.DeleteNotificationSubscriptionRequest]",
1327
+ ) -> OperationResponse[None]:
1328
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_notification_subscription
1329
+
1330
+ output, http_response = (
1331
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_notification_subscription.delete_notification_subscription(
1332
+ req.options, req.input
1333
+ )
1334
+ )
1335
+ return OperationResponse(output=output, response=http_response)
1336
+
1337
+ interceptors_, options_ = self.operation_options(config_overrides)
1338
+ input_: capo_workdocs.types.delete_notification_subscription_request.DeleteNotificationSubscriptionRequest = {
1339
+ "subscription_id": subscription_id,
1340
+ "organization_id": organization_id,
1341
+ }
1342
+
1343
+ response = execute_pipeline(
1344
+ OperationRequest(input=input_, options=options_),
1345
+ handler=_handler,
1346
+ interceptors=list(interceptors_),
1347
+ )
1348
+ response.response.close()
1349
+ return response.output
1350
+
1351
+ def delete_user(
1352
+ self,
1353
+ user_id: "capo_workdocs.types.id_type.IdType",
1354
+ *,
1355
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1356
+ authentication_token: Optional[
1357
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1358
+ ] = None,
1359
+ ) -> None:
1360
+ """<p>Deletes the specified user from a Simple AD or Microsoft AD directory.</p> <important> <p>Deleting a user immediately and permanently deletes all content in that user's folder structure. Site retention policies do NOT apply to this type of deletion.</p> </important>
1361
+
1362
+ Args:
1363
+ authentication_token: <p>Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using Amazon Web Services credentials.</p>
1364
+ user_id: <p>The ID of the user.</p>
1365
+
1366
+ Raises:
1367
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1368
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1369
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1370
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1371
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1372
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1373
+ """
1374
+
1375
+ def _handler(
1376
+ req: "OperationRequest[capo_workdocs.types.delete_user_request.DeleteUserRequest]",
1377
+ ) -> OperationResponse[None]:
1378
+ import capo_workdocs._operations.aws_gorilla_boy_service.delete_user
1379
+
1380
+ output, http_response = (
1381
+ capo_workdocs._operations.aws_gorilla_boy_service.delete_user.delete_user(
1382
+ req.options, req.input
1383
+ )
1384
+ )
1385
+ return OperationResponse(output=output, response=http_response)
1386
+
1387
+ interceptors_, options_ = self.operation_options(config_overrides)
1388
+ input_: capo_workdocs.types.delete_user_request.DeleteUserRequest = {
1389
+ "user_id": user_id
1390
+ }
1391
+ if authentication_token is not None:
1392
+ input_["authentication_token"] = authentication_token
1393
+
1394
+ response = execute_pipeline(
1395
+ OperationRequest(input=input_, options=options_),
1396
+ handler=_handler,
1397
+ interceptors=list(interceptors_),
1398
+ )
1399
+ response.response.close()
1400
+ return response.output
1401
+
1402
+ def describe_activities(
1403
+ self,
1404
+ *,
1405
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1406
+ authentication_token: Optional[
1407
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1408
+ ] = None,
1409
+ start_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
1410
+ end_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
1411
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1412
+ activity_types: Optional[
1413
+ "capo_workdocs.types.activity_names_filter_type.ActivityNamesFilterType"
1414
+ ] = None,
1415
+ resource_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1416
+ user_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1417
+ include_indirect_activities: Optional[
1418
+ "capo_workdocs.types.boolean_type.BooleanType"
1419
+ ] = None,
1420
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1421
+ marker: Optional[
1422
+ "capo_workdocs.types.search_marker_type.SearchMarkerType"
1423
+ ] = None,
1424
+ ) -> "capo_workdocs.types.describe_activities_response.DescribeActivitiesResponse":
1425
+ """<p>Describes the user activities in a specified time period.</p>
1426
+
1427
+ Args:
1428
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1429
+ start_time: <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
1430
+ end_time: <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
1431
+ organization_id: <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
1432
+ activity_types: <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
1433
+ resource_id: <p>The document or folder ID for which to describe activity types.</p>
1434
+ user_id: <p>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.</p>
1435
+ include_indirect_activities: <p>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).</p>
1436
+ limit: <p>The maximum number of items to return.</p>
1437
+ marker: <p>The marker for the next set of results.</p>
1438
+
1439
+ Raises:
1440
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1441
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
1442
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1443
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1444
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1445
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1446
+ """
1447
+
1448
+ def _handler(
1449
+ req: "OperationRequest[capo_workdocs.types.describe_activities_request.DescribeActivitiesRequest]",
1450
+ ) -> OperationResponse[
1451
+ "capo_workdocs.types.describe_activities_response.DescribeActivitiesResponse"
1452
+ ]:
1453
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_activities
1454
+
1455
+ output, http_response = (
1456
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_activities.describe_activities(
1457
+ req.options, req.input
1458
+ )
1459
+ )
1460
+ return OperationResponse(output=output, response=http_response)
1461
+
1462
+ interceptors_, options_ = self.operation_options(config_overrides)
1463
+ input_: capo_workdocs.types.describe_activities_request.DescribeActivitiesRequest = {}
1464
+ if authentication_token is not None:
1465
+ input_["authentication_token"] = authentication_token
1466
+ if start_time is not None:
1467
+ input_["start_time"] = start_time
1468
+ if end_time is not None:
1469
+ input_["end_time"] = end_time
1470
+ if organization_id is not None:
1471
+ input_["organization_id"] = organization_id
1472
+ if activity_types is not None:
1473
+ input_["activity_types"] = activity_types
1474
+ if resource_id is not None:
1475
+ input_["resource_id"] = resource_id
1476
+ if user_id is not None:
1477
+ input_["user_id"] = user_id
1478
+ if include_indirect_activities is not None:
1479
+ input_["include_indirect_activities"] = include_indirect_activities
1480
+ if limit is not None:
1481
+ input_["limit"] = limit
1482
+ if marker is not None:
1483
+ input_["marker"] = marker
1484
+
1485
+ response = execute_pipeline(
1486
+ OperationRequest(input=input_, options=options_),
1487
+ handler=_handler,
1488
+ interceptors=list(interceptors_),
1489
+ )
1490
+ response.response.close()
1491
+ return response.output
1492
+
1493
+ def iter_describe_activities(
1494
+ self,
1495
+ *,
1496
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1497
+ authentication_token: Optional[
1498
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1499
+ ] = None,
1500
+ start_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
1501
+ end_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
1502
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1503
+ activity_types: Optional[
1504
+ "capo_workdocs.types.activity_names_filter_type.ActivityNamesFilterType"
1505
+ ] = None,
1506
+ resource_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1507
+ user_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1508
+ include_indirect_activities: Optional[
1509
+ "capo_workdocs.types.boolean_type.BooleanType"
1510
+ ] = None,
1511
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1512
+ marker: Optional[
1513
+ "capo_workdocs.types.search_marker_type.SearchMarkerType"
1514
+ ] = None,
1515
+ ) -> "Iterator[capo_workdocs.types.activity.Activity]":
1516
+ _token = marker
1517
+ while True:
1518
+ _response = self.describe_activities(
1519
+ config_overrides=config_overrides,
1520
+ authentication_token=authentication_token,
1521
+ start_time=start_time,
1522
+ end_time=end_time,
1523
+ organization_id=organization_id,
1524
+ activity_types=activity_types,
1525
+ resource_id=resource_id,
1526
+ user_id=user_id,
1527
+ include_indirect_activities=include_indirect_activities,
1528
+ limit=limit,
1529
+ marker=_token,
1530
+ )
1531
+ _page = _resolve_path(_response, ("user_activities",))
1532
+ for _item in _page or []:
1533
+ yield _item
1534
+ _token = _resolve_path(_response, ("marker",))
1535
+ if not _token:
1536
+ break
1537
+
1538
+ def describe_comments(
1539
+ self,
1540
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1541
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
1542
+ *,
1543
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1544
+ authentication_token: Optional[
1545
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1546
+ ] = None,
1547
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1548
+ marker: Optional["capo_workdocs.types.marker_type.MarkerType"] = None,
1549
+ ) -> "capo_workdocs.types.describe_comments_response.DescribeCommentsResponse":
1550
+ """<p>List all the comments for the specified document version.</p>
1551
+
1552
+ Args:
1553
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1554
+ document_id: <p>The ID of the document.</p>
1555
+ version_id: <p>The ID of the document version.</p>
1556
+ limit: <p>The maximum number of items to return.</p>
1557
+ marker: <p>The marker for the next set of results. This marker was received from a previous call.</p>
1558
+
1559
+ Raises:
1560
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1561
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1562
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1563
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1564
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1565
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1566
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1567
+ """
1568
+
1569
+ def _handler(
1570
+ req: "OperationRequest[capo_workdocs.types.describe_comments_request.DescribeCommentsRequest]",
1571
+ ) -> OperationResponse[
1572
+ "capo_workdocs.types.describe_comments_response.DescribeCommentsResponse"
1573
+ ]:
1574
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_comments
1575
+
1576
+ output, http_response = (
1577
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_comments.describe_comments(
1578
+ req.options, req.input
1579
+ )
1580
+ )
1581
+ return OperationResponse(output=output, response=http_response)
1582
+
1583
+ interceptors_, options_ = self.operation_options(config_overrides)
1584
+ input_: capo_workdocs.types.describe_comments_request.DescribeCommentsRequest = {
1585
+ "document_id": document_id,
1586
+ "version_id": version_id,
1587
+ }
1588
+ if authentication_token is not None:
1589
+ input_["authentication_token"] = authentication_token
1590
+ if limit is not None:
1591
+ input_["limit"] = limit
1592
+ if marker is not None:
1593
+ input_["marker"] = marker
1594
+
1595
+ response = execute_pipeline(
1596
+ OperationRequest(input=input_, options=options_),
1597
+ handler=_handler,
1598
+ interceptors=list(interceptors_),
1599
+ )
1600
+ response.response.close()
1601
+ return response.output
1602
+
1603
+ def iter_describe_comments(
1604
+ self,
1605
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1606
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
1607
+ *,
1608
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1609
+ authentication_token: Optional[
1610
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1611
+ ] = None,
1612
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1613
+ marker: Optional["capo_workdocs.types.marker_type.MarkerType"] = None,
1614
+ ) -> "Iterator[capo_workdocs.types.comment.Comment]":
1615
+ _token = marker
1616
+ while True:
1617
+ _response = self.describe_comments(
1618
+ document_id,
1619
+ version_id,
1620
+ config_overrides=config_overrides,
1621
+ authentication_token=authentication_token,
1622
+ limit=limit,
1623
+ marker=_token,
1624
+ )
1625
+ _page = _resolve_path(_response, ("comments",))
1626
+ for _item in _page or []:
1627
+ yield _item
1628
+ _token = _resolve_path(_response, ("marker",))
1629
+ if not _token:
1630
+ break
1631
+
1632
+ def describe_document_versions(
1633
+ self,
1634
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1635
+ *,
1636
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1637
+ authentication_token: Optional[
1638
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1639
+ ] = None,
1640
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
1641
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1642
+ include: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1643
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1644
+ ) -> "capo_workdocs.types.describe_document_versions_response.DescribeDocumentVersionsResponse":
1645
+ r"""<p>Retrieves the document versions for the specified document.</p> <p>By default, only active versions are returned.</p>
1646
+
1647
+ Args:
1648
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1649
+ document_id: <p>The ID of the document.</p>
1650
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1651
+ limit: <p>The maximum number of versions to return with this call.</p>
1652
+ include: <p>A comma-separated list of values. Specify \"INITIALIZED\" to include incomplete versions.</p>
1653
+ fields: <p>Specify \"SOURCE\" to include initialized versions and a URL for the source document.</p>
1654
+
1655
+ Raises:
1656
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1657
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1658
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
1659
+ capo_workdocs.errors.invalid_password_exception.InvalidPasswordException: <p>The password is invalid.</p>
1660
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1661
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1662
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1663
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1664
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1665
+ """
1666
+
1667
+ def _handler(
1668
+ req: "OperationRequest[capo_workdocs.types.describe_document_versions_request.DescribeDocumentVersionsRequest]",
1669
+ ) -> OperationResponse[
1670
+ "capo_workdocs.types.describe_document_versions_response.DescribeDocumentVersionsResponse"
1671
+ ]:
1672
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_document_versions
1673
+
1674
+ output, http_response = (
1675
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_document_versions.describe_document_versions(
1676
+ req.options, req.input
1677
+ )
1678
+ )
1679
+ return OperationResponse(output=output, response=http_response)
1680
+
1681
+ interceptors_, options_ = self.operation_options(config_overrides)
1682
+ input_: capo_workdocs.types.describe_document_versions_request.DescribeDocumentVersionsRequest = {
1683
+ "document_id": document_id
1684
+ }
1685
+ if authentication_token is not None:
1686
+ input_["authentication_token"] = authentication_token
1687
+ if marker is not None:
1688
+ input_["marker"] = marker
1689
+ if limit is not None:
1690
+ input_["limit"] = limit
1691
+ if include is not None:
1692
+ input_["include"] = include
1693
+ if fields is not None:
1694
+ input_["fields"] = fields
1695
+
1696
+ response = execute_pipeline(
1697
+ OperationRequest(input=input_, options=options_),
1698
+ handler=_handler,
1699
+ interceptors=list(interceptors_),
1700
+ )
1701
+ response.response.close()
1702
+ return response.output
1703
+
1704
+ def iter_describe_document_versions(
1705
+ self,
1706
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1707
+ *,
1708
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1709
+ authentication_token: Optional[
1710
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1711
+ ] = None,
1712
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
1713
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1714
+ include: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1715
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1716
+ ) -> "Iterator[capo_workdocs.types.document_version_metadata.DocumentVersionMetadata]":
1717
+ _token = marker
1718
+ while True:
1719
+ _response = self.describe_document_versions(
1720
+ document_id,
1721
+ config_overrides=config_overrides,
1722
+ authentication_token=authentication_token,
1723
+ marker=_token,
1724
+ limit=limit,
1725
+ include=include,
1726
+ fields=fields,
1727
+ )
1728
+ _page = _resolve_path(_response, ("document_versions",))
1729
+ for _item in _page or []:
1730
+ yield _item
1731
+ _token = _resolve_path(_response, ("marker",))
1732
+ if not _token:
1733
+ break
1734
+
1735
+ def describe_folder_contents(
1736
+ self,
1737
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1738
+ *,
1739
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1740
+ authentication_token: Optional[
1741
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1742
+ ] = None,
1743
+ sort: Optional[
1744
+ "capo_workdocs.types.resource_sort_type.ResourceSortType"
1745
+ ] = None,
1746
+ order: Optional["capo_workdocs.types.order_type.OrderType"] = None,
1747
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1748
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
1749
+ type: Optional[
1750
+ "capo_workdocs.types.folder_content_type.FolderContentType"
1751
+ ] = None,
1752
+ include: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1753
+ ) -> "capo_workdocs.types.describe_folder_contents_response.DescribeFolderContentsResponse":
1754
+ r"""<p>Describes the contents of the specified folder, including its documents and subfolders.</p> <p>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.</p>
1755
+
1756
+ Args:
1757
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1758
+ folder_id: <p>The ID of the folder.</p>
1759
+ sort: <p>The sorting criteria.</p>
1760
+ order: <p>The order for the contents of the folder.</p>
1761
+ limit: <p>The maximum number of items to return with this call.</p>
1762
+ marker: <p>The marker for the next set of results. This marker was received from a previous call.</p>
1763
+ type: <p>The type of items.</p>
1764
+ include: <p>The contents to include. Specify \"INITIALIZED\" to include initialized documents.</p>
1765
+
1766
+ Raises:
1767
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1768
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1769
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
1770
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
1771
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1772
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1773
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1774
+ """
1775
+
1776
+ def _handler(
1777
+ req: "OperationRequest[capo_workdocs.types.describe_folder_contents_request.DescribeFolderContentsRequest]",
1778
+ ) -> OperationResponse[
1779
+ "capo_workdocs.types.describe_folder_contents_response.DescribeFolderContentsResponse"
1780
+ ]:
1781
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_folder_contents
1782
+
1783
+ output, http_response = (
1784
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_folder_contents.describe_folder_contents(
1785
+ req.options, req.input
1786
+ )
1787
+ )
1788
+ return OperationResponse(output=output, response=http_response)
1789
+
1790
+ interceptors_, options_ = self.operation_options(config_overrides)
1791
+ input_: capo_workdocs.types.describe_folder_contents_request.DescribeFolderContentsRequest = {
1792
+ "folder_id": folder_id
1793
+ }
1794
+ if authentication_token is not None:
1795
+ input_["authentication_token"] = authentication_token
1796
+ if sort is not None:
1797
+ input_["sort"] = sort
1798
+ if order is not None:
1799
+ input_["order"] = order
1800
+ if limit is not None:
1801
+ input_["limit"] = limit
1802
+ if marker is not None:
1803
+ input_["marker"] = marker
1804
+ if type is not None:
1805
+ input_["type"] = type
1806
+ if include is not None:
1807
+ input_["include"] = include
1808
+
1809
+ response = execute_pipeline(
1810
+ OperationRequest(input=input_, options=options_),
1811
+ handler=_handler,
1812
+ interceptors=list(interceptors_),
1813
+ )
1814
+ response.response.close()
1815
+ return response.output
1816
+
1817
+ def iter_describe_folder_contents(
1818
+ self,
1819
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
1820
+ *,
1821
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1822
+ authentication_token: Optional[
1823
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1824
+ ] = None,
1825
+ sort: Optional[
1826
+ "capo_workdocs.types.resource_sort_type.ResourceSortType"
1827
+ ] = None,
1828
+ order: Optional["capo_workdocs.types.order_type.OrderType"] = None,
1829
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1830
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
1831
+ type: Optional[
1832
+ "capo_workdocs.types.folder_content_type.FolderContentType"
1833
+ ] = None,
1834
+ include: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
1835
+ ) -> "Iterator[capo_workdocs.types.describe_folder_contents_response.DescribeFolderContentsResponse]":
1836
+ _token = marker
1837
+ while True:
1838
+ _response = self.describe_folder_contents(
1839
+ folder_id,
1840
+ config_overrides=config_overrides,
1841
+ authentication_token=authentication_token,
1842
+ sort=sort,
1843
+ order=order,
1844
+ limit=limit,
1845
+ marker=_token,
1846
+ type=type,
1847
+ include=include,
1848
+ )
1849
+ yield _response
1850
+ _token = _resolve_path(_response, ("marker",))
1851
+ if not _token:
1852
+ break
1853
+
1854
+ def describe_groups(
1855
+ self,
1856
+ search_query: "capo_workdocs.types.search_query_type.SearchQueryType",
1857
+ *,
1858
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1859
+ authentication_token: Optional[
1860
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1861
+ ] = None,
1862
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1863
+ marker: Optional["capo_workdocs.types.marker_type.MarkerType"] = None,
1864
+ limit: Optional[
1865
+ "capo_workdocs.types.positive_integer_type.PositiveIntegerType"
1866
+ ] = None,
1867
+ ) -> "capo_workdocs.types.describe_groups_response.DescribeGroupsResponse":
1868
+ """<p>Describes the groups specified by the query. Groups are defined by the underlying Active Directory.</p>
1869
+
1870
+ Args:
1871
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
1872
+ search_query: <p>A query to describe groups by group name.</p>
1873
+ organization_id: <p>The ID of the organization.</p>
1874
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1875
+ limit: <p>The maximum number of items to return with this call.</p>
1876
+
1877
+ Raises:
1878
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1879
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1880
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
1881
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1882
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1883
+ """
1884
+
1885
+ def _handler(
1886
+ req: "OperationRequest[capo_workdocs.types.describe_groups_request.DescribeGroupsRequest]",
1887
+ ) -> OperationResponse[
1888
+ "capo_workdocs.types.describe_groups_response.DescribeGroupsResponse"
1889
+ ]:
1890
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_groups
1891
+
1892
+ output, http_response = (
1893
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_groups.describe_groups(
1894
+ req.options, req.input
1895
+ )
1896
+ )
1897
+ return OperationResponse(output=output, response=http_response)
1898
+
1899
+ interceptors_, options_ = self.operation_options(config_overrides)
1900
+ input_: capo_workdocs.types.describe_groups_request.DescribeGroupsRequest = {
1901
+ "search_query": search_query
1902
+ }
1903
+ if authentication_token is not None:
1904
+ input_["authentication_token"] = authentication_token
1905
+ if organization_id is not None:
1906
+ input_["organization_id"] = organization_id
1907
+ if marker is not None:
1908
+ input_["marker"] = marker
1909
+ if limit is not None:
1910
+ input_["limit"] = limit
1911
+
1912
+ response = execute_pipeline(
1913
+ OperationRequest(input=input_, options=options_),
1914
+ handler=_handler,
1915
+ interceptors=list(interceptors_),
1916
+ )
1917
+ response.response.close()
1918
+ return response.output
1919
+
1920
+ def iter_describe_groups(
1921
+ self,
1922
+ search_query: "capo_workdocs.types.search_query_type.SearchQueryType",
1923
+ *,
1924
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1925
+ authentication_token: Optional[
1926
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
1927
+ ] = None,
1928
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
1929
+ marker: Optional["capo_workdocs.types.marker_type.MarkerType"] = None,
1930
+ limit: Optional[
1931
+ "capo_workdocs.types.positive_integer_type.PositiveIntegerType"
1932
+ ] = None,
1933
+ ) -> "Iterator[capo_workdocs.types.group_metadata.GroupMetadata]":
1934
+ _token = marker
1935
+ while True:
1936
+ _response = self.describe_groups(
1937
+ search_query,
1938
+ config_overrides=config_overrides,
1939
+ authentication_token=authentication_token,
1940
+ organization_id=organization_id,
1941
+ marker=_token,
1942
+ limit=limit,
1943
+ )
1944
+ _page = _resolve_path(_response, ("groups",))
1945
+ for _item in _page or []:
1946
+ yield _item
1947
+ _token = _resolve_path(_response, ("marker",))
1948
+ if not _token:
1949
+ break
1950
+
1951
+ def describe_notification_subscriptions(
1952
+ self,
1953
+ organization_id: "capo_workdocs.types.id_type.IdType",
1954
+ *,
1955
+ config_overrides: Optional[WorkDocsClientConfig] = None,
1956
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
1957
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
1958
+ ) -> "capo_workdocs.types.describe_notification_subscriptions_response.DescribeNotificationSubscriptionsResponse":
1959
+ """<p>Lists the specified notification subscriptions.</p>
1960
+
1961
+ Args:
1962
+ organization_id: <p>The ID of the organization.</p>
1963
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
1964
+ limit: <p>The maximum number of items to return with this call.</p>
1965
+
1966
+ Raises:
1967
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
1968
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
1969
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
1970
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
1971
+ """
1972
+
1973
+ def _handler(
1974
+ req: "OperationRequest[capo_workdocs.types.describe_notification_subscriptions_request.DescribeNotificationSubscriptionsRequest]",
1975
+ ) -> OperationResponse[
1976
+ "capo_workdocs.types.describe_notification_subscriptions_response.DescribeNotificationSubscriptionsResponse"
1977
+ ]:
1978
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_notification_subscriptions
1979
+
1980
+ output, http_response = (
1981
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_notification_subscriptions.describe_notification_subscriptions(
1982
+ req.options, req.input
1983
+ )
1984
+ )
1985
+ return OperationResponse(output=output, response=http_response)
1986
+
1987
+ interceptors_, options_ = self.operation_options(config_overrides)
1988
+ input_: capo_workdocs.types.describe_notification_subscriptions_request.DescribeNotificationSubscriptionsRequest = {
1989
+ "organization_id": organization_id
1990
+ }
1991
+ if marker is not None:
1992
+ input_["marker"] = marker
1993
+ if limit is not None:
1994
+ input_["limit"] = limit
1995
+
1996
+ response = execute_pipeline(
1997
+ OperationRequest(input=input_, options=options_),
1998
+ handler=_handler,
1999
+ interceptors=list(interceptors_),
2000
+ )
2001
+ response.response.close()
2002
+ return response.output
2003
+
2004
+ def iter_describe_notification_subscriptions(
2005
+ self,
2006
+ organization_id: "capo_workdocs.types.id_type.IdType",
2007
+ *,
2008
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2009
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2010
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2011
+ ) -> "Iterator[capo_workdocs.types.subscription.Subscription]":
2012
+ _token = marker
2013
+ while True:
2014
+ _response = self.describe_notification_subscriptions(
2015
+ organization_id,
2016
+ config_overrides=config_overrides,
2017
+ marker=_token,
2018
+ limit=limit,
2019
+ )
2020
+ _page = _resolve_path(_response, ("subscriptions",))
2021
+ for _item in _page or []:
2022
+ yield _item
2023
+ _token = _resolve_path(_response, ("marker",))
2024
+ if not _token:
2025
+ break
2026
+
2027
+ def describe_resource_permissions(
2028
+ self,
2029
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2030
+ *,
2031
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2032
+ authentication_token: Optional[
2033
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2034
+ ] = None,
2035
+ principal_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
2036
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2037
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2038
+ ) -> "capo_workdocs.types.describe_resource_permissions_response.DescribeResourcePermissionsResponse":
2039
+ """<p>Describes the permissions of a specified resource.</p>
2040
+
2041
+ Args:
2042
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2043
+ resource_id: <p>The ID of the resource.</p>
2044
+ principal_id: <p>The ID of the principal to filter permissions by.</p>
2045
+ limit: <p>The maximum number of items to return with this call.</p>
2046
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call)</p>
2047
+
2048
+ Raises:
2049
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2050
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2051
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2052
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2053
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2054
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2055
+ """
2056
+
2057
+ def _handler(
2058
+ req: "OperationRequest[capo_workdocs.types.describe_resource_permissions_request.DescribeResourcePermissionsRequest]",
2059
+ ) -> OperationResponse[
2060
+ "capo_workdocs.types.describe_resource_permissions_response.DescribeResourcePermissionsResponse"
2061
+ ]:
2062
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_resource_permissions
2063
+
2064
+ output, http_response = (
2065
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_resource_permissions.describe_resource_permissions(
2066
+ req.options, req.input
2067
+ )
2068
+ )
2069
+ return OperationResponse(output=output, response=http_response)
2070
+
2071
+ interceptors_, options_ = self.operation_options(config_overrides)
2072
+ input_: capo_workdocs.types.describe_resource_permissions_request.DescribeResourcePermissionsRequest = {
2073
+ "resource_id": resource_id
2074
+ }
2075
+ if authentication_token is not None:
2076
+ input_["authentication_token"] = authentication_token
2077
+ if principal_id is not None:
2078
+ input_["principal_id"] = principal_id
2079
+ if limit is not None:
2080
+ input_["limit"] = limit
2081
+ if marker is not None:
2082
+ input_["marker"] = marker
2083
+
2084
+ response = execute_pipeline(
2085
+ OperationRequest(input=input_, options=options_),
2086
+ handler=_handler,
2087
+ interceptors=list(interceptors_),
2088
+ )
2089
+ response.response.close()
2090
+ return response.output
2091
+
2092
+ def iter_describe_resource_permissions(
2093
+ self,
2094
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2095
+ *,
2096
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2097
+ authentication_token: Optional[
2098
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2099
+ ] = None,
2100
+ principal_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
2101
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2102
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2103
+ ) -> "Iterator[capo_workdocs.types.principal.Principal]":
2104
+ _token = marker
2105
+ while True:
2106
+ _response = self.describe_resource_permissions(
2107
+ resource_id,
2108
+ config_overrides=config_overrides,
2109
+ authentication_token=authentication_token,
2110
+ principal_id=principal_id,
2111
+ limit=limit,
2112
+ marker=_token,
2113
+ )
2114
+ _page = _resolve_path(_response, ("principals",))
2115
+ for _item in _page or []:
2116
+ yield _item
2117
+ _token = _resolve_path(_response, ("marker",))
2118
+ if not _token:
2119
+ break
2120
+
2121
+ def describe_root_folders(
2122
+ self,
2123
+ authentication_token: "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType",
2124
+ *,
2125
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2126
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2127
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2128
+ ) -> (
2129
+ "capo_workdocs.types.describe_root_folders_response.DescribeRootFoldersResponse"
2130
+ ):
2131
+ r"""<p>Describes the current user's special folders; the <code>RootFolder</code> and the <code>RecycleBin</code>. <code>RootFolder</code> is the root of user's files and folders and <code>RecycleBin</code> is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href=\"https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html\">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
2132
+
2133
+ Args:
2134
+ authentication_token: <p>Amazon WorkDocs authentication token.</p>
2135
+ limit: <p>The maximum number of items to return.</p>
2136
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2137
+
2138
+ Raises:
2139
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2140
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2141
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2142
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2143
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2144
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2145
+ """
2146
+
2147
+ def _handler(
2148
+ req: "OperationRequest[capo_workdocs.types.describe_root_folders_request.DescribeRootFoldersRequest]",
2149
+ ) -> OperationResponse[
2150
+ "capo_workdocs.types.describe_root_folders_response.DescribeRootFoldersResponse"
2151
+ ]:
2152
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_root_folders
2153
+
2154
+ output, http_response = (
2155
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_root_folders.describe_root_folders(
2156
+ req.options, req.input
2157
+ )
2158
+ )
2159
+ return OperationResponse(output=output, response=http_response)
2160
+
2161
+ interceptors_, options_ = self.operation_options(config_overrides)
2162
+ input_: capo_workdocs.types.describe_root_folders_request.DescribeRootFoldersRequest = {
2163
+ "authentication_token": authentication_token
2164
+ }
2165
+ if limit is not None:
2166
+ input_["limit"] = limit
2167
+ if marker is not None:
2168
+ input_["marker"] = marker
2169
+
2170
+ response = execute_pipeline(
2171
+ OperationRequest(input=input_, options=options_),
2172
+ handler=_handler,
2173
+ interceptors=list(interceptors_),
2174
+ )
2175
+ response.response.close()
2176
+ return response.output
2177
+
2178
+ def iter_describe_root_folders(
2179
+ self,
2180
+ authentication_token: "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType",
2181
+ *,
2182
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2183
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2184
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2185
+ ) -> "Iterator[capo_workdocs.types.folder_metadata.FolderMetadata]":
2186
+ _token = marker
2187
+ while True:
2188
+ _response = self.describe_root_folders(
2189
+ authentication_token,
2190
+ config_overrides=config_overrides,
2191
+ limit=limit,
2192
+ marker=_token,
2193
+ )
2194
+ _page = _resolve_path(_response, ("folders",))
2195
+ for _item in _page or []:
2196
+ yield _item
2197
+ _token = _resolve_path(_response, ("marker",))
2198
+ if not _token:
2199
+ break
2200
+
2201
+ def describe_users(
2202
+ self,
2203
+ *,
2204
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2205
+ authentication_token: Optional[
2206
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2207
+ ] = None,
2208
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
2209
+ user_ids: Optional["capo_workdocs.types.user_ids_type.UserIdsType"] = None,
2210
+ query: Optional["capo_workdocs.types.search_query_type.SearchQueryType"] = None,
2211
+ include: Optional["capo_workdocs.types.user_filter_type.UserFilterType"] = None,
2212
+ order: Optional["capo_workdocs.types.order_type.OrderType"] = None,
2213
+ sort: Optional["capo_workdocs.types.user_sort_type.UserSortType"] = None,
2214
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2215
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2216
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
2217
+ ) -> "capo_workdocs.types.describe_users_response.DescribeUsersResponse":
2218
+ r"""<p>Describes the specified users. You can describe all users or filter the results (for example, by status or organization).</p> <p>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.</p>
2219
+
2220
+ Args:
2221
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2222
+ organization_id: <p>The ID of the organization.</p>
2223
+ user_ids: <p>The IDs of the users.</p>
2224
+ query: <p>A query to filter users by user name. Remember the following about the <code>Userids</code> and <code>Query</code> parameters:</p> <ul> <li> <p>If you don't use either parameter, the API returns a paginated list of all users on the site.</p> </li> <li> <p>If you use both parameters, the API ignores the <code>Query</code> parameter.</p> </li> <li> <p>The <code>Userid</code> parameter only returns user names that match a corresponding user ID.</p> </li> <li> <p>The <code>Query</code> parameter runs a \"prefix\" search for users by the <code>GivenName</code>, <code>SurName</code>, or <code>UserName</code> fields included in a <a href=\"https://docs.aws.amazon.com/workdocs/latest/APIReference/API_CreateUser.html\">CreateUser</a> API call. For example, querying on <code>Ma</code> 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 <code>Ma J</code> only returns Mateo Jackson.</p> </li> </ul>
2225
+ include: <p>The state of the users. Specify \"ALL\" to include inactive users.</p>
2226
+ order: <p>The order for the results.</p>
2227
+ sort: <p>The sorting criteria.</p>
2228
+ marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
2229
+ limit: <p>The maximum number of items to return.</p>
2230
+ fields: <p>A comma-separated list of values. Specify \"STORAGE_METADATA\" to include the user storage quota and utilization information.</p>
2231
+
2232
+ Raises:
2233
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2234
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2235
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2236
+ capo_workdocs.errors.requested_entity_too_large_exception.RequestedEntityTooLargeException: <p>The response is too large to return. The request must include a filter to reduce the size of the response.</p>
2237
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2238
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2239
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2240
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2241
+ """
2242
+
2243
+ def _handler(
2244
+ req: "OperationRequest[capo_workdocs.types.describe_users_request.DescribeUsersRequest]",
2245
+ ) -> OperationResponse[
2246
+ "capo_workdocs.types.describe_users_response.DescribeUsersResponse"
2247
+ ]:
2248
+ import capo_workdocs._operations.aws_gorilla_boy_service.describe_users
2249
+
2250
+ output, http_response = (
2251
+ capo_workdocs._operations.aws_gorilla_boy_service.describe_users.describe_users(
2252
+ req.options, req.input
2253
+ )
2254
+ )
2255
+ return OperationResponse(output=output, response=http_response)
2256
+
2257
+ interceptors_, options_ = self.operation_options(config_overrides)
2258
+ input_: capo_workdocs.types.describe_users_request.DescribeUsersRequest = {}
2259
+ if authentication_token is not None:
2260
+ input_["authentication_token"] = authentication_token
2261
+ if organization_id is not None:
2262
+ input_["organization_id"] = organization_id
2263
+ if user_ids is not None:
2264
+ input_["user_ids"] = user_ids
2265
+ if query is not None:
2266
+ input_["query"] = query
2267
+ if include is not None:
2268
+ input_["include"] = include
2269
+ if order is not None:
2270
+ input_["order"] = order
2271
+ if sort is not None:
2272
+ input_["sort"] = sort
2273
+ if marker is not None:
2274
+ input_["marker"] = marker
2275
+ if limit is not None:
2276
+ input_["limit"] = limit
2277
+ if fields is not None:
2278
+ input_["fields"] = fields
2279
+
2280
+ response = execute_pipeline(
2281
+ OperationRequest(input=input_, options=options_),
2282
+ handler=_handler,
2283
+ interceptors=list(interceptors_),
2284
+ )
2285
+ response.response.close()
2286
+ return response.output
2287
+
2288
+ def iter_describe_users(
2289
+ self,
2290
+ *,
2291
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2292
+ authentication_token: Optional[
2293
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2294
+ ] = None,
2295
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
2296
+ user_ids: Optional["capo_workdocs.types.user_ids_type.UserIdsType"] = None,
2297
+ query: Optional["capo_workdocs.types.search_query_type.SearchQueryType"] = None,
2298
+ include: Optional["capo_workdocs.types.user_filter_type.UserFilterType"] = None,
2299
+ order: Optional["capo_workdocs.types.order_type.OrderType"] = None,
2300
+ sort: Optional["capo_workdocs.types.user_sort_type.UserSortType"] = None,
2301
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2302
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2303
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
2304
+ ) -> "Iterator[capo_workdocs.types.user.User]":
2305
+ _token = marker
2306
+ while True:
2307
+ _response = self.describe_users(
2308
+ config_overrides=config_overrides,
2309
+ authentication_token=authentication_token,
2310
+ organization_id=organization_id,
2311
+ user_ids=user_ids,
2312
+ query=query,
2313
+ include=include,
2314
+ order=order,
2315
+ sort=sort,
2316
+ marker=_token,
2317
+ limit=limit,
2318
+ fields=fields,
2319
+ )
2320
+ _page = _resolve_path(_response, ("users",))
2321
+ for _item in _page or []:
2322
+ yield _item
2323
+ _token = _resolve_path(_response, ("marker",))
2324
+ if not _token:
2325
+ break
2326
+
2327
+ def get_current_user(
2328
+ self,
2329
+ authentication_token: "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType",
2330
+ *,
2331
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2332
+ ) -> "capo_workdocs.types.get_current_user_response.GetCurrentUserResponse":
2333
+ r"""<p>Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href=\"https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html\">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
2334
+
2335
+ Args:
2336
+ authentication_token: <p>Amazon WorkDocs authentication token.</p>
2337
+
2338
+ Raises:
2339
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2340
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2341
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2342
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2343
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2344
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2345
+ """
2346
+
2347
+ def _handler(
2348
+ req: "OperationRequest[capo_workdocs.types.get_current_user_request.GetCurrentUserRequest]",
2349
+ ) -> OperationResponse[
2350
+ "capo_workdocs.types.get_current_user_response.GetCurrentUserResponse"
2351
+ ]:
2352
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_current_user
2353
+
2354
+ output, http_response = (
2355
+ capo_workdocs._operations.aws_gorilla_boy_service.get_current_user.get_current_user(
2356
+ req.options, req.input
2357
+ )
2358
+ )
2359
+ return OperationResponse(output=output, response=http_response)
2360
+
2361
+ interceptors_, options_ = self.operation_options(config_overrides)
2362
+ input_: capo_workdocs.types.get_current_user_request.GetCurrentUserRequest = {
2363
+ "authentication_token": authentication_token
2364
+ }
2365
+
2366
+ response = execute_pipeline(
2367
+ OperationRequest(input=input_, options=options_),
2368
+ handler=_handler,
2369
+ interceptors=list(interceptors_),
2370
+ )
2371
+ response.response.close()
2372
+ return response.output
2373
+
2374
+ def get_document(
2375
+ self,
2376
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2377
+ *,
2378
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2379
+ authentication_token: Optional[
2380
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2381
+ ] = None,
2382
+ include_custom_metadata: Optional[
2383
+ "capo_workdocs.types.boolean_type.BooleanType"
2384
+ ] = None,
2385
+ ) -> "capo_workdocs.types.get_document_response.GetDocumentResponse":
2386
+ """<p>Retrieves details of a document.</p>
2387
+
2388
+ Args:
2389
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2390
+ document_id: <p>The ID of the document.</p>
2391
+ include_custom_metadata: <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
2392
+
2393
+ Raises:
2394
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2395
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2396
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2397
+ capo_workdocs.errors.invalid_password_exception.InvalidPasswordException: <p>The password is invalid.</p>
2398
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2399
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2400
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2401
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2402
+ """
2403
+
2404
+ def _handler(
2405
+ req: "OperationRequest[capo_workdocs.types.get_document_request.GetDocumentRequest]",
2406
+ ) -> OperationResponse[
2407
+ "capo_workdocs.types.get_document_response.GetDocumentResponse"
2408
+ ]:
2409
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_document
2410
+
2411
+ output, http_response = (
2412
+ capo_workdocs._operations.aws_gorilla_boy_service.get_document.get_document(
2413
+ req.options, req.input
2414
+ )
2415
+ )
2416
+ return OperationResponse(output=output, response=http_response)
2417
+
2418
+ interceptors_, options_ = self.operation_options(config_overrides)
2419
+ input_: capo_workdocs.types.get_document_request.GetDocumentRequest = {
2420
+ "document_id": document_id
2421
+ }
2422
+ if authentication_token is not None:
2423
+ input_["authentication_token"] = authentication_token
2424
+ if include_custom_metadata is not None:
2425
+ input_["include_custom_metadata"] = include_custom_metadata
2426
+
2427
+ response = execute_pipeline(
2428
+ OperationRequest(input=input_, options=options_),
2429
+ handler=_handler,
2430
+ interceptors=list(interceptors_),
2431
+ )
2432
+ response.response.close()
2433
+ return response.output
2434
+
2435
+ def get_document_path(
2436
+ self,
2437
+ document_id: "capo_workdocs.types.id_type.IdType",
2438
+ *,
2439
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2440
+ authentication_token: Optional[
2441
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2442
+ ] = None,
2443
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2444
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
2445
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2446
+ ) -> "capo_workdocs.types.get_document_path_response.GetDocumentPathResponse":
2447
+ """<p>Retrieves the path information (the hierarchy from the root folder) for the requested document.</p> <p>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.</p>
2448
+
2449
+ Args:
2450
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2451
+ document_id: <p>The ID of the document.</p>
2452
+ limit: <p>The maximum number of levels in the hierarchy to return.</p>
2453
+ fields: <p>A comma-separated list of values. Specify <code>NAME</code> to include the names of the parent folders.</p>
2454
+ marker: <p>This value is not supported.</p>
2455
+
2456
+ Raises:
2457
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2458
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2459
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2460
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2461
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2462
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2463
+ """
2464
+
2465
+ def _handler(
2466
+ req: "OperationRequest[capo_workdocs.types.get_document_path_request.GetDocumentPathRequest]",
2467
+ ) -> OperationResponse[
2468
+ "capo_workdocs.types.get_document_path_response.GetDocumentPathResponse"
2469
+ ]:
2470
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_document_path
2471
+
2472
+ output, http_response = (
2473
+ capo_workdocs._operations.aws_gorilla_boy_service.get_document_path.get_document_path(
2474
+ req.options, req.input
2475
+ )
2476
+ )
2477
+ return OperationResponse(output=output, response=http_response)
2478
+
2479
+ interceptors_, options_ = self.operation_options(config_overrides)
2480
+ input_: capo_workdocs.types.get_document_path_request.GetDocumentPathRequest = {
2481
+ "document_id": document_id
2482
+ }
2483
+ if authentication_token is not None:
2484
+ input_["authentication_token"] = authentication_token
2485
+ if limit is not None:
2486
+ input_["limit"] = limit
2487
+ if fields is not None:
2488
+ input_["fields"] = fields
2489
+ if marker is not None:
2490
+ input_["marker"] = marker
2491
+
2492
+ response = execute_pipeline(
2493
+ OperationRequest(input=input_, options=options_),
2494
+ handler=_handler,
2495
+ interceptors=list(interceptors_),
2496
+ )
2497
+ response.response.close()
2498
+ return response.output
2499
+
2500
+ def get_document_version(
2501
+ self,
2502
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2503
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
2504
+ *,
2505
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2506
+ authentication_token: Optional[
2507
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2508
+ ] = None,
2509
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
2510
+ include_custom_metadata: Optional[
2511
+ "capo_workdocs.types.boolean_type.BooleanType"
2512
+ ] = None,
2513
+ ) -> "capo_workdocs.types.get_document_version_response.GetDocumentVersionResponse":
2514
+ r"""<p>Retrieves version metadata for the specified document.</p>
2515
+
2516
+ Args:
2517
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2518
+ document_id: <p>The ID of the document.</p>
2519
+ version_id: <p>The version ID of the document.</p>
2520
+ fields: <p>A comma-separated list of values. Specify \"SOURCE\" to include a URL for the source document.</p>
2521
+ include_custom_metadata: <p>Set this to TRUE to include custom metadata in the response.</p>
2522
+
2523
+ Raises:
2524
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2525
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2526
+ capo_workdocs.errors.invalid_password_exception.InvalidPasswordException: <p>The password is invalid.</p>
2527
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
2528
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2529
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2530
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2531
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2532
+ """
2533
+
2534
+ def _handler(
2535
+ req: "OperationRequest[capo_workdocs.types.get_document_version_request.GetDocumentVersionRequest]",
2536
+ ) -> OperationResponse[
2537
+ "capo_workdocs.types.get_document_version_response.GetDocumentVersionResponse"
2538
+ ]:
2539
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_document_version
2540
+
2541
+ output, http_response = (
2542
+ capo_workdocs._operations.aws_gorilla_boy_service.get_document_version.get_document_version(
2543
+ req.options, req.input
2544
+ )
2545
+ )
2546
+ return OperationResponse(output=output, response=http_response)
2547
+
2548
+ interceptors_, options_ = self.operation_options(config_overrides)
2549
+ input_: capo_workdocs.types.get_document_version_request.GetDocumentVersionRequest = {
2550
+ "document_id": document_id,
2551
+ "version_id": version_id,
2552
+ }
2553
+ if authentication_token is not None:
2554
+ input_["authentication_token"] = authentication_token
2555
+ if fields is not None:
2556
+ input_["fields"] = fields
2557
+ if include_custom_metadata is not None:
2558
+ input_["include_custom_metadata"] = include_custom_metadata
2559
+
2560
+ response = execute_pipeline(
2561
+ OperationRequest(input=input_, options=options_),
2562
+ handler=_handler,
2563
+ interceptors=list(interceptors_),
2564
+ )
2565
+ response.response.close()
2566
+ return response.output
2567
+
2568
+ def get_folder(
2569
+ self,
2570
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2571
+ *,
2572
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2573
+ authentication_token: Optional[
2574
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2575
+ ] = None,
2576
+ include_custom_metadata: Optional[
2577
+ "capo_workdocs.types.boolean_type.BooleanType"
2578
+ ] = None,
2579
+ ) -> "capo_workdocs.types.get_folder_response.GetFolderResponse":
2580
+ """<p>Retrieves the metadata of the specified folder.</p>
2581
+
2582
+ Args:
2583
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2584
+ folder_id: <p>The ID of the folder.</p>
2585
+ include_custom_metadata: <p>Set to TRUE to include custom metadata in the response.</p>
2586
+
2587
+ Raises:
2588
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2589
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2590
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2591
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
2592
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2593
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2594
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2595
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2596
+ """
2597
+
2598
+ def _handler(
2599
+ req: "OperationRequest[capo_workdocs.types.get_folder_request.GetFolderRequest]",
2600
+ ) -> OperationResponse[
2601
+ "capo_workdocs.types.get_folder_response.GetFolderResponse"
2602
+ ]:
2603
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_folder
2604
+
2605
+ output, http_response = (
2606
+ capo_workdocs._operations.aws_gorilla_boy_service.get_folder.get_folder(
2607
+ req.options, req.input
2608
+ )
2609
+ )
2610
+ return OperationResponse(output=output, response=http_response)
2611
+
2612
+ interceptors_, options_ = self.operation_options(config_overrides)
2613
+ input_: capo_workdocs.types.get_folder_request.GetFolderRequest = {
2614
+ "folder_id": folder_id
2615
+ }
2616
+ if authentication_token is not None:
2617
+ input_["authentication_token"] = authentication_token
2618
+ if include_custom_metadata is not None:
2619
+ input_["include_custom_metadata"] = include_custom_metadata
2620
+
2621
+ response = execute_pipeline(
2622
+ OperationRequest(input=input_, options=options_),
2623
+ handler=_handler,
2624
+ interceptors=list(interceptors_),
2625
+ )
2626
+ response.response.close()
2627
+ return response.output
2628
+
2629
+ def get_folder_path(
2630
+ self,
2631
+ folder_id: "capo_workdocs.types.id_type.IdType",
2632
+ *,
2633
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2634
+ authentication_token: Optional[
2635
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2636
+ ] = None,
2637
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2638
+ fields: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
2639
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2640
+ ) -> "capo_workdocs.types.get_folder_path_response.GetFolderPathResponse":
2641
+ r"""<p>Retrieves the path information (the hierarchy from the root folder) for the specified folder.</p> <p>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.</p>
2642
+
2643
+ Args:
2644
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2645
+ folder_id: <p>The ID of the folder.</p>
2646
+ limit: <p>The maximum number of levels in the hierarchy to return.</p>
2647
+ fields: <p>A comma-separated list of values. Specify \"NAME\" to include the names of the parent folders.</p>
2648
+ marker: <p>This value is not supported.</p>
2649
+
2650
+ Raises:
2651
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2652
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2653
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2654
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2655
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2656
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2657
+ """
2658
+
2659
+ def _handler(
2660
+ req: "OperationRequest[capo_workdocs.types.get_folder_path_request.GetFolderPathRequest]",
2661
+ ) -> OperationResponse[
2662
+ "capo_workdocs.types.get_folder_path_response.GetFolderPathResponse"
2663
+ ]:
2664
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_folder_path
2665
+
2666
+ output, http_response = (
2667
+ capo_workdocs._operations.aws_gorilla_boy_service.get_folder_path.get_folder_path(
2668
+ req.options, req.input
2669
+ )
2670
+ )
2671
+ return OperationResponse(output=output, response=http_response)
2672
+
2673
+ interceptors_, options_ = self.operation_options(config_overrides)
2674
+ input_: capo_workdocs.types.get_folder_path_request.GetFolderPathRequest = {
2675
+ "folder_id": folder_id
2676
+ }
2677
+ if authentication_token is not None:
2678
+ input_["authentication_token"] = authentication_token
2679
+ if limit is not None:
2680
+ input_["limit"] = limit
2681
+ if fields is not None:
2682
+ input_["fields"] = fields
2683
+ if marker is not None:
2684
+ input_["marker"] = marker
2685
+
2686
+ response = execute_pipeline(
2687
+ OperationRequest(input=input_, options=options_),
2688
+ handler=_handler,
2689
+ interceptors=list(interceptors_),
2690
+ )
2691
+ response.response.close()
2692
+ return response.output
2693
+
2694
+ def get_resources(
2695
+ self,
2696
+ *,
2697
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2698
+ authentication_token: Optional[
2699
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2700
+ ] = None,
2701
+ user_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
2702
+ collection_type: Optional[
2703
+ "capo_workdocs.types.resource_collection_type.ResourceCollectionType"
2704
+ ] = None,
2705
+ limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
2706
+ marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
2707
+ ) -> "capo_workdocs.types.get_resources_response.GetResourcesResponse":
2708
+ """<p>Retrieves a collection of resources, including folders and documents. The only <code>CollectionType</code> supported is <code>SHARED_WITH_ME</code>.</p>
2709
+
2710
+ Args:
2711
+ authentication_token: <p>The Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2712
+ user_id: <p>The user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials.</p>
2713
+ collection_type: <p>The collection type.</p>
2714
+ limit: <p>The maximum number of resources to return.</p>
2715
+ marker: <p>The marker for the next set of results. This marker was received from a previous call.</p>
2716
+
2717
+ Raises:
2718
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2719
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2720
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2721
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2722
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2723
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2724
+ """
2725
+
2726
+ def _handler(
2727
+ req: "OperationRequest[capo_workdocs.types.get_resources_request.GetResourcesRequest]",
2728
+ ) -> OperationResponse[
2729
+ "capo_workdocs.types.get_resources_response.GetResourcesResponse"
2730
+ ]:
2731
+ import capo_workdocs._operations.aws_gorilla_boy_service.get_resources
2732
+
2733
+ output, http_response = (
2734
+ capo_workdocs._operations.aws_gorilla_boy_service.get_resources.get_resources(
2735
+ req.options, req.input
2736
+ )
2737
+ )
2738
+ return OperationResponse(output=output, response=http_response)
2739
+
2740
+ interceptors_, options_ = self.operation_options(config_overrides)
2741
+ input_: capo_workdocs.types.get_resources_request.GetResourcesRequest = {}
2742
+ if authentication_token is not None:
2743
+ input_["authentication_token"] = authentication_token
2744
+ if user_id is not None:
2745
+ input_["user_id"] = user_id
2746
+ if collection_type is not None:
2747
+ input_["collection_type"] = collection_type
2748
+ if limit is not None:
2749
+ input_["limit"] = limit
2750
+ if marker is not None:
2751
+ input_["marker"] = marker
2752
+
2753
+ response = execute_pipeline(
2754
+ OperationRequest(input=input_, options=options_),
2755
+ handler=_handler,
2756
+ interceptors=list(interceptors_),
2757
+ )
2758
+ response.response.close()
2759
+ return response.output
2760
+
2761
+ def initiate_document_version_upload(
2762
+ self,
2763
+ *,
2764
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2765
+ authentication_token: Optional[
2766
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2767
+ ] = None,
2768
+ id: Optional["capo_workdocs.types.resource_id_type.ResourceIdType"] = None,
2769
+ name: Optional[
2770
+ "capo_workdocs.types.resource_name_type.ResourceNameType"
2771
+ ] = None,
2772
+ content_created_timestamp: Optional[
2773
+ "capo_workdocs.types.timestamp_type.TimestampType"
2774
+ ] = None,
2775
+ content_modified_timestamp: Optional[
2776
+ "capo_workdocs.types.timestamp_type.TimestampType"
2777
+ ] = None,
2778
+ content_type: Optional[
2779
+ "capo_workdocs.types.document_content_type.DocumentContentType"
2780
+ ] = None,
2781
+ document_size_in_bytes: Optional[
2782
+ "capo_workdocs.types.size_type.SizeType"
2783
+ ] = None,
2784
+ parent_folder_id: Optional[
2785
+ "capo_workdocs.types.resource_id_type.ResourceIdType"
2786
+ ] = None,
2787
+ ) -> "capo_workdocs.types.initiate_document_version_upload_response.InitiateDocumentVersionUploadResponse":
2788
+ """<p>Creates a new document object and version object.</p> <p>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 <a>UpdateDocumentVersion</a>.</p> <p>To cancel the document upload, call <a>AbortDocumentVersionUpload</a>.</p>
2789
+
2790
+ Args:
2791
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2792
+ id: <p>The ID of the document.</p>
2793
+ name: <p>The name of the document.</p>
2794
+ content_created_timestamp: <p>The timestamp when the content of the document was originally created.</p>
2795
+ content_modified_timestamp: <p>The timestamp when the content of the document was modified.</p>
2796
+ content_type: <p>The content type of the document.</p>
2797
+ document_size_in_bytes: <p>The size of the document, in bytes.</p>
2798
+ parent_folder_id: <p>The ID of the parent folder.</p>
2799
+
2800
+ Raises:
2801
+ capo_workdocs.errors.draft_upload_out_of_sync_exception.DraftUploadOutOfSyncException: <p>This exception is thrown when a valid checkout ID is not presented on document version upload calls for a document that has been checked out from Web client.</p>
2802
+ capo_workdocs.errors.entity_already_exists_exception.EntityAlreadyExistsException: <p>The resource already exists.</p>
2803
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2804
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2805
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
2806
+ capo_workdocs.errors.invalid_password_exception.InvalidPasswordException: <p>The password is invalid.</p>
2807
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
2808
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
2809
+ capo_workdocs.errors.resource_already_checked_out_exception.ResourceAlreadyCheckedOutException: <p>The resource is already checked out.</p>
2810
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2811
+ capo_workdocs.errors.storage_limit_exceeded_exception.StorageLimitExceededException: <p>The storage limit has been exceeded.</p>
2812
+ capo_workdocs.errors.storage_limit_will_exceed_exception.StorageLimitWillExceedException: <p>The storage limit will be exceeded.</p>
2813
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2814
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2815
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2816
+ """
2817
+
2818
+ def _handler(
2819
+ req: "OperationRequest[capo_workdocs.types.initiate_document_version_upload_request.InitiateDocumentVersionUploadRequest]",
2820
+ ) -> OperationResponse[
2821
+ "capo_workdocs.types.initiate_document_version_upload_response.InitiateDocumentVersionUploadResponse"
2822
+ ]:
2823
+ import capo_workdocs._operations.aws_gorilla_boy_service.initiate_document_version_upload
2824
+
2825
+ output, http_response = (
2826
+ capo_workdocs._operations.aws_gorilla_boy_service.initiate_document_version_upload.initiate_document_version_upload(
2827
+ req.options, req.input
2828
+ )
2829
+ )
2830
+ return OperationResponse(output=output, response=http_response)
2831
+
2832
+ interceptors_, options_ = self.operation_options(config_overrides)
2833
+ input_: capo_workdocs.types.initiate_document_version_upload_request.InitiateDocumentVersionUploadRequest = {}
2834
+ if authentication_token is not None:
2835
+ input_["authentication_token"] = authentication_token
2836
+ if id is not None:
2837
+ input_["id"] = id
2838
+ if name is not None:
2839
+ input_["name"] = name
2840
+ if content_created_timestamp is not None:
2841
+ input_["content_created_timestamp"] = content_created_timestamp
2842
+ if content_modified_timestamp is not None:
2843
+ input_["content_modified_timestamp"] = content_modified_timestamp
2844
+ if content_type is not None:
2845
+ input_["content_type"] = content_type
2846
+ if document_size_in_bytes is not None:
2847
+ input_["document_size_in_bytes"] = document_size_in_bytes
2848
+ if parent_folder_id is not None:
2849
+ input_["parent_folder_id"] = parent_folder_id
2850
+
2851
+ response = execute_pipeline(
2852
+ OperationRequest(input=input_, options=options_),
2853
+ handler=_handler,
2854
+ interceptors=list(interceptors_),
2855
+ )
2856
+ response.response.close()
2857
+ return response.output
2858
+
2859
+ def remove_all_resource_permissions(
2860
+ self,
2861
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2862
+ *,
2863
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2864
+ authentication_token: Optional[
2865
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2866
+ ] = None,
2867
+ ) -> None:
2868
+ """<p>Removes all the permissions from the specified resource.</p>
2869
+
2870
+ Args:
2871
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2872
+ resource_id: <p>The ID of the resource.</p>
2873
+
2874
+ Raises:
2875
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2876
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2877
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2878
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2879
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2880
+ """
2881
+
2882
+ def _handler(
2883
+ req: "OperationRequest[capo_workdocs.types.remove_all_resource_permissions_request.RemoveAllResourcePermissionsRequest]",
2884
+ ) -> OperationResponse[None]:
2885
+ import capo_workdocs._operations.aws_gorilla_boy_service.remove_all_resource_permissions
2886
+
2887
+ output, http_response = (
2888
+ capo_workdocs._operations.aws_gorilla_boy_service.remove_all_resource_permissions.remove_all_resource_permissions(
2889
+ req.options, req.input
2890
+ )
2891
+ )
2892
+ return OperationResponse(output=output, response=http_response)
2893
+
2894
+ interceptors_, options_ = self.operation_options(config_overrides)
2895
+ input_: capo_workdocs.types.remove_all_resource_permissions_request.RemoveAllResourcePermissionsRequest = {
2896
+ "resource_id": resource_id
2897
+ }
2898
+ if authentication_token is not None:
2899
+ input_["authentication_token"] = authentication_token
2900
+
2901
+ response = execute_pipeline(
2902
+ OperationRequest(input=input_, options=options_),
2903
+ handler=_handler,
2904
+ interceptors=list(interceptors_),
2905
+ )
2906
+ response.response.close()
2907
+ return response.output
2908
+
2909
+ def remove_resource_permission(
2910
+ self,
2911
+ resource_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2912
+ principal_id: "capo_workdocs.types.id_type.IdType",
2913
+ *,
2914
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2915
+ authentication_token: Optional[
2916
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2917
+ ] = None,
2918
+ principal_type: Optional[
2919
+ "capo_workdocs.types.principal_type.PrincipalType"
2920
+ ] = None,
2921
+ ) -> None:
2922
+ """<p>Removes the permission for the specified principal from the specified resource.</p>
2923
+
2924
+ Args:
2925
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2926
+ resource_id: <p>The ID of the resource.</p>
2927
+ principal_id: <p>The principal ID of the resource.</p>
2928
+ principal_type: <p>The principal type of the resource.</p>
2929
+
2930
+ Raises:
2931
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2932
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
2933
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2934
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2935
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2936
+ """
2937
+
2938
+ def _handler(
2939
+ req: "OperationRequest[capo_workdocs.types.remove_resource_permission_request.RemoveResourcePermissionRequest]",
2940
+ ) -> OperationResponse[None]:
2941
+ import capo_workdocs._operations.aws_gorilla_boy_service.remove_resource_permission
2942
+
2943
+ output, http_response = (
2944
+ capo_workdocs._operations.aws_gorilla_boy_service.remove_resource_permission.remove_resource_permission(
2945
+ req.options, req.input
2946
+ )
2947
+ )
2948
+ return OperationResponse(output=output, response=http_response)
2949
+
2950
+ interceptors_, options_ = self.operation_options(config_overrides)
2951
+ input_: capo_workdocs.types.remove_resource_permission_request.RemoveResourcePermissionRequest = {
2952
+ "resource_id": resource_id,
2953
+ "principal_id": principal_id,
2954
+ }
2955
+ if authentication_token is not None:
2956
+ input_["authentication_token"] = authentication_token
2957
+ if principal_type is not None:
2958
+ input_["principal_type"] = principal_type
2959
+
2960
+ response = execute_pipeline(
2961
+ OperationRequest(input=input_, options=options_),
2962
+ handler=_handler,
2963
+ interceptors=list(interceptors_),
2964
+ )
2965
+ response.response.close()
2966
+ return response.output
2967
+
2968
+ def restore_document_versions(
2969
+ self,
2970
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
2971
+ *,
2972
+ config_overrides: Optional[WorkDocsClientConfig] = None,
2973
+ authentication_token: Optional[
2974
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
2975
+ ] = None,
2976
+ ) -> None:
2977
+ """<p>Recovers a deleted version of an Amazon WorkDocs document.</p>
2978
+
2979
+ Args:
2980
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
2981
+ document_id: <p>The ID of the document.</p>
2982
+
2983
+ Raises:
2984
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
2985
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
2986
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
2987
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2988
+ capo_workdocs.errors.invalid_operation_exception.InvalidOperationException: <p>The operation is invalid.</p>
2989
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
2990
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
2991
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
2992
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
2993
+ """
2994
+
2995
+ def _handler(
2996
+ req: "OperationRequest[capo_workdocs.types.restore_document_versions_request.RestoreDocumentVersionsRequest]",
2997
+ ) -> OperationResponse[None]:
2998
+ import capo_workdocs._operations.aws_gorilla_boy_service.restore_document_versions
2999
+
3000
+ output, http_response = (
3001
+ capo_workdocs._operations.aws_gorilla_boy_service.restore_document_versions.restore_document_versions(
3002
+ req.options, req.input
3003
+ )
3004
+ )
3005
+ return OperationResponse(output=output, response=http_response)
3006
+
3007
+ interceptors_, options_ = self.operation_options(config_overrides)
3008
+ input_: capo_workdocs.types.restore_document_versions_request.RestoreDocumentVersionsRequest = {
3009
+ "document_id": document_id
3010
+ }
3011
+ if authentication_token is not None:
3012
+ input_["authentication_token"] = authentication_token
3013
+
3014
+ response = execute_pipeline(
3015
+ OperationRequest(input=input_, options=options_),
3016
+ handler=_handler,
3017
+ interceptors=list(interceptors_),
3018
+ )
3019
+ response.response.close()
3020
+ return response.output
3021
+
3022
+ def search_resources(
3023
+ self,
3024
+ *,
3025
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3026
+ authentication_token: Optional[
3027
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3028
+ ] = None,
3029
+ query_text: Optional[
3030
+ "capo_workdocs.types.search_query_type.SearchQueryType"
3031
+ ] = None,
3032
+ query_scopes: Optional[
3033
+ "capo_workdocs.types.search_query_scope_type_list.SearchQueryScopeTypeList"
3034
+ ] = None,
3035
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
3036
+ additional_response_fields: Optional[
3037
+ "capo_workdocs.types.additional_response_fields_list.AdditionalResponseFieldsList"
3038
+ ] = None,
3039
+ filters: Optional["capo_workdocs.types.filters.Filters"] = None,
3040
+ order_by: Optional[
3041
+ "capo_workdocs.types.search_result_sort_list.SearchResultSortList"
3042
+ ] = None,
3043
+ limit: Optional[
3044
+ "capo_workdocs.types.search_results_limit_type.SearchResultsLimitType"
3045
+ ] = None,
3046
+ marker: Optional["capo_workdocs.types.next_marker_type.NextMarkerType"] = None,
3047
+ ) -> "capo_workdocs.types.search_resources_response.SearchResourcesResponse":
3048
+ """<p>Searches metadata and the content of folders, documents, document versions, and comments.</p>
3049
+
3050
+ Args:
3051
+ authentication_token: <p>WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
3052
+ query_text: <p>The String to search for. Searches across different text fields based on request parameters. Use double quotes around the query string for exact phrase matches.</p>
3053
+ query_scopes: <p>Filter based on the text field type. A Folder has only a name and no content. A Comment has only content and no name. A Document or Document Version has a name and content</p>
3054
+ organization_id: <p>Filters based on the resource owner OrgId. This is a mandatory parameter when using Admin SigV4 credentials.</p>
3055
+ additional_response_fields: <p>A list of attributes to include in the response. Used to request fields that are not normally returned in a standard response.</p>
3056
+ filters: <p>Filters results based on entity metadata.</p>
3057
+ order_by: <p>Order by results in one or more categories.</p>
3058
+ limit: <p>Max results count per page.</p>
3059
+ marker: <p>The marker for the next set of results.</p>
3060
+
3061
+ Raises:
3062
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
3063
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
3064
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
3065
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
3066
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
3067
+ """
3068
+
3069
+ def _handler(
3070
+ req: "OperationRequest[capo_workdocs.types.search_resources_request.SearchResourcesRequest]",
3071
+ ) -> OperationResponse[
3072
+ "capo_workdocs.types.search_resources_response.SearchResourcesResponse"
3073
+ ]:
3074
+ import capo_workdocs._operations.aws_gorilla_boy_service.search_resources
3075
+
3076
+ output, http_response = (
3077
+ capo_workdocs._operations.aws_gorilla_boy_service.search_resources.search_resources(
3078
+ req.options, req.input
3079
+ )
3080
+ )
3081
+ return OperationResponse(output=output, response=http_response)
3082
+
3083
+ interceptors_, options_ = self.operation_options(config_overrides)
3084
+ input_: capo_workdocs.types.search_resources_request.SearchResourcesRequest = {}
3085
+ if authentication_token is not None:
3086
+ input_["authentication_token"] = authentication_token
3087
+ if query_text is not None:
3088
+ input_["query_text"] = query_text
3089
+ if query_scopes is not None:
3090
+ input_["query_scopes"] = query_scopes
3091
+ if organization_id is not None:
3092
+ input_["organization_id"] = organization_id
3093
+ if additional_response_fields is not None:
3094
+ input_["additional_response_fields"] = additional_response_fields
3095
+ if filters is not None:
3096
+ input_["filters"] = filters
3097
+ if order_by is not None:
3098
+ input_["order_by"] = order_by
3099
+ if limit is not None:
3100
+ input_["limit"] = limit
3101
+ if marker is not None:
3102
+ input_["marker"] = marker
3103
+
3104
+ response = execute_pipeline(
3105
+ OperationRequest(input=input_, options=options_),
3106
+ handler=_handler,
3107
+ interceptors=list(interceptors_),
3108
+ )
3109
+ response.response.close()
3110
+ return response.output
3111
+
3112
+ def iter_search_resources(
3113
+ self,
3114
+ *,
3115
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3116
+ authentication_token: Optional[
3117
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3118
+ ] = None,
3119
+ query_text: Optional[
3120
+ "capo_workdocs.types.search_query_type.SearchQueryType"
3121
+ ] = None,
3122
+ query_scopes: Optional[
3123
+ "capo_workdocs.types.search_query_scope_type_list.SearchQueryScopeTypeList"
3124
+ ] = None,
3125
+ organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
3126
+ additional_response_fields: Optional[
3127
+ "capo_workdocs.types.additional_response_fields_list.AdditionalResponseFieldsList"
3128
+ ] = None,
3129
+ filters: Optional["capo_workdocs.types.filters.Filters"] = None,
3130
+ order_by: Optional[
3131
+ "capo_workdocs.types.search_result_sort_list.SearchResultSortList"
3132
+ ] = None,
3133
+ limit: Optional[
3134
+ "capo_workdocs.types.search_results_limit_type.SearchResultsLimitType"
3135
+ ] = None,
3136
+ marker: Optional["capo_workdocs.types.next_marker_type.NextMarkerType"] = None,
3137
+ ) -> "Iterator[capo_workdocs.types.response_item.ResponseItem]":
3138
+ _token = marker
3139
+ while True:
3140
+ _response = self.search_resources(
3141
+ config_overrides=config_overrides,
3142
+ authentication_token=authentication_token,
3143
+ query_text=query_text,
3144
+ query_scopes=query_scopes,
3145
+ organization_id=organization_id,
3146
+ additional_response_fields=additional_response_fields,
3147
+ filters=filters,
3148
+ order_by=order_by,
3149
+ limit=limit,
3150
+ marker=_token,
3151
+ )
3152
+ _page = _resolve_path(_response, ("items",))
3153
+ for _item in _page or []:
3154
+ yield _item
3155
+ _token = _resolve_path(_response, ("marker",))
3156
+ if not _token:
3157
+ break
3158
+
3159
+ def update_document(
3160
+ self,
3161
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
3162
+ *,
3163
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3164
+ authentication_token: Optional[
3165
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3166
+ ] = None,
3167
+ name: Optional[
3168
+ "capo_workdocs.types.resource_name_type.ResourceNameType"
3169
+ ] = None,
3170
+ parent_folder_id: Optional[
3171
+ "capo_workdocs.types.resource_id_type.ResourceIdType"
3172
+ ] = None,
3173
+ resource_state: Optional[
3174
+ "capo_workdocs.types.resource_state_type.ResourceStateType"
3175
+ ] = None,
3176
+ ) -> None:
3177
+ """<p>Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.</p>
3178
+
3179
+ Args:
3180
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
3181
+ document_id: <p>The ID of the document.</p>
3182
+ name: <p>The name of the document.</p>
3183
+ parent_folder_id: <p>The ID of the parent folder.</p>
3184
+ resource_state: <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
3185
+
3186
+ Raises:
3187
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
3188
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
3189
+ capo_workdocs.errors.entity_already_exists_exception.EntityAlreadyExistsException: <p>The resource already exists.</p>
3190
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
3191
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3192
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
3193
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
3194
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
3195
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
3196
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
3197
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
3198
+ """
3199
+
3200
+ def _handler(
3201
+ req: "OperationRequest[capo_workdocs.types.update_document_request.UpdateDocumentRequest]",
3202
+ ) -> OperationResponse[None]:
3203
+ import capo_workdocs._operations.aws_gorilla_boy_service.update_document
3204
+
3205
+ output, http_response = (
3206
+ capo_workdocs._operations.aws_gorilla_boy_service.update_document.update_document(
3207
+ req.options, req.input
3208
+ )
3209
+ )
3210
+ return OperationResponse(output=output, response=http_response)
3211
+
3212
+ interceptors_, options_ = self.operation_options(config_overrides)
3213
+ input_: capo_workdocs.types.update_document_request.UpdateDocumentRequest = {
3214
+ "document_id": document_id
3215
+ }
3216
+ if authentication_token is not None:
3217
+ input_["authentication_token"] = authentication_token
3218
+ if name is not None:
3219
+ input_["name"] = name
3220
+ if parent_folder_id is not None:
3221
+ input_["parent_folder_id"] = parent_folder_id
3222
+ if resource_state is not None:
3223
+ input_["resource_state"] = resource_state
3224
+
3225
+ response = execute_pipeline(
3226
+ OperationRequest(input=input_, options=options_),
3227
+ handler=_handler,
3228
+ interceptors=list(interceptors_),
3229
+ )
3230
+ response.response.close()
3231
+ return response.output
3232
+
3233
+ def update_document_version(
3234
+ self,
3235
+ document_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
3236
+ version_id: "capo_workdocs.types.document_version_id_type.DocumentVersionIdType",
3237
+ *,
3238
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3239
+ authentication_token: Optional[
3240
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3241
+ ] = None,
3242
+ version_status: Optional[
3243
+ "capo_workdocs.types.document_version_status.DocumentVersionStatus"
3244
+ ] = None,
3245
+ ) -> None:
3246
+ """<p>Changes the status of the document version to ACTIVE. </p> <p>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 <a>InitiateDocumentVersionUpload</a>. </p>
3247
+
3248
+ Args:
3249
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
3250
+ document_id: <p>The ID of the document.</p>
3251
+ version_id: <p>The version ID of the document.</p>
3252
+ version_status: <p>The status of the version.</p>
3253
+
3254
+ Raises:
3255
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
3256
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
3257
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3258
+ capo_workdocs.errors.invalid_operation_exception.InvalidOperationException: <p>The operation is invalid.</p>
3259
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
3260
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
3261
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
3262
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
3263
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
3264
+ """
3265
+
3266
+ def _handler(
3267
+ req: "OperationRequest[capo_workdocs.types.update_document_version_request.UpdateDocumentVersionRequest]",
3268
+ ) -> OperationResponse[None]:
3269
+ import capo_workdocs._operations.aws_gorilla_boy_service.update_document_version
3270
+
3271
+ output, http_response = (
3272
+ capo_workdocs._operations.aws_gorilla_boy_service.update_document_version.update_document_version(
3273
+ req.options, req.input
3274
+ )
3275
+ )
3276
+ return OperationResponse(output=output, response=http_response)
3277
+
3278
+ interceptors_, options_ = self.operation_options(config_overrides)
3279
+ input_: capo_workdocs.types.update_document_version_request.UpdateDocumentVersionRequest = {
3280
+ "document_id": document_id,
3281
+ "version_id": version_id,
3282
+ }
3283
+ if authentication_token is not None:
3284
+ input_["authentication_token"] = authentication_token
3285
+ if version_status is not None:
3286
+ input_["version_status"] = version_status
3287
+
3288
+ response = execute_pipeline(
3289
+ OperationRequest(input=input_, options=options_),
3290
+ handler=_handler,
3291
+ interceptors=list(interceptors_),
3292
+ )
3293
+ response.response.close()
3294
+ return response.output
3295
+
3296
+ def update_folder(
3297
+ self,
3298
+ folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
3299
+ *,
3300
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3301
+ authentication_token: Optional[
3302
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3303
+ ] = None,
3304
+ name: Optional[
3305
+ "capo_workdocs.types.resource_name_type.ResourceNameType"
3306
+ ] = None,
3307
+ parent_folder_id: Optional[
3308
+ "capo_workdocs.types.resource_id_type.ResourceIdType"
3309
+ ] = None,
3310
+ resource_state: Optional[
3311
+ "capo_workdocs.types.resource_state_type.ResourceStateType"
3312
+ ] = None,
3313
+ ) -> None:
3314
+ """<p>Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.</p>
3315
+
3316
+ Args:
3317
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
3318
+ folder_id: <p>The ID of the folder.</p>
3319
+ name: <p>The name of the folder.</p>
3320
+ parent_folder_id: <p>The ID of the parent folder.</p>
3321
+ resource_state: <p>The resource state of the folder. Only ACTIVE and RECYCLED are accepted values from the API.</p>
3322
+
3323
+ Raises:
3324
+ capo_workdocs.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource hierarchy is changing.</p>
3325
+ capo_workdocs.errors.conflicting_operation_exception.ConflictingOperationException: <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
3326
+ capo_workdocs.errors.entity_already_exists_exception.EntityAlreadyExistsException: <p>The resource already exists.</p>
3327
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
3328
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3329
+ capo_workdocs.errors.limit_exceeded_exception.LimitExceededException: <p>The maximum of 100,000 files and folders under the parent folder has been exceeded.</p>
3330
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
3331
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
3332
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
3333
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
3334
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
3335
+ """
3336
+
3337
+ def _handler(
3338
+ req: "OperationRequest[capo_workdocs.types.update_folder_request.UpdateFolderRequest]",
3339
+ ) -> OperationResponse[None]:
3340
+ import capo_workdocs._operations.aws_gorilla_boy_service.update_folder
3341
+
3342
+ output, http_response = (
3343
+ capo_workdocs._operations.aws_gorilla_boy_service.update_folder.update_folder(
3344
+ req.options, req.input
3345
+ )
3346
+ )
3347
+ return OperationResponse(output=output, response=http_response)
3348
+
3349
+ interceptors_, options_ = self.operation_options(config_overrides)
3350
+ input_: capo_workdocs.types.update_folder_request.UpdateFolderRequest = {
3351
+ "folder_id": folder_id
3352
+ }
3353
+ if authentication_token is not None:
3354
+ input_["authentication_token"] = authentication_token
3355
+ if name is not None:
3356
+ input_["name"] = name
3357
+ if parent_folder_id is not None:
3358
+ input_["parent_folder_id"] = parent_folder_id
3359
+ if resource_state is not None:
3360
+ input_["resource_state"] = resource_state
3361
+
3362
+ response = execute_pipeline(
3363
+ OperationRequest(input=input_, options=options_),
3364
+ handler=_handler,
3365
+ interceptors=list(interceptors_),
3366
+ )
3367
+ response.response.close()
3368
+ return response.output
3369
+
3370
+ def update_user(
3371
+ self,
3372
+ user_id: "capo_workdocs.types.id_type.IdType",
3373
+ *,
3374
+ config_overrides: Optional[WorkDocsClientConfig] = None,
3375
+ authentication_token: Optional[
3376
+ "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
3377
+ ] = None,
3378
+ given_name: Optional[
3379
+ "capo_workdocs.types.user_attribute_value_type.UserAttributeValueType"
3380
+ ] = None,
3381
+ surname: Optional[
3382
+ "capo_workdocs.types.user_attribute_value_type.UserAttributeValueType"
3383
+ ] = None,
3384
+ type: Optional["capo_workdocs.types.user_type.UserType"] = None,
3385
+ storage_rule: Optional[
3386
+ "capo_workdocs.types.storage_rule_type.StorageRuleType"
3387
+ ] = None,
3388
+ time_zone_id: Optional[
3389
+ "capo_workdocs.types.time_zone_id_type.TimeZoneIdType"
3390
+ ] = None,
3391
+ locale: Optional["capo_workdocs.types.locale_type.LocaleType"] = None,
3392
+ grant_poweruser_privileges: Optional[
3393
+ "capo_workdocs.types.boolean_enum_type.BooleanEnumType"
3394
+ ] = None,
3395
+ ) -> "capo_workdocs.types.update_user_response.UpdateUserResponse":
3396
+ """<p>Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.</p>
3397
+
3398
+ Args:
3399
+ authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
3400
+ user_id: <p>The ID of the user.</p>
3401
+ given_name: <p>The given name of the user.</p>
3402
+ surname: <p>The surname of the user.</p>
3403
+ type: <p>The type of the user.</p>
3404
+ storage_rule: <p>The amount of storage for the user.</p>
3405
+ time_zone_id: <p>The time zone ID of the user.</p>
3406
+ locale: <p>The locale of the user.</p>
3407
+ grant_poweruser_privileges: <p>Boolean value to determine whether the user is granted Power user privileges.</p>
3408
+
3409
+ Raises:
3410
+ capo_workdocs.errors.deactivating_last_system_user_exception.DeactivatingLastSystemUserException: <p>The last user in the organization is being deactivated.</p>
3411
+ capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
3412
+ capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3413
+ capo_workdocs.errors.illegal_user_state_exception.IllegalUserStateException: <p>The user is undergoing transfer of ownership.</p>
3414
+ capo_workdocs.errors.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</p>
3415
+ capo_workdocs.errors.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
3416
+ capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
3417
+ capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
3418
+ capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
3419
+ capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
3420
+ """
3421
+
3422
+ def _handler(
3423
+ req: "OperationRequest[capo_workdocs.types.update_user_request.UpdateUserRequest]",
3424
+ ) -> OperationResponse[
3425
+ "capo_workdocs.types.update_user_response.UpdateUserResponse"
3426
+ ]:
3427
+ import capo_workdocs._operations.aws_gorilla_boy_service.update_user
3428
+
3429
+ output, http_response = (
3430
+ capo_workdocs._operations.aws_gorilla_boy_service.update_user.update_user(
3431
+ req.options, req.input
3432
+ )
3433
+ )
3434
+ return OperationResponse(output=output, response=http_response)
3435
+
3436
+ interceptors_, options_ = self.operation_options(config_overrides)
3437
+ input_: capo_workdocs.types.update_user_request.UpdateUserRequest = {
3438
+ "user_id": user_id
3439
+ }
3440
+ if authentication_token is not None:
3441
+ input_["authentication_token"] = authentication_token
3442
+ if given_name is not None:
3443
+ input_["given_name"] = given_name
3444
+ if surname is not None:
3445
+ input_["surname"] = surname
3446
+ if type is not None:
3447
+ input_["type"] = type
3448
+ if storage_rule is not None:
3449
+ input_["storage_rule"] = storage_rule
3450
+ if time_zone_id is not None:
3451
+ input_["time_zone_id"] = time_zone_id
3452
+ if locale is not None:
3453
+ input_["locale"] = locale
3454
+ if grant_poweruser_privileges is not None:
3455
+ input_["grant_poweruser_privileges"] = grant_poweruser_privileges
3456
+
3457
+ response = execute_pipeline(
3458
+ OperationRequest(input=input_, options=options_),
3459
+ handler=_handler,
3460
+ interceptors=list(interceptors_),
3461
+ )
3462
+ response.response.close()
3463
+ return response.output
3464
+
3465
+ def __enter__(self) -> Self:
3466
+ return self
3467
+
3468
+ def __exit__(self, exc_type: Any, exc: Any, tb: Any):
3469
+ self._client.close()