capo-datasync 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 (370) hide show
  1. capo_datasync/__init__.py +70 -0
  2. capo_datasync/_async.py +25 -0
  3. capo_datasync/_auth/_identity.py +16 -0
  4. capo_datasync/_auth/_providers.py +886 -0
  5. capo_datasync/_auth/_signers.py +88 -0
  6. capo_datasync/_auth/_sigv4.py +434 -0
  7. capo_datasync/_auth/_zapros_handler.py +80 -0
  8. capo_datasync/_iter.py +113 -0
  9. capo_datasync/_operations/fmrs_service/cancel_task_execution.py +147 -0
  10. capo_datasync/_operations/fmrs_service/create_agent.py +154 -0
  11. capo_datasync/_operations/fmrs_service/create_location_azure_blob.py +159 -0
  12. capo_datasync/_operations/fmrs_service/create_location_efs.py +156 -0
  13. capo_datasync/_operations/fmrs_service/create_location_fsx_lustre.py +153 -0
  14. capo_datasync/_operations/fmrs_service/create_location_fsx_ontap.py +154 -0
  15. capo_datasync/_operations/fmrs_service/create_location_fsx_open_zfs.py +154 -0
  16. capo_datasync/_operations/fmrs_service/create_location_fsx_windows.py +155 -0
  17. capo_datasync/_operations/fmrs_service/create_location_hdfs.py +158 -0
  18. capo_datasync/_operations/fmrs_service/create_location_nfs.py +156 -0
  19. capo_datasync/_operations/fmrs_service/create_location_object_storage.py +157 -0
  20. capo_datasync/_operations/fmrs_service/create_location_s3.py +157 -0
  21. capo_datasync/_operations/fmrs_service/create_location_smb.py +162 -0
  22. capo_datasync/_operations/fmrs_service/create_task.py +158 -0
  23. capo_datasync/_operations/fmrs_service/delete_agent.py +143 -0
  24. capo_datasync/_operations/fmrs_service/delete_location.py +143 -0
  25. capo_datasync/_operations/fmrs_service/delete_task.py +143 -0
  26. capo_datasync/_operations/fmrs_service/describe_agent.py +156 -0
  27. capo_datasync/_operations/fmrs_service/describe_location_azure_blob.py +159 -0
  28. capo_datasync/_operations/fmrs_service/describe_location_efs.py +154 -0
  29. capo_datasync/_operations/fmrs_service/describe_location_fsx_lustre.py +153 -0
  30. capo_datasync/_operations/fmrs_service/describe_location_fsx_ontap.py +154 -0
  31. capo_datasync/_operations/fmrs_service/describe_location_fsx_open_zfs.py +154 -0
  32. capo_datasync/_operations/fmrs_service/describe_location_fsx_windows.py +156 -0
  33. capo_datasync/_operations/fmrs_service/describe_location_hdfs.py +159 -0
  34. capo_datasync/_operations/fmrs_service/describe_location_nfs.py +154 -0
  35. capo_datasync/_operations/fmrs_service/describe_location_object_storage.py +158 -0
  36. capo_datasync/_operations/fmrs_service/describe_location_s3.py +153 -0
  37. capo_datasync/_operations/fmrs_service/describe_location_smb.py +159 -0
  38. capo_datasync/_operations/fmrs_service/describe_task.py +162 -0
  39. capo_datasync/_operations/fmrs_service/describe_task_execution.py +164 -0
  40. capo_datasync/_operations/fmrs_service/list_agents.py +152 -0
  41. capo_datasync/_operations/fmrs_service/list_locations.py +153 -0
  42. capo_datasync/_operations/fmrs_service/list_tags_for_resource.py +152 -0
  43. capo_datasync/_operations/fmrs_service/list_task_executions.py +150 -0
  44. capo_datasync/_operations/fmrs_service/list_tasks.py +149 -0
  45. capo_datasync/_operations/fmrs_service/start_task_execution.py +154 -0
  46. capo_datasync/_operations/fmrs_service/tag_resource.py +144 -0
  47. capo_datasync/_operations/fmrs_service/untag_resource.py +144 -0
  48. capo_datasync/_operations/fmrs_service/update_agent.py +143 -0
  49. capo_datasync/_operations/fmrs_service/update_location_azure_blob.py +154 -0
  50. capo_datasync/_operations/fmrs_service/update_location_efs.py +146 -0
  51. capo_datasync/_operations/fmrs_service/update_location_fsx_lustre.py +147 -0
  52. capo_datasync/_operations/fmrs_service/update_location_fsx_ontap.py +148 -0
  53. capo_datasync/_operations/fmrs_service/update_location_fsx_open_zfs.py +148 -0
  54. capo_datasync/_operations/fmrs_service/update_location_fsx_windows.py +149 -0
  55. capo_datasync/_operations/fmrs_service/update_location_hdfs.py +153 -0
  56. capo_datasync/_operations/fmrs_service/update_location_nfs.py +147 -0
  57. capo_datasync/_operations/fmrs_service/update_location_object_storage.py +152 -0
  58. capo_datasync/_operations/fmrs_service/update_location_s3.py +147 -0
  59. capo_datasync/_operations/fmrs_service/update_location_smb.py +153 -0
  60. capo_datasync/_operations/fmrs_service/update_task.py +148 -0
  61. capo_datasync/_operations/fmrs_service/update_task_execution.py +148 -0
  62. capo_datasync/_pagination.py +21 -0
  63. capo_datasync/_protocol/__init__.py +1 -0
  64. capo_datasync/_protocol/errors.py +93 -0
  65. capo_datasync/_protocol/eventstream.py +238 -0
  66. capo_datasync/_protocol/serialize.py +47 -0
  67. capo_datasync/_protocol/xml.py +33 -0
  68. capo_datasync/_rule_engine/__init__.py +0 -0
  69. capo_datasync/_rule_engine/_aws_partition.py +160 -0
  70. capo_datasync/_rule_engine/_endpoint_rule_set.py +136 -0
  71. capo_datasync/_rule_engine/_endpoint_runtime.py +389 -0
  72. capo_datasync/_services/_aws_config.py +160 -0
  73. capo_datasync/_services/_pipeline.py +198 -0
  74. capo_datasync/_services/async_data_sync.py +3793 -0
  75. capo_datasync/_services/data_sync.py +3742 -0
  76. capo_datasync/errors/__init__.py +27 -0
  77. capo_datasync/errors/_base.py +94 -0
  78. capo_datasync/errors/internal_exception.py +56 -0
  79. capo_datasync/errors/invalid_request_exception.py +61 -0
  80. capo_datasync/py.typed +0 -0
  81. capo_datasync/types/_prelude/blob.py +12 -0
  82. capo_datasync/types/_prelude/timestamp.py +17 -0
  83. capo_datasync/types/activation_key.py +5 -0
  84. capo_datasync/types/agent_arn.py +5 -0
  85. capo_datasync/types/agent_arn_list.py +17 -0
  86. capo_datasync/types/agent_list.py +29 -0
  87. capo_datasync/types/agent_list_entry.py +65 -0
  88. capo_datasync/types/agent_status.py +17 -0
  89. capo_datasync/types/agent_version.py +5 -0
  90. capo_datasync/types/atime.py +17 -0
  91. capo_datasync/types/azure_access_tier.py +18 -0
  92. capo_datasync/types/azure_blob_authentication_type.py +17 -0
  93. capo_datasync/types/azure_blob_container_url.py +5 -0
  94. capo_datasync/types/azure_blob_sas_configuration.py +31 -0
  95. capo_datasync/types/azure_blob_sas_token.py +5 -0
  96. capo_datasync/types/azure_blob_subdirectory.py +5 -0
  97. capo_datasync/types/azure_blob_type.py +14 -0
  98. capo_datasync/types/bytes_per_second.py +5 -0
  99. capo_datasync/types/cancel_task_execution_request.py +33 -0
  100. capo_datasync/types/cancel_task_execution_response.py +18 -0
  101. capo_datasync/types/cmk_secret_config.py +35 -0
  102. capo_datasync/types/create_agent_request.py +100 -0
  103. capo_datasync/types/create_agent_response.py +28 -0
  104. capo_datasync/types/create_location_azure_blob_request.py +193 -0
  105. capo_datasync/types/create_location_azure_blob_response.py +28 -0
  106. capo_datasync/types/create_location_efs_request.py +110 -0
  107. capo_datasync/types/create_location_efs_response.py +28 -0
  108. capo_datasync/types/create_location_fsx_lustre_request.py +81 -0
  109. capo_datasync/types/create_location_fsx_lustre_response.py +28 -0
  110. capo_datasync/types/create_location_fsx_ontap_request.py +98 -0
  111. capo_datasync/types/create_location_fsx_ontap_response.py +28 -0
  112. capo_datasync/types/create_location_fsx_open_zfs_request.py +97 -0
  113. capo_datasync/types/create_location_fsx_open_zfs_response.py +28 -0
  114. capo_datasync/types/create_location_fsx_windows_request.py +145 -0
  115. capo_datasync/types/create_location_fsx_windows_response.py +28 -0
  116. capo_datasync/types/create_location_hdfs_request.py +249 -0
  117. capo_datasync/types/create_location_hdfs_response.py +28 -0
  118. capo_datasync/types/create_location_nfs_request.py +91 -0
  119. capo_datasync/types/create_location_nfs_response.py +28 -0
  120. capo_datasync/types/create_location_object_storage_request.py +193 -0
  121. capo_datasync/types/create_location_object_storage_response.py +28 -0
  122. capo_datasync/types/create_location_s3_request.py +102 -0
  123. capo_datasync/types/create_location_s3_response.py +28 -0
  124. capo_datasync/types/create_location_smb_request.py +241 -0
  125. capo_datasync/types/create_location_smb_response.py +28 -0
  126. capo_datasync/types/create_task_request.py +185 -0
  127. capo_datasync/types/create_task_response.py +28 -0
  128. capo_datasync/types/custom_secret_config.py +37 -0
  129. capo_datasync/types/delete_agent_request.py +31 -0
  130. capo_datasync/types/delete_agent_response.py +18 -0
  131. capo_datasync/types/delete_location_request.py +31 -0
  132. capo_datasync/types/delete_location_response.py +18 -0
  133. capo_datasync/types/delete_task_request.py +31 -0
  134. capo_datasync/types/delete_task_response.py +18 -0
  135. capo_datasync/types/describe_agent_request.py +31 -0
  136. capo_datasync/types/describe_agent_response.py +132 -0
  137. capo_datasync/types/describe_location_azure_blob_request.py +33 -0
  138. capo_datasync/types/describe_location_azure_blob_response.py +183 -0
  139. capo_datasync/types/describe_location_efs_request.py +31 -0
  140. capo_datasync/types/describe_location_efs_response.py +103 -0
  141. capo_datasync/types/describe_location_fsx_lustre_request.py +33 -0
  142. capo_datasync/types/describe_location_fsx_lustre_response.py +71 -0
  143. capo_datasync/types/describe_location_fsx_ontap_request.py +33 -0
  144. capo_datasync/types/describe_location_fsx_ontap_response.py +103 -0
  145. capo_datasync/types/describe_location_fsx_open_zfs_request.py +33 -0
  146. capo_datasync/types/describe_location_fsx_open_zfs_response.py +86 -0
  147. capo_datasync/types/describe_location_fsx_windows_request.py +33 -0
  148. capo_datasync/types/describe_location_fsx_windows_response.py +148 -0
  149. capo_datasync/types/describe_location_hdfs_request.py +31 -0
  150. capo_datasync/types/describe_location_hdfs_response.py +230 -0
  151. capo_datasync/types/describe_location_nfs_request.py +31 -0
  152. capo_datasync/types/describe_location_nfs_response.py +85 -0
  153. capo_datasync/types/describe_location_object_storage_request.py +33 -0
  154. capo_datasync/types/describe_location_object_storage_response.py +188 -0
  155. capo_datasync/types/describe_location_s3_request.py +31 -0
  156. capo_datasync/types/describe_location_s3_response.py +98 -0
  157. capo_datasync/types/describe_location_smb_request.py +31 -0
  158. capo_datasync/types/describe_location_smb_response.py +208 -0
  159. capo_datasync/types/describe_task_execution_request.py +33 -0
  160. capo_datasync/types/describe_task_execution_response.py +435 -0
  161. capo_datasync/types/describe_task_request.py +31 -0
  162. capo_datasync/types/describe_task_response.py +288 -0
  163. capo_datasync/types/destination_network_interface_arns.py +19 -0
  164. capo_datasync/types/dns_ip_list.py +17 -0
  165. capo_datasync/types/duration.py +5 -0
  166. capo_datasync/types/ec2_config.py +53 -0
  167. capo_datasync/types/ec2_security_group_arn.py +5 -0
  168. capo_datasync/types/ec2_security_group_arn_list.py +19 -0
  169. capo_datasync/types/ec2_subnet_arn.py +5 -0
  170. capo_datasync/types/efs_access_point_arn.py +5 -0
  171. capo_datasync/types/efs_filesystem_arn.py +5 -0
  172. capo_datasync/types/efs_in_transit_encryption.py +17 -0
  173. capo_datasync/types/efs_subdirectory.py +5 -0
  174. capo_datasync/types/endpoint.py +5 -0
  175. capo_datasync/types/endpoint_type.py +19 -0
  176. capo_datasync/types/filter_attribute_value.py +5 -0
  177. capo_datasync/types/filter_list.py +29 -0
  178. capo_datasync/types/filter_rule.py +43 -0
  179. capo_datasync/types/filter_type.py +14 -0
  180. capo_datasync/types/filter_value.py +5 -0
  181. capo_datasync/types/filter_values.py +19 -0
  182. capo_datasync/types/fsx_filesystem_arn.py +5 -0
  183. capo_datasync/types/fsx_lustre_subdirectory.py +5 -0
  184. capo_datasync/types/fsx_ontap_subdirectory.py +5 -0
  185. capo_datasync/types/fsx_open_zfs_subdirectory.py +5 -0
  186. capo_datasync/types/fsx_protocol.py +51 -0
  187. capo_datasync/types/fsx_protocol_nfs.py +39 -0
  188. capo_datasync/types/fsx_protocol_smb.py +127 -0
  189. capo_datasync/types/fsx_update_protocol.py +52 -0
  190. capo_datasync/types/fsx_update_protocol_smb.py +102 -0
  191. capo_datasync/types/fsx_windows_subdirectory.py +5 -0
  192. capo_datasync/types/gid.py +19 -0
  193. capo_datasync/types/hdfs_authentication_type.py +17 -0
  194. capo_datasync/types/hdfs_block_size.py +5 -0
  195. capo_datasync/types/hdfs_data_transfer_protection.py +19 -0
  196. capo_datasync/types/hdfs_name_node.py +39 -0
  197. capo_datasync/types/hdfs_name_node_list.py +29 -0
  198. capo_datasync/types/hdfs_replication_factor.py +5 -0
  199. capo_datasync/types/hdfs_rpc_protection.py +19 -0
  200. capo_datasync/types/hdfs_server_hostname.py +5 -0
  201. capo_datasync/types/hdfs_server_port.py +5 -0
  202. capo_datasync/types/hdfs_subdirectory.py +5 -0
  203. capo_datasync/types/hdfs_user.py +5 -0
  204. capo_datasync/types/iam_role_arn.py +5 -0
  205. capo_datasync/types/iam_role_arn_or_empty_string.py +5 -0
  206. capo_datasync/types/input_tag_list.py +29 -0
  207. capo_datasync/types/item_count.py +5 -0
  208. capo_datasync/types/kerberos_keytab_file.py +15 -0
  209. capo_datasync/types/kerberos_krb5_conf_file.py +15 -0
  210. capo_datasync/types/kerberos_principal.py +5 -0
  211. capo_datasync/types/kms_key_arn.py +5 -0
  212. capo_datasync/types/kms_key_provider_uri.py +5 -0
  213. capo_datasync/types/list_agents_request.py +35 -0
  214. capo_datasync/types/list_agents_response.py +43 -0
  215. capo_datasync/types/list_locations_request.py +50 -0
  216. capo_datasync/types/list_locations_response.py +43 -0
  217. capo_datasync/types/list_tags_for_resource_request.py +45 -0
  218. capo_datasync/types/list_tags_for_resource_response.py +43 -0
  219. capo_datasync/types/list_task_executions_request.py +42 -0
  220. capo_datasync/types/list_task_executions_response.py +49 -0
  221. capo_datasync/types/list_tasks_request.py +50 -0
  222. capo_datasync/types/list_tasks_response.py +43 -0
  223. capo_datasync/types/location_arn.py +5 -0
  224. capo_datasync/types/location_filter.py +71 -0
  225. capo_datasync/types/location_filter_name.py +18 -0
  226. capo_datasync/types/location_filters.py +29 -0
  227. capo_datasync/types/location_list.py +33 -0
  228. capo_datasync/types/location_list_entry.py +35 -0
  229. capo_datasync/types/location_uri.py +5 -0
  230. capo_datasync/types/log_group_arn.py +5 -0
  231. capo_datasync/types/log_level.py +18 -0
  232. capo_datasync/types/long.py +5 -0
  233. capo_datasync/types/managed_secret_config.py +28 -0
  234. capo_datasync/types/manifest_action.py +14 -0
  235. capo_datasync/types/manifest_config.py +72 -0
  236. capo_datasync/types/manifest_format.py +14 -0
  237. capo_datasync/types/max_results.py +5 -0
  238. capo_datasync/types/mtime.py +17 -0
  239. capo_datasync/types/network_interface_arn.py +5 -0
  240. capo_datasync/types/next_token.py +5 -0
  241. capo_datasync/types/nfs_mount_options.py +36 -0
  242. capo_datasync/types/nfs_subdirectory.py +5 -0
  243. capo_datasync/types/nfs_version.py +19 -0
  244. capo_datasync/types/object_storage_access_key.py +5 -0
  245. capo_datasync/types/object_storage_bucket_name.py +5 -0
  246. capo_datasync/types/object_storage_certificate.py +15 -0
  247. capo_datasync/types/object_storage_secret_key.py +5 -0
  248. capo_datasync/types/object_storage_server_port.py +5 -0
  249. capo_datasync/types/object_storage_server_protocol.py +17 -0
  250. capo_datasync/types/object_tags.py +17 -0
  251. capo_datasync/types/object_version_ids.py +17 -0
  252. capo_datasync/types/on_prem_config.py +39 -0
  253. capo_datasync/types/operator.py +25 -0
  254. capo_datasync/types/options.py +254 -0
  255. capo_datasync/types/output_tag_list.py +29 -0
  256. capo_datasync/types/overwrite_mode.py +17 -0
  257. capo_datasync/types/phase_status.py +18 -0
  258. capo_datasync/types/pl_security_group_arn_list.py +19 -0
  259. capo_datasync/types/pl_subnet_arn_list.py +17 -0
  260. capo_datasync/types/platform.py +28 -0
  261. capo_datasync/types/posix_permissions.py +17 -0
  262. capo_datasync/types/preserve_deleted_files.py +17 -0
  263. capo_datasync/types/preserve_devices.py +17 -0
  264. capo_datasync/types/private_link_config.py +75 -0
  265. capo_datasync/types/qop_configuration.py +63 -0
  266. capo_datasync/types/report_destination.py +36 -0
  267. capo_datasync/types/report_destination_s3.py +48 -0
  268. capo_datasync/types/report_level.py +17 -0
  269. capo_datasync/types/report_output_type.py +17 -0
  270. capo_datasync/types/report_override.py +36 -0
  271. capo_datasync/types/report_overrides.py +80 -0
  272. capo_datasync/types/report_result.py +49 -0
  273. capo_datasync/types/s3_bucket_arn.py +5 -0
  274. capo_datasync/types/s3_config.py +31 -0
  275. capo_datasync/types/s3_manifest_config.py +56 -0
  276. capo_datasync/types/s3_object_version_id.py +5 -0
  277. capo_datasync/types/s3_storage_class.py +23 -0
  278. capo_datasync/types/s3_subdirectory.py +5 -0
  279. capo_datasync/types/schedule_disabled_by.py +17 -0
  280. capo_datasync/types/schedule_disabled_reason.py +5 -0
  281. capo_datasync/types/schedule_expression_cron.py +5 -0
  282. capo_datasync/types/schedule_status.py +17 -0
  283. capo_datasync/types/secret_arn.py +5 -0
  284. capo_datasync/types/server_hostname.py +5 -0
  285. capo_datasync/types/server_ip_address.py +5 -0
  286. capo_datasync/types/smb_authentication_type.py +17 -0
  287. capo_datasync/types/smb_domain.py +5 -0
  288. capo_datasync/types/smb_mount_options.py +36 -0
  289. capo_datasync/types/smb_password.py +5 -0
  290. capo_datasync/types/smb_security_descriptor_copy_flags.py +18 -0
  291. capo_datasync/types/smb_subdirectory.py +5 -0
  292. capo_datasync/types/smb_user.py +5 -0
  293. capo_datasync/types/smb_version.py +20 -0
  294. capo_datasync/types/source_manifest_config.py +39 -0
  295. capo_datasync/types/source_network_interface_arns.py +19 -0
  296. capo_datasync/types/start_task_execution_request.py +129 -0
  297. capo_datasync/types/start_task_execution_response.py +30 -0
  298. capo_datasync/types/storage_virtual_machine_arn.py +5 -0
  299. capo_datasync/types/string.py +5 -0
  300. capo_datasync/types/tag_key.py +5 -0
  301. capo_datasync/types/tag_key_list.py +17 -0
  302. capo_datasync/types/tag_list_entry.py +38 -0
  303. capo_datasync/types/tag_resource_request.py +47 -0
  304. capo_datasync/types/tag_resource_response.py +18 -0
  305. capo_datasync/types/tag_value.py +5 -0
  306. capo_datasync/types/taggable_resource_arn.py +5 -0
  307. capo_datasync/types/task_arn.py +5 -0
  308. capo_datasync/types/task_execution_arn.py +5 -0
  309. capo_datasync/types/task_execution_files_failed_detail.py +50 -0
  310. capo_datasync/types/task_execution_files_listed_detail.py +36 -0
  311. capo_datasync/types/task_execution_folders_failed_detail.py +57 -0
  312. capo_datasync/types/task_execution_folders_listed_detail.py +36 -0
  313. capo_datasync/types/task_execution_list.py +35 -0
  314. capo_datasync/types/task_execution_list_entry.py +64 -0
  315. capo_datasync/types/task_execution_result_detail.py +108 -0
  316. capo_datasync/types/task_execution_status.py +23 -0
  317. capo_datasync/types/task_filter.py +71 -0
  318. capo_datasync/types/task_filter_name.py +17 -0
  319. capo_datasync/types/task_filters.py +29 -0
  320. capo_datasync/types/task_list.py +29 -0
  321. capo_datasync/types/task_list_entry.py +65 -0
  322. capo_datasync/types/task_mode.py +17 -0
  323. capo_datasync/types/task_queueing.py +17 -0
  324. capo_datasync/types/task_report_config.py +112 -0
  325. capo_datasync/types/task_schedule.py +48 -0
  326. capo_datasync/types/task_schedule_details.py +66 -0
  327. capo_datasync/types/task_status.py +20 -0
  328. capo_datasync/types/time.py +20 -0
  329. capo_datasync/types/transfer_mode.py +17 -0
  330. capo_datasync/types/uid.py +19 -0
  331. capo_datasync/types/untag_resource_request.py +45 -0
  332. capo_datasync/types/untag_resource_response.py +18 -0
  333. capo_datasync/types/update_agent_request.py +38 -0
  334. capo_datasync/types/update_agent_response.py +18 -0
  335. capo_datasync/types/update_location_azure_blob_request.py +175 -0
  336. capo_datasync/types/update_location_azure_blob_response.py +18 -0
  337. capo_datasync/types/update_location_efs_request.py +77 -0
  338. capo_datasync/types/update_location_efs_response.py +18 -0
  339. capo_datasync/types/update_location_fsx_lustre_request.py +40 -0
  340. capo_datasync/types/update_location_fsx_lustre_response.py +18 -0
  341. capo_datasync/types/update_location_fsx_ontap_request.py +61 -0
  342. capo_datasync/types/update_location_fsx_ontap_response.py +18 -0
  343. capo_datasync/types/update_location_fsx_open_zfs_request.py +54 -0
  344. capo_datasync/types/update_location_fsx_open_zfs_response.py +18 -0
  345. capo_datasync/types/update_location_fsx_windows_request.py +105 -0
  346. capo_datasync/types/update_location_fsx_windows_response.py +18 -0
  347. capo_datasync/types/update_location_hdfs_request.py +239 -0
  348. capo_datasync/types/update_location_hdfs_response.py +18 -0
  349. capo_datasync/types/update_location_nfs_request.py +79 -0
  350. capo_datasync/types/update_location_nfs_response.py +18 -0
  351. capo_datasync/types/update_location_object_storage_request.py +173 -0
  352. capo_datasync/types/update_location_object_storage_response.py +18 -0
  353. capo_datasync/types/update_location_s3_request.py +71 -0
  354. capo_datasync/types/update_location_s3_response.py +18 -0
  355. capo_datasync/types/update_location_smb_request.py +230 -0
  356. capo_datasync/types/update_location_smb_response.py +18 -0
  357. capo_datasync/types/update_smb_domain.py +5 -0
  358. capo_datasync/types/update_task_execution_request.py +48 -0
  359. capo_datasync/types/update_task_execution_response.py +18 -0
  360. capo_datasync/types/update_task_request.py +145 -0
  361. capo_datasync/types/update_task_response.py +18 -0
  362. capo_datasync/types/updated_efs_access_point_arn.py +5 -0
  363. capo_datasync/types/updated_efs_iam_role_arn.py +5 -0
  364. capo_datasync/types/verify_mode.py +18 -0
  365. capo_datasync/types/vpc_endpoint_id.py +5 -0
  366. capo_datasync-0.1.0.dist-info/METADATA +101 -0
  367. capo_datasync-0.1.0.dist-info/RECORD +370 -0
  368. capo_datasync-0.1.0.dist-info/WHEEL +5 -0
  369. capo_datasync-0.1.0.dist-info/licenses/LICENSE +21 -0
  370. capo_datasync-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,157 @@
