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