1
+ """Generated from Smithy shape ``com.amazonaws.datasync#CreateLocationS3``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from typing import Any
7
+
8
+ import zapros
9
+ from typing_extensions import Never
10
+
11
+ import capo_datasync._auth._signers
12
+ import capo_datasync._auth._sigv4
13
+ import capo_datasync._protocol.eventstream
14
+ import capo_datasync.errors.internal_exception
15
+ import capo_datasync.errors.invalid_request_exception
16
+ import capo_datasync.types.agent_arn_list
17
+ import capo_datasync.types.create_location_s3_request
18
+ import capo_datasync.types.create_location_s3_response
19
+ import capo_datasync.types.input_tag_list
20
+ import capo_datasync.types.s3_config
21
+ import capo_datasync.types.s3_storage_class
22
+ from capo_datasync._protocol.errors import parse_error_metadata_json
23
+ from capo_datasync._rule_engine._endpoint_rule_set import EndpointParams, resolve
24
+ from capo_datasync._services._pipeline import AsyncOperationOptions, OperationOptions
25
+ from capo_datasync.errors import UnknownServiceError
26
+
27
+
28
+ def handle_error(response: zapros.Response) -> Never:
29
+ data = json.loads(response.read())
30
+ code, message = parse_error_metadata_json(response, data)
31
+ match code:
32
+ case "InternalException":
33
+ raise capo_datasync.errors.internal_exception.InternalException.from_aws_json_1_1(
34
+ data, message
35
+ )
36
+ case "InvalidRequestException":
37
+ raise capo_datasync.errors.invalid_request_exception.InvalidRequestException.from_aws_json_1_1(
38
+ data, message
39
+ )
40
+ case _:
41
+ raise UnknownServiceError(code=code, message=message, response=response)
42
+
43
+
44
+ def handle_response(
45
+ response: zapros.Response,
46
+ ) -> capo_datasync.types.create_location_s3_response.CreateLocationS3Response:
47
+ out: capo_datasync.types.create_location_s3_response.CreateLocationS3Response = (
48
+ capo_datasync.types.create_location_s3_response.deserialize_aws_json_1_1(
49
+ json.loads(response.read())
50
+ )
51
+ )
52
+ return out
53
+
54
+
55
+ async def async_handle_response(
56
+ response: zapros.Response,
57
+ ) -> capo_datasync.types.create_location_s3_response.CreateLocationS3Response:
58
+ out: capo_datasync.types.create_location_s3_response.CreateLocationS3Response = (
59
+ capo_datasync.types.create_location_s3_response.deserialize_aws_json_1_1(
60
+ json.loads(await response.aread())
61
+ )
62
+ )
63
+ return out
64
+
65
+
66
+ def get_signer(
67
+ options: AsyncOperationOptions | OperationOptions,
68
+ auth_schemes: list[dict[str, Any]] | None = None,
69
+ ) -> capo_datasync._auth._signers.Signer | None:
70
+ name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
71
+ if (
72
+ options.credentials_provider is not None
73
+ and name_to_schema
74
+ and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
75
+ ):
76
+ raise RuntimeError(
77
+ "Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
78
+ )
79
+ if options.credentials_provider is not None:
80
+ endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
81
+ "sigv4-s3express"
82
+ )
83
+ if endpoint_scheme is not None or not name_to_schema:
84
+ sigv4_config = capo_datasync._auth._sigv4.build_sigv4_auth_scheme(
85
+ "datasync", options.region, endpoint_scheme
86
+ )
87
+ if sigv4_config is not None:
88
+ return capo_datasync._auth._signers.SigV4Signer(
89
+ options.credentials_provider, auth_scheme=sigv4_config
90
+ )
91
+ raise RuntimeError("Auth was not resolved")
92
+
93
+
94
+ def build_request(
95
+ options: OperationOptions | AsyncOperationOptions,
96
+ input_: capo_datasync.types.create_location_s3_request.CreateLocationS3Request,
97
+ ) -> zapros.Request:
98
+ endpoint = resolve(
99
+ EndpointParams(
100
+ Region=options.region,
101
+ UseDualStack=options.use_dual_stack,
102
+ UseFIPS=options.use_fips,
103
+ Endpoint=options.endpoint,
104
+ )
105
+ ) # noqa: F841
106
+ url = endpoint.url.rstrip("/") + ""
107
+ params: list[tuple[str, str]] = []
108
+ headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
109
+ headers["X-Amz-Target"] = "FmrsService.CreateLocationS3"
110
+ body: bytes | None = json.dumps(
111
+ capo_datasync.types.create_location_s3_request.serialize_aws_json_1_1(input_),
112
+ allow_nan=False,
113
+ ).encode()
114
+ headers["content-type"] = "application/x-amz-json-1.1"
115
+ signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
116
+ normalized_url = zapros.URL(url)
117
+ for k, v in params:
118
+ normalized_url.search_params.append(k, v)
119
+ return zapros.Request(
120
+ normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
121
+ )
122
+
123
+
124
+ def create_location_s3(
125
+ options: OperationOptions,
126
+ input_: capo_datasync.types.create_location_s3_request.CreateLocationS3Request,
127
+ ) -> tuple[
128
+ capo_datasync.types.create_location_s3_response.CreateLocationS3Response,
129
+ zapros.Response,
130
+ ]:
131
+ response = options.client.handler.handle(build_request(options, input_))
132
+ try:
133
+ if response.status >= 300:
134
+ response.read()
135
+ handle_error(response)
136
+ return handle_response(response), response
137
+ except BaseException:
138
+ response.close()
139
+ raise
140
+
141
+
142
+ async def async_create_location_s3(
143
+ options: AsyncOperationOptions,
144
+ input_: capo_datasync.types.create_location_s3_request.CreateLocationS3Request,
145
+ ) -> tuple[
146
+ capo_datasync.types.create_location_s3_response.CreateLocationS3Response,
147
+ zapros.Response,
148
+ ]:
149
+ response = await options.client.handler.ahandle(build_request(options, input_))
150
+ try:
151
+ if response.status >= 300:
152
+ await response.aread()
153
+ handle_error(response)
154
+ return await async_handle_response(response), response
155
+ except BaseException:
156
+ await response.aclose()
157
+ raise
@@ -0,0 +1,162 @@
1
+ """Generated from Smithy shape ``com.amazonaws.datasync#CreateLocationSmb``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from typing import Any
7
+
8
+ import zapros
9
+ from typing_extensions import Never
10
+
11
+ import capo_datasync._auth._signers
12
+ import capo_datasync._auth._sigv4
13
+ import capo_datasync._protocol.eventstream
14
+ import capo_datasync.errors.internal_exception
15
+ import capo_datasync.errors.invalid_request_exception
16
+ import capo_datasync.types.agent_arn_list
17
+ import capo_datasync.types.cmk_secret_config
18
+ import capo_datasync.types.create_location_smb_request
19
+ import capo_datasync.types.create_location_smb_response
20
+ import capo_datasync.types.custom_secret_config
21
+ import capo_datasync.types.dns_ip_list
22
+ import capo_datasync.types.input_tag_list
23
+ import capo_datasync.types.kerberos_keytab_file
24
+ import capo_datasync.types.kerberos_krb5_conf_file
25
+ import capo_datasync.types.smb_authentication_type
26
+ import capo_datasync.types.smb_mount_options
27
+ from capo_datasync._protocol.errors import parse_error_metadata_json
28
+ from capo_datasync._rule_engine._endpoint_rule_set import EndpointParams, resolve
29
+ from capo_datasync._services._pipeline import AsyncOperationOptions, OperationOptions
30
+ from capo_datasync.errors import UnknownServiceError
31
+
32
+
33
+ def handle_error(response: zapros.Response) -> Never:
34
+ data = json.loads(response.read())
35
+ code, message = parse_error_metadata_json(response, data)
36
+ match code:
37
+ case "InternalException":
38
+ raise capo_datasync.errors.internal_exception.InternalException.from_aws_json_1_1(
39
+ data, message
40
+ )
41
+ case "InvalidRequestException":
42
+ raise capo_datasync.errors.invalid_request_exception.InvalidRequestException.from_aws_json_1_1(
43
+ data, message
44
+ )
45
+ case _:
46
+ raise UnknownServiceError(code=code, message=message, response=response)
47
+
48
+
49
+ def handle_response(
50
+ response: zapros.Response,
51
+ ) -> capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse:
52
+ out: capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse = (
53
+ capo_datasync.types.create_location_smb_response.deserialize_aws_json_1_1(
54
+ json.loads(response.read())
55
+ )
56
+ )
57
+ return out
58
+
59
+
60
+ async def async_handle_response(
61
+ response: zapros.Response,
62
+ ) -> capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse:
63
+ out: capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse = (
64
+ capo_datasync.types.create_location_smb_response.deserialize_aws_json_1_1(
65
+ json.loads(await response.aread())
66
+ )
67
+ )
68
+ return out
69
+
70
+
71
+ def get_signer(
72
+ options: AsyncOperationOptions | OperationOptions,
73
+ auth_schemes: list[dict[str, Any]] | None = None,
74
+ ) -> capo_datasync._auth._signers.Signer | None:
75
+ name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
76
+ if (
77
+ options.credentials_provider is not None
78
+ and name_to_schema
79
+ and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
80
+ ):
81
+ raise RuntimeError(
82
+ "Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
83
+ )
84
+ if options.credentials_provider is not None:
85
+ endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
86
+ "sigv4-s3express"
87
+ )
88
+ if endpoint_scheme is not None or not name_to_schema:
89
+ sigv4_config = capo_datasync._auth._sigv4.build_sigv4_auth_scheme(
90
+ "datasync", options.region, endpoint_scheme
91
+ )
92
+ if sigv4_config is not None:
93
+ return capo_datasync._auth._signers.SigV4Signer(
94
+ options.credentials_provider, auth_scheme=sigv4_config
95
+ )
96
+ raise RuntimeError("Auth was not resolved")
97
+
98
+
99
+ def build_request(
100
+ options: OperationOptions | AsyncOperationOptions,
101
+ input_: capo_datasync.types.create_location_smb_request.CreateLocationSmbRequest,
102
+ ) -> zapros.Request:
103
+ endpoint = resolve(
104
+ EndpointParams(
105
+ Region=options.region,
106
+ UseDualStack=options.use_dual_stack,
107
+ UseFIPS=options.use_fips,
108
+ Endpoint=options.endpoint,
109
+ )
110
+ ) # noqa: F841
111
+ url = endpoint.url.rstrip("/") + ""
112
+ params: list[tuple[str, str]] = []
113
+ headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
114
+ headers["X-Amz-Target"] = "FmrsService.CreateLocationSmb"
115
+ body: bytes | None = json.dumps(
116
+ capo_datasync.types.create_location_smb_request.serialize_aws_json_1_1(input_),
117
+ allow_nan=False,
118
+ ).encode()
119
+ headers["content-type"] = "application/x-amz-json-1.1"
120
+ signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
121
+ normalized_url = zapros.URL(url)
122
+ for k, v in params:
123
+ normalized_url.search_params.append(k, v)
124
+ return zapros.Request(
125
+ normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
126
+ )
127
+
128
+
129
+ def create_location_smb(
130
+ options: OperationOptions,
131
+ input_: capo_datasync.types.create_location_smb_request.CreateLocationSmbRequest,
132
+ ) -> tuple[
133
+ capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse,
134
+ zapros.Response,
135
+ ]:
136
+ response = options.client.handler.handle(build_request(options, input_))
137
+ try:
138
+ if response.status >= 300:
139
+ response.read()
140
+ handle_error(response)
141
+ return handle_response(response), response
142
+ except BaseException:
143
+ response.close()
144
+ raise
145
+
146
+
147
+ async def async_create_location_smb(
148
+ options: AsyncOperationOptions,
149
+ input_: capo_datasync.types.create_location_smb_request.CreateLocationSmbRequest,
150
+ ) -> tuple[
151
+ capo_datasync.types.create_location_smb_response.CreateLocationSmbResponse,
152
+ zapros.Response,
153
+ ]:
154
+ response = await options.client.handler.ahandle(build_request(options, input_))
155
+ try:
156
+ if response.status >= 300:
157
+ await response.aread()
158
+ handle_error(response)
159
+ return await async_handle_response(response), response
160
+ except BaseException:
161
+ await response.aclose()
162
+ raise
@@ -0,0 +1,158 @@
1
+ """Generated from Smithy shape ``com.amazonaws.datasync#CreateTask``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from typing import Any
7
+
8
+ import zapros
9
+ from typing_extensions import Never
10
+
11
+ import capo_datasync._auth._signers
12
+ import capo_datasync._auth._sigv4
13
+ import capo_datasync._protocol.eventstream
14
+ import capo_datasync.errors.internal_exception
15
+ import capo_datasync.errors.invalid_request_exception
16
+ import capo_datasync.types.create_task_request
17
+ import capo_datasync.types.create_task_response
18
+ import capo_datasync.types.filter_list
19
+ import capo_datasync.types.input_tag_list
20
+ import capo_datasync.types.manifest_config
21
+ import capo_datasync.types.options
22
+ import capo_datasync.types.task_mode
23
+ import capo_datasync.types.task_report_config
24
+ import capo_datasync.types.task_schedule
25
+ from capo_datasync._protocol.errors import parse_error_metadata_json
26
+ from capo_datasync._rule_engine._endpoint_rule_set import EndpointParams, resolve
27
+ from capo_datasync._services._pipeline import AsyncOperationOptions, OperationOptions
28
+ from capo_datasync.errors import UnknownServiceError
29
+
30
+
31
+ def handle_error(response: zapros.Response) -> Never:
32
+ data = json.loads(response.read())
33
+ code, message = parse_error_metadata_json(response, data)
34
+ match code:
35
+ case "InternalException":
36
+ raise capo_datasync.errors.internal_exception.InternalException.from_aws_json_1_1(
37
+ data, message
38
+ )
39
+ case "InvalidRequestException":
40
+ raise capo_datasync.errors.invalid_request_exception.InvalidRequestException.from_aws_json_1_1(
41
+ data, message
42
+ )
43
+ case _:
44
+ raise UnknownServiceError(code=code, message=message, response=response)
45
+
46
+
47
+ def handle_response(
48
+ response: zapros.Response,
49
+ ) -> capo_datasync.types.create_task_response.CreateTaskResponse:
50
+ out: capo_datasync.types.create_task_response.CreateTaskResponse = (
51
+ capo_datasync.types.create_task_response.deserialize_aws_json_1_1(
52
+ json.loads(response.read())
53
+ )
54
+ )
55
+ return out
56
+
57
+
58
+ async def async_handle_response(
59
+ response: zapros.Response,
60
+ ) -> capo_datasync.types.create_task_response.CreateTaskResponse:
61
+ out: capo_datasync.types.create_task_response.CreateTaskResponse = (
62
+ capo_datasync.types.create_task_response.deserialize_aws_json_1_1(
63
+ json.loads(await response.aread())
64
+ )
65
+ )
66
+ return out
67
+
68
+
69
+ def get_signer(
70
+ options: AsyncOperationOptions | OperationOptions,
71
+ auth_schemes: list[dict[str, Any]] | None = None,
72
+ ) -> capo_datasync._auth._signers.Signer | None:
73
+ name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
74
+ if (
75
+ options.credentials_provider is not None
76
+ and name_to_schema
77
+ and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
78
+ ):
79
+ raise RuntimeError(
80
+ "Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
81
+ )
82
+ if options.credentials_provider is not None:
83
+ endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
84
+ "sigv4-s3express"
85
+ )
86
+ if endpoint_scheme is not None or not name_to_schema:
87
+ sigv4_config = capo_datasync._auth._sigv4.build_sigv4_auth_scheme(
88
+ "datasync", options.region, endpoint_scheme
89
+ )
90
+ if sigv4_config is not None:
91
+ return capo_datasync._auth._signers.SigV4Signer(
92
+ options.credentials_provider, auth_scheme=sigv4_config
93
+ )
94
+ raise RuntimeError("Auth was not resolved")
95
+
96
+
97
+ def build_request(
98
+ options: OperationOptions | AsyncOperationOptions,
99
+ input_: capo_datasync.types.create_task_request.CreateTaskRequest,
100
+ ) -> zapros.Request:
101
+ endpoint = resolve(
102
+ EndpointParams(
103
+ Region=options.region,
104
+ UseDualStack=options.use_dual_stack,
105
+ UseFIPS=options.use_fips,
106
+ Endpoint=options.endpoint,
107
+ )
108
+ ) # noqa: F841
109
+ url = endpoint.url.rstrip("/") + ""
110
+ params: list[tuple[str, str]] = []
111
+ headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
112
+ headers["X-Amz-Target"] = "FmrsService.CreateTask"
113
+ body: bytes | None = json.dumps(
114
+ capo_datasync.types.create_task_request.serialize_aws_json_1_1(input_),
115
+ allow_nan=False,
116
+ ).encode()
117
+ headers["content-type"] = "application/x-amz-json-1.1"
118
+ signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
119
+ normalized_url = zapros.URL(url)
120
+ for k, v in params:
121
+ normalized_url.search_params.append(k, v)
122
+ return zapros.Request(
123
+ normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
124
+ )
125
+
126
+
127
+ def create_task(
128
+ options: OperationOptions,
129
+ input_: capo_datasync.types.create_task_request.CreateTaskRequest,
130
+ ) -> tuple[
131
+ capo_datasync.types.create_task_response.CreateTaskResponse, zapros.Response
132
+ ]:
133
+ response = options.client.handler.handle(build_request(options, input_))
134
+ try:
135
+ if response.status >= 300:
136
+ response.read()
137
+ handle_error(response)
138
+ return handle_response(response), response
139
+ except BaseException:
140
+ response.close()
141
+ raise
142
+
143
+
144
+ async def async_create_task(
145
+ options: AsyncOperationOptions,
146
+ input_: capo_datasync.types.create_task_request.CreateTaskRequest,
147
+ ) -> tuple[
148
+ capo_datasync.types.create_task_response.CreateTaskResponse, zapros.Response
149
+ ]:
150
+ response = await options.client.handler.ahandle(build_request(options, input_))
151
+ try:
152
+ if response.status >= 300:
153
+ await response.aread()
154
+ handle_error(response)
155
+ return await async_handle_response(response), response
156
+ except BaseException:
157
+ await response.aclose()
158
+ raise
@@ -0,0 +1,143 @@
1
+ """Generated from Smithy shape ``com.amazonaws.datasync#DeleteAgent``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ from typing import Any
7
+
8
+ import zapros
9
+ from typing_extensions import Never
10
+
11
+ import capo_datasync._auth._signers
12
+ import capo_datasync._auth._sigv4
13
+ import capo_datasync._protocol.eventstream
14
+ import capo_datasync.errors.internal_exception
15
+ import capo_datasync.errors.invalid_request_exception
16
+ import capo_datasync.types.delete_agent_request
17
+ import capo_datasync.types.delete_agent_response
18
+ from capo_datasync._protocol.errors import parse_error_metadata_json
19
+ from capo_datasync._rule_engine._endpoint_rule_set import EndpointParams, resolve
20
+ from capo_datasync._services._pipeline import AsyncOperationOptions, OperationOptions
21
+ from capo_datasync.errors import UnknownServiceError
22
+
23
+
24
+ def handle_error(response: zapros.Response) -> Never:
25
+ data = json.loads(response.read())
26
+ code, message = parse_error_metadata_json(response, data)
27
+ match code:
28
+ case "InternalException":
29
+ raise capo_datasync.errors.internal_exception.InternalException.from_aws_json_1_1(
30
+ data, message
31
+ )
32
+ case "InvalidRequestException":
33
+ raise capo_datasync.errors.invalid_request_exception.InvalidRequestException.from_aws_json_1_1(
34
+ data, message
35
+ )
36
+ case _:
37
+ raise UnknownServiceError(code=code, message=message, response=response)
38
+
39
+
40
+ def handle_response(
41
+ response: zapros.Response,
42
+ ) -> capo_datasync.types.delete_agent_response.DeleteAgentResponse:
43
+ out: capo_datasync.types.delete_agent_response.DeleteAgentResponse = {} # type: ignore[typeddict-item]
44
+ return out
45
+
46
+
47
+ async def async_handle_response(
48
+ response: zapros.Response,
49
+ ) -> capo_datasync.types.delete_agent_response.DeleteAgentResponse:
50
+ out: capo_datasync.types.delete_agent_response.DeleteAgentResponse = {} # type: ignore[typeddict-item]
51
+ return out
52
+
53
+
54
+ def get_signer(
55
+ options: AsyncOperationOptions | OperationOptions,
56
+ auth_schemes: list[dict[str, Any]] | None = None,
57
+ ) -> capo_datasync._auth._signers.Signer | None:
58
+ name_to_schema = {s["name"]: s for s in (auth_schemes or [])} # noqa: F841
59
+ if (
60
+ options.credentials_provider is not None
61
+ and name_to_schema
62
+ and not name_to_schema.keys() & {"sigv4", "sigv4-s3express"}
63
+ ):
64
+ raise RuntimeError(
65
+ "Endpoint requires an unsupported auth scheme: " + ", ".join(name_to_schema)
66
+ )
67
+ if options.credentials_provider is not None:
68
+ endpoint_scheme = name_to_schema.get("sigv4") or name_to_schema.get(
69
+ "sigv4-s3express"
70
+ )
71
+ if endpoint_scheme is not None or not name_to_schema:
72
+ sigv4_config = capo_datasync._auth._sigv4.build_sigv4_auth_scheme(
73
+ "datasync", options.region, endpoint_scheme
74
+ )
75
+ if sigv4_config is not None:
76
+ return capo_datasync._auth._signers.SigV4Signer(
77
+ options.credentials_provider, auth_scheme=sigv4_config
78
+ )
79
+ raise RuntimeError("Auth was not resolved")
80
+
81
+
82
+ def build_request(
83
+ options: OperationOptions | AsyncOperationOptions,
84
+ input_: capo_datasync.types.delete_agent_request.DeleteAgentRequest,
85
+ ) -> zapros.Request:
86
+ endpoint = resolve(
87
+ EndpointParams(
88
+ Region=options.region,
89
+ UseDualStack=options.use_dual_stack,
90
+ UseFIPS=options.use_fips,
91
+ Endpoint=options.endpoint,
92
+ )
93
+ ) # noqa: F841
94
+ url = endpoint.url.rstrip("/") + ""
95
+ params: list[tuple[str, str]] = []
96
+ headers: dict[str, str] = {k: ", ".join(v) for k, v in endpoint.headers.items()}
97
+ headers["X-Amz-Target"] = "FmrsService.DeleteAgent"
98
+ body: bytes | None = json.dumps(
99
+ capo_datasync.types.delete_agent_request.serialize_aws_json_1_1(input_),
100
+ allow_nan=False,
101
+ ).encode()
102
+ headers["content-type"] = "application/x-amz-json-1.1"
103
+ signer = get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
104
+ normalized_url = zapros.URL(url)
105
+ for k, v in params:
106
+ normalized_url.search_params.append(k, v)
107
+ return zapros.Request(
108
+ normalized_url, "POST", headers=headers, body=body, context={"signer": signer}
109
+ )
110
+
111
+
112
+ def delete_agent(
113
+ options: OperationOptions,
114
+ input_: capo_datasync.types.delete_agent_request.DeleteAgentRequest,
115
+ ) -> tuple[
116
+ capo_datasync.types.delete_agent_response.DeleteAgentResponse, zapros.Response
117
+ ]:
118
+ response = options.client.handler.handle(build_request(options, input_))
119
+ try:
120
+ if response.status >= 300:
121
+ response.read()
122
+ handle_error(response)
123
+ return handle_response(response), response
124
+ except BaseException:
125
+ response.close()
126
+ raise
127
+
128
+
129
+ async def async_delete_agent(
130
+ options: AsyncOperationOptions,
131
+ input_: capo_datasync.types.delete_agent_request.DeleteAgentRequest,
132
+ ) -> tuple[
133
+ capo_datasync.types.delete_agent_response.DeleteAgentResponse, zapros.Response
134
+ ]:
135
+ response = await options.client.handler.ahandle(build_request(options, input_))
136
+ try:
137
+ if response.status >= 300:
138
+ await response.aread()
139
+ handle_error(response)
140
+ return await async_handle_response(response), response
141
+ except BaseException:
142
+ await response.aclose()
143
+ raise