capo-devops-agent 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 (457) hide show
  1. capo_devops_agent/__init__.py +72 -0
  2. capo_devops_agent/_async.py +25 -0
  3. capo_devops_agent/_auth/_identity.py +16 -0
  4. capo_devops_agent/_auth/_providers.py +886 -0
  5. capo_devops_agent/_auth/_signers.py +88 -0
  6. capo_devops_agent/_auth/_sigv4.py +434 -0
  7. capo_devops_agent/_auth/_zapros_handler.py +80 -0
  8. capo_devops_agent/_iter.py +113 -0
  9. capo_devops_agent/_operations/dev_ops_agent/associate_service.py +192 -0
  10. capo_devops_agent/_operations/dev_ops_agent/create_agent_space.py +189 -0
  11. capo_devops_agent/_operations/dev_ops_agent/create_asset.py +189 -0
  12. capo_devops_agent/_operations/dev_ops_agent/create_asset_file.py +196 -0
  13. capo_devops_agent/_operations/dev_ops_agent/create_backlog_task.py +189 -0
  14. capo_devops_agent/_operations/dev_ops_agent/create_chat.py +195 -0
  15. capo_devops_agent/_operations/dev_ops_agent/create_private_connection.py +188 -0
  16. capo_devops_agent/_operations/dev_ops_agent/delete_agent_space.py +177 -0
  17. capo_devops_agent/_operations/dev_ops_agent/delete_asset.py +178 -0
  18. capo_devops_agent/_operations/dev_ops_agent/delete_asset_file.py +182 -0
  19. capo_devops_agent/_operations/dev_ops_agent/delete_private_connection.py +182 -0
  20. capo_devops_agent/_operations/dev_ops_agent/deregister_service.py +177 -0
  21. capo_devops_agent/_operations/dev_ops_agent/describe_private_connection.py +185 -0
  22. capo_devops_agent/_operations/dev_ops_agent/disable_operator_app.py +168 -0
  23. capo_devops_agent/_operations/dev_ops_agent/disassociate_service.py +181 -0
  24. capo_devops_agent/_operations/dev_ops_agent/enable_operator_app.py +198 -0
  25. capo_devops_agent/_operations/dev_ops_agent/get_account_usage.py +185 -0
  26. capo_devops_agent/_operations/dev_ops_agent/get_agent_space.py +185 -0
  27. capo_devops_agent/_operations/dev_ops_agent/get_asset.py +189 -0
  28. capo_devops_agent/_operations/dev_ops_agent/get_asset_content.py +192 -0
  29. capo_devops_agent/_operations/dev_ops_agent/get_asset_file.py +193 -0
  30. capo_devops_agent/_operations/dev_ops_agent/get_association.py +188 -0
  31. capo_devops_agent/_operations/dev_ops_agent/get_backlog_task.py +189 -0
  32. capo_devops_agent/_operations/dev_ops_agent/get_operator_app.py +188 -0
  33. capo_devops_agent/_operations/dev_ops_agent/get_recommendation.py +188 -0
  34. capo_devops_agent/_operations/dev_ops_agent/get_service.py +185 -0
  35. capo_devops_agent/_operations/dev_ops_agent/list_agent_spaces.py +187 -0
  36. capo_devops_agent/_operations/dev_ops_agent/list_asset_files.py +196 -0
  37. capo_devops_agent/_operations/dev_ops_agent/list_asset_types.py +188 -0
  38. capo_devops_agent/_operations/dev_ops_agent/list_asset_versions.py +190 -0
  39. capo_devops_agent/_operations/dev_ops_agent/list_assets.py +210 -0
  40. capo_devops_agent/_operations/dev_ops_agent/list_associations.py +191 -0
  41. capo_devops_agent/_operations/dev_ops_agent/list_backlog_tasks.py +189 -0
  42. capo_devops_agent/_operations/dev_ops_agent/list_chats.py +190 -0
  43. capo_devops_agent/_operations/dev_ops_agent/list_executions.py +190 -0
  44. capo_devops_agent/_operations/dev_ops_agent/list_goals.py +190 -0
  45. capo_devops_agent/_operations/dev_ops_agent/list_journal_records.py +189 -0
  46. capo_devops_agent/_operations/dev_ops_agent/list_pending_messages.py +188 -0
  47. capo_devops_agent/_operations/dev_ops_agent/list_private_connections.py +184 -0
  48. capo_devops_agent/_operations/dev_ops_agent/list_recommendations.py +191 -0
  49. capo_devops_agent/_operations/dev_ops_agent/list_services.py +197 -0
  50. capo_devops_agent/_operations/dev_ops_agent/list_tags_for_resource.py +186 -0
  51. capo_devops_agent/_operations/dev_ops_agent/list_webhooks.py +188 -0
  52. capo_devops_agent/_operations/dev_ops_agent/register_service.py +203 -0
  53. capo_devops_agent/_operations/dev_ops_agent/send_message.py +201 -0
  54. capo_devops_agent/_operations/dev_ops_agent/tag_resource.py +180 -0
  55. capo_devops_agent/_operations/dev_ops_agent/untag_resource.py +180 -0
  56. capo_devops_agent/_operations/dev_ops_agent/update_agent_space.py +190 -0
  57. capo_devops_agent/_operations/dev_ops_agent/update_asset.py +192 -0
  58. capo_devops_agent/_operations/dev_ops_agent/update_asset_file.py +196 -0
  59. capo_devops_agent/_operations/dev_ops_agent/update_association.py +196 -0
  60. capo_devops_agent/_operations/dev_ops_agent/update_backlog_task.py +190 -0
  61. capo_devops_agent/_operations/dev_ops_agent/update_goal.py +192 -0
  62. capo_devops_agent/_operations/dev_ops_agent/update_operator_app_idp_config.py +188 -0
  63. capo_devops_agent/_operations/dev_ops_agent/update_private_connection_certificate.py +190 -0
  64. capo_devops_agent/_operations/dev_ops_agent/update_recommendation.py +195 -0
  65. capo_devops_agent/_operations/dev_ops_agent/validate_aws_associations.py +180 -0
  66. capo_devops_agent/_pagination.py +21 -0
  67. capo_devops_agent/_protocol/__init__.py +1 -0
  68. capo_devops_agent/_protocol/errors.py +93 -0
  69. capo_devops_agent/_protocol/eventstream.py +238 -0
  70. capo_devops_agent/_protocol/serialize.py +47 -0
  71. capo_devops_agent/_protocol/xml.py +33 -0
  72. capo_devops_agent/_resources/dev_ops_agent/agent_space_resource.py +1149 -0
  73. capo_devops_agent/_resources/dev_ops_agent/private_connection_resource.py +567 -0
  74. capo_devops_agent/_resources/dev_ops_agent/service_resource.py +552 -0
  75. capo_devops_agent/_rule_engine/__init__.py +0 -0
  76. capo_devops_agent/_rule_engine/_aws_partition.py +160 -0
  77. capo_devops_agent/_rule_engine/_endpoint_rule_set.py +65 -0
  78. capo_devops_agent/_rule_engine/_endpoint_runtime.py +389 -0
  79. capo_devops_agent/_services/_aws_config.py +156 -0
  80. capo_devops_agent/_services/_pipeline.py +196 -0
  81. capo_devops_agent/_services/async_dev_ops_agent.py +2498 -0
  82. capo_devops_agent/_services/dev_ops_agent.py +2466 -0
  83. capo_devops_agent/errors/__init__.py +45 -0
  84. capo_devops_agent/errors/_base.py +94 -0
  85. capo_devops_agent/errors/access_denied_exception.py +48 -0
  86. capo_devops_agent/errors/conflict_exception.py +46 -0
  87. capo_devops_agent/errors/content_size_exceeded_exception.py +47 -0
  88. capo_devops_agent/errors/identity_center_service_exception.py +56 -0
  89. capo_devops_agent/errors/internal_server_exception.py +47 -0
  90. capo_devops_agent/errors/invalid_parameter_exception.py +48 -0
  91. capo_devops_agent/errors/resource_not_found_exception.py +48 -0
  92. capo_devops_agent/errors/service_quota_exceeded_exception.py +50 -0
  93. capo_devops_agent/errors/throttling_exception.py +46 -0
  94. capo_devops_agent/errors/validation_exception.py +71 -0
  95. capo_devops_agent/py.typed +0 -0
  96. capo_devops_agent/types/_prelude/blob.py +12 -0
  97. capo_devops_agent/types/_prelude/timestamp.py +17 -0
  98. capo_devops_agent/types/additional_service_details.py +312 -0
  99. capo_devops_agent/types/additional_service_registration_step.py +48 -0
  100. capo_devops_agent/types/agent_space.py +92 -0
  101. capo_devops_agent/types/agent_space_id.py +6 -0
  102. capo_devops_agent/types/agent_space_list.py +29 -0
  103. capo_devops_agent/types/agent_space_name.py +6 -0
  104. capo_devops_agent/types/api_key_value.py +6 -0
  105. capo_devops_agent/types/asset.py +85 -0
  106. capo_devops_agent/types/asset_content.py +65 -0
  107. capo_devops_agent/types/asset_file.py +92 -0
  108. capo_devops_agent/types/asset_file_body.py +53 -0
  109. capo_devops_agent/types/asset_file_bytes.py +16 -0
  110. capo_devops_agent/types/asset_file_content.py +51 -0
  111. capo_devops_agent/types/asset_file_path.py +6 -0
  112. capo_devops_agent/types/asset_file_summary.py +76 -0
  113. capo_devops_agent/types/asset_file_summary_list.py +31 -0
  114. capo_devops_agent/types/asset_file_text.py +6 -0
  115. capo_devops_agent/types/asset_id_list.py +14 -0
  116. capo_devops_agent/types/asset_list.py +29 -0
  117. capo_devops_agent/types/asset_type.py +6 -0
  118. capo_devops_agent/types/asset_type_list.py +31 -0
  119. capo_devops_agent/types/asset_type_summary.py +38 -0
  120. capo_devops_agent/types/asset_version_metadata.py +61 -0
  121. capo_devops_agent/types/asset_version_metadata_list.py +33 -0
  122. capo_devops_agent/types/asset_zip_bytes.py +16 -0
  123. capo_devops_agent/types/asset_zip_content.py +39 -0
  124. capo_devops_agent/types/assistant_message.py +33 -0
  125. capo_devops_agent/types/assistant_message_block.py +39 -0
  126. capo_devops_agent/types/associate_service_input.py +52 -0
  127. capo_devops_agent/types/associate_service_output.py +53 -0
  128. capo_devops_agent/types/association.py +112 -0
  129. capo_devops_agent/types/association_id.py +6 -0
  130. capo_devops_agent/types/associations_list.py +29 -0
  131. capo_devops_agent/types/auth_flow.py +19 -0
  132. capo_devops_agent/types/aws_configuration.py +56 -0
  133. capo_devops_agent/types/azure_configuration.py +26 -0
  134. capo_devops_agent/types/azure_dev_ops_configuration.py +42 -0
  135. capo_devops_agent/types/back_log_timestamp.py +21 -0
  136. capo_devops_agent/types/backlog_task_description.py +6 -0
  137. capo_devops_agent/types/backlog_task_title.py +6 -0
  138. capo_devops_agent/types/certificate_string.py +6 -0
  139. capo_devops_agent/types/chat_execution.py +68 -0
  140. capo_devops_agent/types/chat_execution_id.py +6 -0
  141. capo_devops_agent/types/chat_execution_list.py +31 -0
  142. capo_devops_agent/types/client_id.py +6 -0
  143. capo_devops_agent/types/client_secret.py +6 -0
  144. capo_devops_agent/types/create_agent_space_input.py +69 -0
  145. capo_devops_agent/types/create_agent_space_output.py +49 -0
  146. capo_devops_agent/types/create_asset_file_request.py +60 -0
  147. capo_devops_agent/types/create_asset_file_response.py +35 -0
  148. capo_devops_agent/types/create_asset_request.py +62 -0
  149. capo_devops_agent/types/create_asset_response.py +35 -0
  150. capo_devops_agent/types/create_backlog_task_request.py +94 -0
  151. capo_devops_agent/types/create_backlog_task_response.py +35 -0
  152. capo_devops_agent/types/create_chat_request.py +29 -0
  153. capo_devops_agent/types/create_chat_response.py +48 -0
  154. capo_devops_agent/types/create_private_connection_input.py +58 -0
  155. capo_devops_agent/types/create_private_connection_output.py +158 -0
  156. capo_devops_agent/types/custom_header_name.py +6 -0
  157. capo_devops_agent/types/custom_header_value.py +6 -0
  158. capo_devops_agent/types/custom_headers.py +29 -0
  159. capo_devops_agent/types/datadog_authorization_config.py +48 -0
  160. capo_devops_agent/types/datadog_service_details.py +68 -0
  161. capo_devops_agent/types/date_time.py +20 -0
  162. capo_devops_agent/types/delete_agent_space_input.py +24 -0
  163. capo_devops_agent/types/delete_agent_space_output.py +18 -0
  164. capo_devops_agent/types/delete_asset_file_request.py +30 -0
  165. capo_devops_agent/types/delete_asset_file_response.py +18 -0
  166. capo_devops_agent/types/delete_asset_request.py +27 -0
  167. capo_devops_agent/types/delete_asset_response.py +18 -0
  168. capo_devops_agent/types/delete_private_connection_input.py +24 -0
  169. capo_devops_agent/types/delete_private_connection_output.py +49 -0
  170. capo_devops_agent/types/deregister_service_input.py +24 -0
  171. capo_devops_agent/types/deregister_service_output.py +18 -0
  172. capo_devops_agent/types/describe_private_connection_input.py +24 -0
  173. capo_devops_agent/types/describe_private_connection_output.py +158 -0
  174. capo_devops_agent/types/description.py +6 -0
  175. capo_devops_agent/types/disable_operator_app_input.py +27 -0
  176. capo_devops_agent/types/disassociate_service_input.py +27 -0
  177. capo_devops_agent/types/disassociate_service_output.py +18 -0
  178. capo_devops_agent/types/document_list.py +14 -0
  179. capo_devops_agent/types/dynatrace_configuration.py +51 -0
  180. capo_devops_agent/types/dynatrace_o_auth_client_credentials_config.py +70 -0
  181. capo_devops_agent/types/dynatrace_resource_list.py +14 -0
  182. capo_devops_agent/types/dynatrace_service_authorization_config.py +52 -0
  183. capo_devops_agent/types/dynatrace_service_details.py +51 -0
  184. capo_devops_agent/types/email_address.py +6 -0
  185. capo_devops_agent/types/enable_operator_app_input.py +86 -0
  186. capo_devops_agent/types/enable_operator_app_output.py +88 -0
  187. capo_devops_agent/types/event_channel_configuration.py +18 -0
  188. capo_devops_agent/types/event_channel_details.py +36 -0
  189. capo_devops_agent/types/event_channel_type.py +15 -0
  190. capo_devops_agent/types/exchange_parameter_value.py +6 -0
  191. capo_devops_agent/types/exchange_parameters.py +27 -0
  192. capo_devops_agent/types/execution.py +111 -0
  193. capo_devops_agent/types/execution_list.py +29 -0
  194. capo_devops_agent/types/execution_status.py +21 -0
  195. capo_devops_agent/types/failure_message.py +6 -0
  196. capo_devops_agent/types/generic_webhook.py +62 -0
  197. capo_devops_agent/types/get_account_usage_input.py +18 -0
  198. capo_devops_agent/types/get_account_usage_output.py +143 -0
  199. capo_devops_agent/types/get_agent_space_input.py +24 -0
  200. capo_devops_agent/types/get_agent_space_output.py +49 -0
  201. capo_devops_agent/types/get_asset_content_request.py +29 -0
  202. capo_devops_agent/types/get_asset_content_response.py +46 -0
  203. capo_devops_agent/types/get_asset_file_request.py +32 -0
  204. capo_devops_agent/types/get_asset_file_response.py +35 -0
  205. capo_devops_agent/types/get_asset_request.py +29 -0
  206. capo_devops_agent/types/get_asset_response.py +35 -0
  207. capo_devops_agent/types/get_association_input.py +27 -0
  208. capo_devops_agent/types/get_association_output.py +38 -0
  209. capo_devops_agent/types/get_backlog_task_request.py +27 -0
  210. capo_devops_agent/types/get_backlog_task_response.py +35 -0
  211. capo_devops_agent/types/get_operator_app_input.py +24 -0
  212. capo_devops_agent/types/get_operator_app_output.py +78 -0
  213. capo_devops_agent/types/get_recommendation_request.py +29 -0
  214. capo_devops_agent/types/get_recommendation_response.py +39 -0
  215. capo_devops_agent/types/get_service_input.py +24 -0
  216. capo_devops_agent/types/get_service_output.py +49 -0
  217. capo_devops_agent/types/git_hub_configuration.py +67 -0
  218. capo_devops_agent/types/git_lab_configuration.py +39 -0
  219. capo_devops_agent/types/git_lab_details.py +60 -0
  220. capo_devops_agent/types/git_lab_token_type.py +18 -0
  221. capo_devops_agent/types/github_repo_owner_type.py +18 -0
  222. capo_devops_agent/types/goal.py +181 -0
  223. capo_devops_agent/types/goal_content.py +33 -0
  224. capo_devops_agent/types/goal_list.py +29 -0
  225. capo_devops_agent/types/goal_schedule.py +45 -0
  226. capo_devops_agent/types/goal_schedule_input.py +39 -0
  227. capo_devops_agent/types/goal_status.py +19 -0
  228. capo_devops_agent/types/goal_type.py +18 -0
  229. capo_devops_agent/types/grafana_service_details.py +68 -0
  230. capo_devops_agent/types/guid.py +6 -0
  231. capo_devops_agent/types/iam_auth_configuration.py +62 -0
  232. capo_devops_agent/types/idc_auth_configuration.py +75 -0
  233. capo_devops_agent/types/idp_auth_configuration.py +83 -0
  234. capo_devops_agent/types/idp_client_id.py +6 -0
  235. capo_devops_agent/types/idp_client_secret.py +6 -0
  236. capo_devops_agent/types/ip_address_or_dns_name.py +6 -0
  237. capo_devops_agent/types/ip_address_type.py +19 -0
  238. capo_devops_agent/types/journal_record.py +89 -0
  239. capo_devops_agent/types/journal_record_list.py +31 -0
  240. capo_devops_agent/types/journal_timestamp.py +21 -0
  241. capo_devops_agent/types/kms_key_arn.py +6 -0
  242. capo_devops_agent/types/list_agent_spaces_input.py +26 -0
  243. capo_devops_agent/types/list_agent_spaces_output.py +46 -0
  244. capo_devops_agent/types/list_asset_files_request.py +34 -0
  245. capo_devops_agent/types/list_asset_files_response.py +46 -0
  246. capo_devops_agent/types/list_asset_types_request.py +26 -0
  247. capo_devops_agent/types/list_asset_types_response.py +46 -0
  248. capo_devops_agent/types/list_asset_versions_request.py +32 -0
  249. capo_devops_agent/types/list_asset_versions_response.py +50 -0
  250. capo_devops_agent/types/list_assets_request.py +38 -0
  251. capo_devops_agent/types/list_assets_response.py +44 -0
  252. capo_devops_agent/types/list_associations_input.py +31 -0
  253. capo_devops_agent/types/list_associations_output.py +48 -0
  254. capo_devops_agent/types/list_backlog_tasks_request.py +84 -0
  255. capo_devops_agent/types/list_backlog_tasks_response.py +41 -0
  256. capo_devops_agent/types/list_chats_request.py +30 -0
  257. capo_devops_agent/types/list_chats_response.py +47 -0
  258. capo_devops_agent/types/list_executions_request.py +47 -0
  259. capo_devops_agent/types/list_executions_response.py +45 -0
  260. capo_devops_agent/types/list_goals_request.py +68 -0
  261. capo_devops_agent/types/list_goals_response.py +41 -0
  262. capo_devops_agent/types/list_journal_records_request.py +71 -0
  263. capo_devops_agent/types/list_journal_records_response.py +45 -0
  264. capo_devops_agent/types/list_of_security_group_ids.py +19 -0
  265. capo_devops_agent/types/list_of_subnet_ids.py +17 -0
  266. capo_devops_agent/types/list_pending_messages_request.py +33 -0
  267. capo_devops_agent/types/list_pending_messages_response.py +72 -0
  268. capo_devops_agent/types/list_private_connections_input.py +18 -0
  269. capo_devops_agent/types/list_private_connections_output.py +45 -0
  270. capo_devops_agent/types/list_recommendations_request.py +89 -0
  271. capo_devops_agent/types/list_recommendations_response.py +49 -0
  272. capo_devops_agent/types/list_services_input.py +29 -0
  273. capo_devops_agent/types/list_services_output.py +47 -0
  274. capo_devops_agent/types/list_tags_for_resource_request.py +19 -0
  275. capo_devops_agent/types/list_tags_for_resource_response.py +35 -0
  276. capo_devops_agent/types/list_webhooks_input.py +27 -0
  277. capo_devops_agent/types/list_webhooks_output.py +39 -0
  278. capo_devops_agent/types/locale.py +6 -0
  279. capo_devops_agent/types/max_ipv4_addresses_per_eni.py +6 -0
  280. capo_devops_agent/types/mcp_server_api_key_config.py +45 -0
  281. capo_devops_agent/types/mcp_server_authorization_config.py +138 -0
  282. capo_devops_agent/types/mcp_server_authorization_discovery_config.py +28 -0
  283. capo_devops_agent/types/mcp_server_authorization_method.py +20 -0
  284. capo_devops_agent/types/mcp_server_bearer_token_config.py +45 -0
  285. capo_devops_agent/types/mcp_server_configuration.py +37 -0
  286. capo_devops_agent/types/mcp_server_datadog_configuration.py +18 -0
  287. capo_devops_agent/types/mcp_server_details.py +66 -0
  288. capo_devops_agent/types/mcp_server_endpoint.py +6 -0
  289. capo_devops_agent/types/mcp_server_grafana_configuration.py +51 -0
  290. capo_devops_agent/types/mcp_server_name.py +6 -0
  291. capo_devops_agent/types/mcp_server_new_relic_configuration.py +33 -0
  292. capo_devops_agent/types/mcp_server_o_auth3_lo_config.py +106 -0
  293. capo_devops_agent/types/mcp_server_o_auth_client_credentials_config.py +90 -0
  294. capo_devops_agent/types/mcp_server_sig_v4_authorization_config.py +67 -0
  295. capo_devops_agent/types/mcp_server_sig_v4_configuration.py +37 -0
  296. capo_devops_agent/types/mcp_server_sig_v4_service_details.py +68 -0
  297. capo_devops_agent/types/mcp_server_splunk_configuration.py +18 -0
  298. capo_devops_agent/types/mcp_tools_list.py +14 -0
  299. capo_devops_agent/types/message.py +65 -0
  300. capo_devops_agent/types/message_content.py +6 -0
  301. capo_devops_agent/types/monitor_account_type.py +15 -0
  302. capo_devops_agent/types/new_relic_alert_policy_ids.py +14 -0
  303. capo_devops_agent/types/new_relic_api_key_config.py +117 -0
  304. capo_devops_agent/types/new_relic_application_ids.py +14 -0
  305. capo_devops_agent/types/new_relic_entity_guids.py +14 -0
  306. capo_devops_agent/types/new_relic_region.py +18 -0
  307. capo_devops_agent/types/new_relic_service_authorization_config.py +50 -0
  308. capo_devops_agent/types/new_relic_service_details.py +45 -0
  309. capo_devops_agent/types/next_token.py +6 -0
  310. capo_devops_agent/types/o_auth_additional_step_details.py +28 -0
  311. capo_devops_agent/types/o_auth_scope.py +6 -0
  312. capo_devops_agent/types/operator_app_url.py +6 -0
  313. capo_devops_agent/types/order_type.py +18 -0
  314. capo_devops_agent/types/pager_duty_authorization_config.py +48 -0
  315. capo_devops_agent/types/pager_duty_configuration.py +49 -0
  316. capo_devops_agent/types/pager_duty_details.py +59 -0
  317. capo_devops_agent/types/pager_duty_o_auth_client_credentials_config.py +70 -0
  318. capo_devops_agent/types/pager_duty_scopes.py +14 -0
  319. capo_devops_agent/types/pager_duty_scopes_list.py +14 -0
  320. capo_devops_agent/types/pager_duty_services_list.py +14 -0
  321. capo_devops_agent/types/pending_message.py +44 -0
  322. capo_devops_agent/types/pending_messages.py +31 -0
  323. capo_devops_agent/types/port_range.py +6 -0
  324. capo_devops_agent/types/port_ranges.py +17 -0
  325. capo_devops_agent/types/post_register_service_supported_service.py +28 -0
  326. capo_devops_agent/types/priority.py +21 -0
  327. capo_devops_agent/types/priority_list.py +29 -0
  328. capo_devops_agent/types/private_connection_mode.py +67 -0
  329. capo_devops_agent/types/private_connection_name.py +6 -0
  330. capo_devops_agent/types/private_connection_status.py +21 -0
  331. capo_devops_agent/types/private_connection_summary.py +147 -0
  332. capo_devops_agent/types/private_connection_summary_list.py +35 -0
  333. capo_devops_agent/types/private_connection_type.py +18 -0
  334. capo_devops_agent/types/recommendation.py +181 -0
  335. capo_devops_agent/types/recommendation_content.py +32 -0
  336. capo_devops_agent/types/recommendation_list.py +31 -0
  337. capo_devops_agent/types/recommendation_priority.py +19 -0
  338. capo_devops_agent/types/recommendation_status.py +22 -0
  339. capo_devops_agent/types/reference_input.py +58 -0
  340. capo_devops_agent/types/reference_output.py +53 -0
  341. capo_devops_agent/types/register_service_input.py +101 -0
  342. capo_devops_agent/types/register_service_output.py +67 -0
  343. capo_devops_agent/types/registered_azure_dev_ops_service_details.py +28 -0
  344. capo_devops_agent/types/registered_azure_identity_details.py +70 -0
  345. capo_devops_agent/types/registered_git_lab_service_details.py +52 -0
  346. capo_devops_agent/types/registered_github_service_details.py +54 -0
  347. capo_devops_agent/types/registered_grafana_server_details.py +53 -0
  348. capo_devops_agent/types/registered_mcp_server_details.py +72 -0
  349. capo_devops_agent/types/registered_mcp_server_sig_v4_details.py +89 -0
  350. capo_devops_agent/types/registered_new_relic_details.py +53 -0
  351. capo_devops_agent/types/registered_pager_duty_details.py +39 -0
  352. capo_devops_agent/types/registered_service.py +112 -0
  353. capo_devops_agent/types/registered_service_now_details.py +30 -0
  354. capo_devops_agent/types/registered_services_list.py +31 -0
  355. capo_devops_agent/types/registered_slack_service_details.py +33 -0
  356. capo_devops_agent/types/resource_config_dns_resolution.py +18 -0
  357. capo_devops_agent/types/resource_configuration_arn.py +6 -0
  358. capo_devops_agent/types/resource_gateway_arn.py +6 -0
  359. capo_devops_agent/types/resource_id.py +6 -0
  360. capo_devops_agent/types/role_arn.py +6 -0
  361. capo_devops_agent/types/scheduler_state.py +18 -0
  362. capo_devops_agent/types/scopes.py +17 -0
  363. capo_devops_agent/types/security_group_id.py +6 -0
  364. capo_devops_agent/types/self_managed_input.py +44 -0
  365. capo_devops_agent/types/send_message_content_block_delta.py +69 -0
  366. capo_devops_agent/types/send_message_content_block_delta_event.py +69 -0
  367. capo_devops_agent/types/send_message_content_block_start_event.py +62 -0
  368. capo_devops_agent/types/send_message_content_block_stop_event.py +62 -0
  369. capo_devops_agent/types/send_message_context.py +35 -0
  370. capo_devops_agent/types/send_message_events.py +218 -0
  371. capo_devops_agent/types/send_message_heartbeat_event.py +33 -0
  372. capo_devops_agent/types/send_message_json_delta.py +23 -0
  373. capo_devops_agent/types/send_message_request.py +81 -0
  374. capo_devops_agent/types/send_message_response.py +13 -0
  375. capo_devops_agent/types/send_message_response_completed_event.py +65 -0
  376. capo_devops_agent/types/send_message_response_created_event.py +44 -0
  377. capo_devops_agent/types/send_message_response_failed_event.py +56 -0
  378. capo_devops_agent/types/send_message_response_in_progress_event.py +44 -0
  379. capo_devops_agent/types/send_message_summary_event.py +44 -0
  380. capo_devops_agent/types/send_message_text_delta.py +23 -0
  381. capo_devops_agent/types/send_message_usage_info.py +35 -0
  382. capo_devops_agent/types/service.py +32 -0
  383. capo_devops_agent/types/service_configuration.py +404 -0
  384. capo_devops_agent/types/service_details.py +297 -0
  385. capo_devops_agent/types/service_id.py +6 -0
  386. capo_devops_agent/types/service_managed_input.py +149 -0
  387. capo_devops_agent/types/service_name.py +6 -0
  388. capo_devops_agent/types/service_now_authentication_scope_list.py +14 -0
  389. capo_devops_agent/types/service_now_configuration.py +48 -0
  390. capo_devops_agent/types/service_now_instance_url.py +6 -0
  391. capo_devops_agent/types/service_now_o_auth_client_credentials_config.py +70 -0
  392. capo_devops_agent/types/service_now_service_authorization_config.py +52 -0
  393. capo_devops_agent/types/service_now_service_details.py +54 -0
  394. capo_devops_agent/types/sig_v4_region.py +6 -0
  395. capo_devops_agent/types/slack_channel.py +32 -0
  396. capo_devops_agent/types/slack_configuration.py +59 -0
  397. capo_devops_agent/types/slack_transmission_target.py +55 -0
  398. capo_devops_agent/types/source_account_type.py +15 -0
  399. capo_devops_agent/types/source_aws_configuration.py +62 -0
  400. capo_devops_agent/types/subnet_id.py +6 -0
  401. capo_devops_agent/types/tag_key.py +6 -0
  402. capo_devops_agent/types/tag_key_list.py +17 -0
  403. capo_devops_agent/types/tag_resource_request.py +37 -0
  404. capo_devops_agent/types/tag_resource_response.py +18 -0
  405. capo_devops_agent/types/tag_value.py +6 -0
  406. capo_devops_agent/types/tags.py +29 -0
  407. capo_devops_agent/types/task.py +184 -0
  408. capo_devops_agent/types/task_filter.py +112 -0
  409. capo_devops_agent/types/task_list.py +29 -0
  410. capo_devops_agent/types/task_sort_field.py +18 -0
  411. capo_devops_agent/types/task_sort_order.py +18 -0
  412. capo_devops_agent/types/task_status.py +26 -0
  413. capo_devops_agent/types/task_status_list.py +29 -0
  414. capo_devops_agent/types/task_type.py +18 -0
  415. capo_devops_agent/types/task_type_list.py +29 -0
  416. capo_devops_agent/types/token_value.py +6 -0
  417. capo_devops_agent/types/untag_resource_request.py +26 -0
  418. capo_devops_agent/types/untag_resource_response.py +18 -0
  419. capo_devops_agent/types/update_agent_space_input.py +45 -0
  420. capo_devops_agent/types/update_agent_space_output.py +38 -0
  421. capo_devops_agent/types/update_asset_file_request.py +57 -0
  422. capo_devops_agent/types/update_asset_file_response.py +35 -0
  423. capo_devops_agent/types/update_asset_request.py +54 -0
  424. capo_devops_agent/types/update_asset_response.py +35 -0
  425. capo_devops_agent/types/update_association_input.py +47 -0
  426. capo_devops_agent/types/update_association_output.py +53 -0
  427. capo_devops_agent/types/update_backlog_task_request.py +48 -0
  428. capo_devops_agent/types/update_backlog_task_response.py +35 -0
  429. capo_devops_agent/types/update_goal_request.py +53 -0
  430. capo_devops_agent/types/update_goal_response.py +35 -0
  431. capo_devops_agent/types/update_operator_app_idp_config_input.py +33 -0
  432. capo_devops_agent/types/update_operator_app_idp_config_output.py +48 -0
  433. capo_devops_agent/types/update_private_connection_certificate_input.py +36 -0
  434. capo_devops_agent/types/update_private_connection_certificate_output.py +153 -0
  435. capo_devops_agent/types/update_recommendation_request.py +56 -0
  436. capo_devops_agent/types/update_recommendation_response.py +41 -0
  437. capo_devops_agent/types/usage_metric.py +41 -0
  438. capo_devops_agent/types/user_message.py +31 -0
  439. capo_devops_agent/types/user_message_block.py +37 -0
  440. capo_devops_agent/types/user_reference.py +46 -0
  441. capo_devops_agent/types/user_type.py +19 -0
  442. capo_devops_agent/types/validate_aws_associations_input.py +24 -0
  443. capo_devops_agent/types/validate_aws_associations_output.py +18 -0
  444. capo_devops_agent/types/validation_exception_field.py +33 -0
  445. capo_devops_agent/types/validation_exception_field_list.py +35 -0
  446. capo_devops_agent/types/validation_status.py +19 -0
  447. capo_devops_agent/types/vpc_id.py +6 -0
  448. capo_devops_agent/types/web_identity_token_audience_list.py +14 -0
  449. capo_devops_agent/types/webhook.py +52 -0
  450. capo_devops_agent/types/webhook_secret.py +6 -0
  451. capo_devops_agent/types/webhook_type.py +20 -0
  452. capo_devops_agent/types/webhooks_list.py +29 -0
  453. capo_devops_agent-0.1.0.dist-info/METADATA +101 -0
  454. capo_devops_agent-0.1.0.dist-info/RECORD +457 -0
  455. capo_devops_agent-0.1.0.dist-info/WHEEL +5 -0
  456. capo_devops_agent-0.1.0.dist-info/licenses/LICENSE +21 -0
  457. capo_devops_agent-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2498 @@
1
+ """Generated from Smithy shape ``com.amazonaws.devopsagent#DevOpsAgent``."""
2
+
3
+ import datetime
4
+ import uuid
5
+ import warnings
6
+ from collections.abc import AsyncGenerator, AsyncIterator
7
+ from contextlib import asynccontextmanager
8
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
9
+
10
+ from typing_extensions import Self, TypedDict
11
+ from zapros import AsyncBaseHandler, AsyncClient
12
+
13
+ import capo_devops_agent._auth._signers
14
+ import capo_devops_agent._auth._sigv4
15
+ from capo_devops_agent._auth._identity import Credentials
16
+ from capo_devops_agent._auth._providers import (
17
+ CredentialsProvider,
18
+ IdentityProvider,
19
+ StaticAwsCredentialsProvider,
20
+ default_aws_credentials_chain,
21
+ )
22
+ from capo_devops_agent._auth._zapros_handler import AuthMiddleware
23
+ from capo_devops_agent._pagination import resolve_path as _resolve_path
24
+ from capo_devops_agent._resources.dev_ops_agent.agent_space_resource import (
25
+ AsyncAgentSpaceResource,
26
+ )
27
+ from capo_devops_agent._resources.dev_ops_agent.private_connection_resource import (
28
+ AsyncPrivateConnectionResource,
29
+ )
30
+ from capo_devops_agent._resources.dev_ops_agent.service_resource import (
31
+ AsyncServiceResource,
32
+ )
33
+ from capo_devops_agent._services._aws_config import aaws_config
34
+ from capo_devops_agent._services._pipeline import (
35
+ AsyncInterceptor,
36
+ AsyncOperationOptions,
37
+ AsyncOperationRequest,
38
+ AsyncOperationResponse,
39
+ aexecute_pipeline,
40
+ aretry,
41
+ )
42
+
43
+ if TYPE_CHECKING:
44
+ import capo_devops_agent.types.agent_space_id
45
+ import capo_devops_agent.types.asset
46
+ import capo_devops_agent.types.asset_content
47
+ import capo_devops_agent.types.asset_file_body
48
+ import capo_devops_agent.types.asset_file_path
49
+ import capo_devops_agent.types.asset_file_summary
50
+ import capo_devops_agent.types.asset_id_list
51
+ import capo_devops_agent.types.asset_type
52
+ import capo_devops_agent.types.asset_type_summary
53
+ import capo_devops_agent.types.asset_version_metadata
54
+ import capo_devops_agent.types.backlog_task_description
55
+ import capo_devops_agent.types.backlog_task_title
56
+ import capo_devops_agent.types.chat_execution_id
57
+ import capo_devops_agent.types.create_asset_file_request
58
+ import capo_devops_agent.types.create_asset_file_response
59
+ import capo_devops_agent.types.create_asset_request
60
+ import capo_devops_agent.types.create_asset_response
61
+ import capo_devops_agent.types.create_backlog_task_request
62
+ import capo_devops_agent.types.create_backlog_task_response
63
+ import capo_devops_agent.types.create_chat_request
64
+ import capo_devops_agent.types.create_chat_response
65
+ import capo_devops_agent.types.delete_asset_file_request
66
+ import capo_devops_agent.types.delete_asset_file_response
67
+ import capo_devops_agent.types.delete_asset_request
68
+ import capo_devops_agent.types.delete_asset_response
69
+ import capo_devops_agent.types.execution
70
+ import capo_devops_agent.types.get_account_usage_input
71
+ import capo_devops_agent.types.get_account_usage_output
72
+ import capo_devops_agent.types.get_asset_content_request
73
+ import capo_devops_agent.types.get_asset_content_response
74
+ import capo_devops_agent.types.get_asset_file_request
75
+ import capo_devops_agent.types.get_asset_file_response
76
+ import capo_devops_agent.types.get_asset_request
77
+ import capo_devops_agent.types.get_asset_response
78
+ import capo_devops_agent.types.get_backlog_task_request
79
+ import capo_devops_agent.types.get_backlog_task_response
80
+ import capo_devops_agent.types.get_recommendation_request
81
+ import capo_devops_agent.types.get_recommendation_response
82
+ import capo_devops_agent.types.goal
83
+ import capo_devops_agent.types.goal_schedule_input
84
+ import capo_devops_agent.types.goal_status
85
+ import capo_devops_agent.types.goal_type
86
+ import capo_devops_agent.types.journal_record
87
+ import capo_devops_agent.types.list_asset_files_request
88
+ import capo_devops_agent.types.list_asset_files_response
89
+ import capo_devops_agent.types.list_asset_types_request
90
+ import capo_devops_agent.types.list_asset_types_response
91
+ import capo_devops_agent.types.list_asset_versions_request
92
+ import capo_devops_agent.types.list_asset_versions_response
93
+ import capo_devops_agent.types.list_assets_request
94
+ import capo_devops_agent.types.list_assets_response
95
+ import capo_devops_agent.types.list_backlog_tasks_request
96
+ import capo_devops_agent.types.list_backlog_tasks_response
97
+ import capo_devops_agent.types.list_chats_request
98
+ import capo_devops_agent.types.list_chats_response
99
+ import capo_devops_agent.types.list_executions_request
100
+ import capo_devops_agent.types.list_executions_response
101
+ import capo_devops_agent.types.list_goals_request
102
+ import capo_devops_agent.types.list_goals_response
103
+ import capo_devops_agent.types.list_journal_records_request
104
+ import capo_devops_agent.types.list_journal_records_response
105
+ import capo_devops_agent.types.list_pending_messages_request
106
+ import capo_devops_agent.types.list_pending_messages_response
107
+ import capo_devops_agent.types.list_recommendations_request
108
+ import capo_devops_agent.types.list_recommendations_response
109
+ import capo_devops_agent.types.list_tags_for_resource_request
110
+ import capo_devops_agent.types.list_tags_for_resource_response
111
+ import capo_devops_agent.types.message_content
112
+ import capo_devops_agent.types.next_token
113
+ import capo_devops_agent.types.order_type
114
+ import capo_devops_agent.types.priority
115
+ import capo_devops_agent.types.recommendation_priority
116
+ import capo_devops_agent.types.recommendation_status
117
+ import capo_devops_agent.types.reference_input
118
+ import capo_devops_agent.types.resource_id
119
+ import capo_devops_agent.types.send_message_context
120
+ import capo_devops_agent.types.send_message_request
121
+ import capo_devops_agent.types.send_message_response
122
+ import capo_devops_agent.types.tag_key_list
123
+ import capo_devops_agent.types.tag_resource_request
124
+ import capo_devops_agent.types.tag_resource_response
125
+ import capo_devops_agent.types.tags
126
+ import capo_devops_agent.types.task
127
+ import capo_devops_agent.types.task_filter
128
+ import capo_devops_agent.types.task_sort_field
129
+ import capo_devops_agent.types.task_sort_order
130
+ import capo_devops_agent.types.task_status
131
+ import capo_devops_agent.types.task_type
132
+ import capo_devops_agent.types.untag_resource_request
133
+ import capo_devops_agent.types.untag_resource_response
134
+ import capo_devops_agent.types.update_asset_file_request
135
+ import capo_devops_agent.types.update_asset_file_response
136
+ import capo_devops_agent.types.update_asset_request
137
+ import capo_devops_agent.types.update_asset_response
138
+ import capo_devops_agent.types.update_backlog_task_request
139
+ import capo_devops_agent.types.update_backlog_task_response
140
+ import capo_devops_agent.types.update_goal_request
141
+ import capo_devops_agent.types.update_goal_response
142
+ import capo_devops_agent.types.update_recommendation_request
143
+ import capo_devops_agent.types.update_recommendation_response
144
+ import capo_devops_agent.types.user_type
145
+
146
+
147
+ class AsyncDevOpsAgentClientConfig(TypedDict, total=False, closed=True):
148
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
149
+ retry_max_attempts: int | None
150
+ use_fips: bool | None
151
+ endpoint: str | None
152
+ region: str | None
153
+ credentials_provider: IdentityProvider[Credentials] | None
154
+
155
+
156
+ class AsyncDevOpsAgentClient:
157
+ """A client for the ``DevOpsAgent`` service.
158
+
159
+ Args:
160
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
161
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
162
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
163
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
164
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
165
+ region: The value of the ``AWS::Region`` endpoint parameter.
166
+ credentials: AWS credentials for request signing.
167
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
168
+ """
169
+
170
+ def __init__(
171
+ self,
172
+ http_handler: AsyncBaseHandler | None = None,
173
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
174
+ retry_max_attempts: int | None = None,
175
+ use_fips: bool | None = None,
176
+ endpoint: str | None = None,
177
+ region: str | None = None,
178
+ credentials: Credentials | None = None,
179
+ credentials_provider: CredentialsProvider | None = None,
180
+ ):
181
+ self._client = AsyncClient(http_handler).wrap_with_middleware(
182
+ lambda next: AuthMiddleware(next)
183
+ )
184
+ if credentials is not None and credentials_provider is not None:
185
+ warnings.warn(
186
+ "Both credentials and credentials_provider given; provider takes precedence"
187
+ )
188
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
189
+ credentials_provider
190
+ )
191
+ if resolved_credentials_provider is None and credentials is not None:
192
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
193
+ if resolved_credentials_provider is None and credentials is None:
194
+ resolved_credentials_provider = default_aws_credentials_chain(
195
+ AsyncClient(http_handler)
196
+ )
197
+ self._config = AsyncDevOpsAgentClientConfig(
198
+ {
199
+ "operation_interceptors": operation_interceptors or [],
200
+ "retry_max_attempts": retry_max_attempts,
201
+ "use_fips": use_fips,
202
+ "endpoint": endpoint,
203
+ "region": region,
204
+ "credentials_provider": resolved_credentials_provider,
205
+ }
206
+ )
207
+
208
+ # resources
209
+ self.agent_space_resource = AsyncAgentSpaceResource(self)
210
+ self.private_connection_resource = AsyncPrivateConnectionResource(self)
211
+ self.service_resource = AsyncServiceResource(self)
212
+
213
+ def operation_options(
214
+ self, config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None
215
+ ) -> tuple[Iterable[AsyncInterceptor[Any, Any]], AsyncOperationOptions]:
216
+ overrides: AsyncDevOpsAgentClientConfig = config_overrides or {}
217
+ interceptors_: list[AsyncInterceptor[Any, Any]] = [
218
+ *overrides.get(
219
+ "operation_interceptors", self._config.get("operation_interceptors", [])
220
+ ),
221
+ aaws_config(),
222
+ aretry(),
223
+ ]
224
+ options_: AsyncOperationOptions = AsyncOperationOptions(
225
+ client=self._client,
226
+ retry_max_attempts=overrides.get(
227
+ "retry_max_attempts", self._config.get("retry_max_attempts")
228
+ ),
229
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
230
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
231
+ region=overrides.get("region", self._config.get("region")),
232
+ credentials_provider=overrides.get(
233
+ "credentials_provider", self._config.get("credentials_provider")
234
+ ),
235
+ )
236
+ return interceptors_, options_
237
+
238
+ async def create_asset(
239
+ self,
240
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
241
+ asset_type: "capo_devops_agent.types.asset_type.AssetType",
242
+ content: "capo_devops_agent.types.asset_content.AssetContent",
243
+ *,
244
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
245
+ metadata: Optional[object] = None,
246
+ client_token: Optional[str] = None,
247
+ ) -> "capo_devops_agent.types.create_asset_response.CreateAssetResponse":
248
+ """<p>Creates a new asset in the specified agent space</p>
249
+
250
+ Args:
251
+ agent_space_id: <p>The unique identifier for the agent space where the asset will be created</p>
252
+ asset_type: <p>The type of asset to create</p>
253
+ metadata: <p>The metadata describing this asset</p>
254
+ content: <p>The content for the asset. Provide a single file or a zip bundle.</p>
255
+ client_token: <p>A unique, case-sensitive identifier used for idempotent asset creation</p>
256
+
257
+ Raises:
258
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
259
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
260
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
261
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
262
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
263
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
264
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
265
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
266
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
267
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
268
+ """
269
+
270
+ async def _handler(
271
+ req: "AsyncOperationRequest[capo_devops_agent.types.create_asset_request.CreateAssetRequest]",
272
+ ) -> AsyncOperationResponse[
273
+ "capo_devops_agent.types.create_asset_response.CreateAssetResponse"
274
+ ]:
275
+ import capo_devops_agent._operations.dev_ops_agent.create_asset
276
+
277
+ (
278
+ output,
279
+ http_response,
280
+ ) = await capo_devops_agent._operations.dev_ops_agent.create_asset.async_create_asset(
281
+ req.options, req.input
282
+ )
283
+ return AsyncOperationResponse(output=output, response=http_response)
284
+
285
+ interceptors_, options_ = self.operation_options(config_overrides)
286
+ input_: capo_devops_agent.types.create_asset_request.CreateAssetRequest = {
287
+ "agent_space_id": agent_space_id,
288
+ "asset_type": asset_type,
289
+ "content": content,
290
+ }
291
+ if metadata is not None:
292
+ input_["metadata"] = metadata
293
+ if client_token is None:
294
+ client_token = str(uuid.uuid4())
295
+ input_["client_token"] = client_token
296
+
297
+ response = await aexecute_pipeline(
298
+ AsyncOperationRequest(input=input_, options=options_),
299
+ handler=_handler,
300
+ interceptors=list(interceptors_),
301
+ )
302
+ await response.response.aclose()
303
+ return response.output
304
+
305
+ async def create_asset_file(
306
+ self,
307
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
308
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
309
+ path: "capo_devops_agent.types.asset_file_path.AssetFilePath",
310
+ content: "capo_devops_agent.types.asset_file_body.AssetFileBody",
311
+ *,
312
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
313
+ metadata: Optional[object] = None,
314
+ client_token: Optional[str] = None,
315
+ ) -> "capo_devops_agent.types.create_asset_file_response.CreateAssetFileResponse":
316
+ """<p>Creates a file in an asset</p>
317
+
318
+ Args:
319
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
320
+ asset_id: <p>The unique identifier of the asset to create the file in</p>
321
+ path: <p>The path of the file within the asset</p>
322
+ content: <p>The content of the file to create</p>
323
+ metadata: <p>Optional metadata describing this file</p>
324
+ client_token: <p>A unique, case-sensitive identifier used for idempotent asset file creation</p>
325
+
326
+ Raises:
327
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
328
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
329
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
330
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
331
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
332
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
333
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
334
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
335
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
336
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
337
+ """
338
+
339
+ async def _handler(
340
+ req: "AsyncOperationRequest[capo_devops_agent.types.create_asset_file_request.CreateAssetFileRequest]",
341
+ ) -> AsyncOperationResponse[
342
+ "capo_devops_agent.types.create_asset_file_response.CreateAssetFileResponse"
343
+ ]:
344
+ import capo_devops_agent._operations.dev_ops_agent.create_asset_file
345
+
346
+ (
347
+ output,
348
+ http_response,
349
+ ) = await capo_devops_agent._operations.dev_ops_agent.create_asset_file.async_create_asset_file(
350
+ req.options, req.input
351
+ )
352
+ return AsyncOperationResponse(output=output, response=http_response)
353
+
354
+ interceptors_, options_ = self.operation_options(config_overrides)
355
+ input_: capo_devops_agent.types.create_asset_file_request.CreateAssetFileRequest = {
356
+ "agent_space_id": agent_space_id,
357
+ "asset_id": asset_id,
358
+ "path": path,
359
+ "content": content,
360
+ }
361
+ if metadata is not None:
362
+ input_["metadata"] = metadata
363
+ if client_token is None:
364
+ client_token = str(uuid.uuid4())
365
+ input_["client_token"] = client_token
366
+
367
+ response = await aexecute_pipeline(
368
+ AsyncOperationRequest(input=input_, options=options_),
369
+ handler=_handler,
370
+ interceptors=list(interceptors_),
371
+ )
372
+ await response.response.aclose()
373
+ return response.output
374
+
375
+ async def create_backlog_task(
376
+ self,
377
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
378
+ task_type: "capo_devops_agent.types.task_type.TaskType",
379
+ title: "capo_devops_agent.types.backlog_task_title.BacklogTaskTitle",
380
+ priority: "capo_devops_agent.types.priority.Priority",
381
+ *,
382
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
383
+ reference: Optional[
384
+ "capo_devops_agent.types.reference_input.ReferenceInput"
385
+ ] = None,
386
+ description: Optional[
387
+ "capo_devops_agent.types.backlog_task_description.BacklogTaskDescription"
388
+ ] = None,
389
+ client_token: Optional[str] = None,
390
+ ) -> (
391
+ "capo_devops_agent.types.create_backlog_task_response.CreateBacklogTaskResponse"
392
+ ):
393
+ """<p>Creates a new backlog task in the specified agent space</p>
394
+
395
+ Args:
396
+ agent_space_id: <p>The unique identifier for the agent space where the task will be created</p>
397
+ reference: <p>Optional reference information for the task</p>
398
+ task_type: <p>The type of task being created</p>
399
+ title: <p>The title of the backlog task</p>
400
+ description: <p>Optional detailed description of the task</p>
401
+ priority: <p>The priority level of the task</p>
402
+ client_token: <p>Client-provided token for idempotent operations</p>
403
+
404
+ Raises:
405
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
406
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
407
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
408
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
409
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
410
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
411
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
412
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
413
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
414
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
415
+ """
416
+
417
+ async def _handler(
418
+ req: "AsyncOperationRequest[capo_devops_agent.types.create_backlog_task_request.CreateBacklogTaskRequest]",
419
+ ) -> AsyncOperationResponse[
420
+ "capo_devops_agent.types.create_backlog_task_response.CreateBacklogTaskResponse"
421
+ ]:
422
+ import capo_devops_agent._operations.dev_ops_agent.create_backlog_task
423
+
424
+ (
425
+ output,
426
+ http_response,
427
+ ) = await capo_devops_agent._operations.dev_ops_agent.create_backlog_task.async_create_backlog_task(
428
+ req.options, req.input
429
+ )
430
+ return AsyncOperationResponse(output=output, response=http_response)
431
+
432
+ interceptors_, options_ = self.operation_options(config_overrides)
433
+ input_: capo_devops_agent.types.create_backlog_task_request.CreateBacklogTaskRequest = {
434
+ "agent_space_id": agent_space_id,
435
+ "task_type": task_type,
436
+ "title": title,
437
+ "priority": priority,
438
+ }
439
+ if reference is not None:
440
+ input_["reference"] = reference
441
+ if description is not None:
442
+ input_["description"] = description
443
+ if client_token is None:
444
+ client_token = str(uuid.uuid4())
445
+ input_["client_token"] = client_token
446
+
447
+ response = await aexecute_pipeline(
448
+ AsyncOperationRequest(input=input_, options=options_),
449
+ handler=_handler,
450
+ interceptors=list(interceptors_),
451
+ )
452
+ await response.response.aclose()
453
+ return response.output
454
+
455
+ async def create_chat(
456
+ self,
457
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
458
+ *,
459
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
460
+ user_id: Optional["capo_devops_agent.types.resource_id.ResourceId"] = None,
461
+ user_type: Optional["capo_devops_agent.types.user_type.UserType"] = None,
462
+ ) -> "capo_devops_agent.types.create_chat_response.CreateChatResponse":
463
+ """<p>Creates a new chat execution in the specified agent space</p>
464
+
465
+ Args:
466
+ user_id: <p>The user identifier for the chat. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.</p>
467
+ user_type: <p>The authentication type of the user</p>
468
+
469
+ Raises:
470
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
471
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
472
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
473
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
474
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
475
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
476
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
477
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
478
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
479
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
480
+ """
481
+
482
+ async def _handler(
483
+ req: "AsyncOperationRequest[capo_devops_agent.types.create_chat_request.CreateChatRequest]",
484
+ ) -> AsyncOperationResponse[
485
+ "capo_devops_agent.types.create_chat_response.CreateChatResponse"
486
+ ]:
487
+ import capo_devops_agent._operations.dev_ops_agent.create_chat
488
+
489
+ (
490
+ output,
491
+ http_response,
492
+ ) = await capo_devops_agent._operations.dev_ops_agent.create_chat.async_create_chat(
493
+ req.options, req.input
494
+ )
495
+ return AsyncOperationResponse(output=output, response=http_response)
496
+
497
+ interceptors_, options_ = self.operation_options(config_overrides)
498
+ input_: capo_devops_agent.types.create_chat_request.CreateChatRequest = {
499
+ "agent_space_id": agent_space_id
500
+ }
501
+ if user_id is not None:
502
+ input_["user_id"] = user_id
503
+ if user_type is not None:
504
+ input_["user_type"] = user_type
505
+
506
+ response = await aexecute_pipeline(
507
+ AsyncOperationRequest(input=input_, options=options_),
508
+ handler=_handler,
509
+ interceptors=list(interceptors_),
510
+ )
511
+ await response.response.aclose()
512
+ return response.output
513
+
514
+ async def delete_asset(
515
+ self,
516
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
517
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
518
+ *,
519
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
520
+ ) -> "capo_devops_agent.types.delete_asset_response.DeleteAssetResponse":
521
+ """<p>Deletes an asset and all its files from the specified agent space</p>
522
+
523
+ Args:
524
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
525
+ asset_id: <p>The unique identifier of the asset to delete</p>
526
+
527
+ Raises:
528
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
529
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
530
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
531
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
532
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
533
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
534
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
535
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
536
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
537
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
538
+ """
539
+
540
+ async def _handler(
541
+ req: "AsyncOperationRequest[capo_devops_agent.types.delete_asset_request.DeleteAssetRequest]",
542
+ ) -> AsyncOperationResponse[
543
+ "capo_devops_agent.types.delete_asset_response.DeleteAssetResponse"
544
+ ]:
545
+ import capo_devops_agent._operations.dev_ops_agent.delete_asset
546
+
547
+ (
548
+ output,
549
+ http_response,
550
+ ) = await capo_devops_agent._operations.dev_ops_agent.delete_asset.async_delete_asset(
551
+ req.options, req.input
552
+ )
553
+ return AsyncOperationResponse(output=output, response=http_response)
554
+
555
+ interceptors_, options_ = self.operation_options(config_overrides)
556
+ input_: capo_devops_agent.types.delete_asset_request.DeleteAssetRequest = {
557
+ "agent_space_id": agent_space_id,
558
+ "asset_id": asset_id,
559
+ }
560
+
561
+ response = await aexecute_pipeline(
562
+ AsyncOperationRequest(input=input_, options=options_),
563
+ handler=_handler,
564
+ interceptors=list(interceptors_),
565
+ )
566
+ await response.response.aclose()
567
+ return response.output
568
+
569
+ async def delete_asset_file(
570
+ self,
571
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
572
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
573
+ path: "capo_devops_agent.types.asset_file_path.AssetFilePath",
574
+ *,
575
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
576
+ ) -> "capo_devops_agent.types.delete_asset_file_response.DeleteAssetFileResponse":
577
+ """<p>Deletes a file from an asset</p>
578
+
579
+ Args:
580
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
581
+ asset_id: <p>The unique identifier of the asset containing the file</p>
582
+ path: <p>The path of the file within the asset to delete</p>
583
+
584
+ Raises:
585
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
586
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
587
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
588
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
589
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
590
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
591
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
592
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
593
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
594
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
595
+ """
596
+
597
+ async def _handler(
598
+ req: "AsyncOperationRequest[capo_devops_agent.types.delete_asset_file_request.DeleteAssetFileRequest]",
599
+ ) -> AsyncOperationResponse[
600
+ "capo_devops_agent.types.delete_asset_file_response.DeleteAssetFileResponse"
601
+ ]:
602
+ import capo_devops_agent._operations.dev_ops_agent.delete_asset_file
603
+
604
+ (
605
+ output,
606
+ http_response,
607
+ ) = await capo_devops_agent._operations.dev_ops_agent.delete_asset_file.async_delete_asset_file(
608
+ req.options, req.input
609
+ )
610
+ return AsyncOperationResponse(output=output, response=http_response)
611
+
612
+ interceptors_, options_ = self.operation_options(config_overrides)
613
+ input_: capo_devops_agent.types.delete_asset_file_request.DeleteAssetFileRequest = {
614
+ "agent_space_id": agent_space_id,
615
+ "asset_id": asset_id,
616
+ "path": path,
617
+ }
618
+
619
+ response = await aexecute_pipeline(
620
+ AsyncOperationRequest(input=input_, options=options_),
621
+ handler=_handler,
622
+ interceptors=list(interceptors_),
623
+ )
624
+ await response.response.aclose()
625
+ return response.output
626
+
627
+ async def get_account_usage(
628
+ self, *, config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None
629
+ ) -> "capo_devops_agent.types.get_account_usage_output.GetAccountUsageOutput":
630
+ """<p>Retrieves monthly account usage metrics and limits for the AWS account.</p>
631
+
632
+ Raises:
633
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
634
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
635
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
636
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
637
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
638
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
639
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
640
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
641
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
642
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
643
+ """
644
+
645
+ async def _handler(
646
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_account_usage_input.GetAccountUsageInput]",
647
+ ) -> AsyncOperationResponse[
648
+ "capo_devops_agent.types.get_account_usage_output.GetAccountUsageOutput"
649
+ ]:
650
+ import capo_devops_agent._operations.dev_ops_agent.get_account_usage
651
+
652
+ (
653
+ output,
654
+ http_response,
655
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_account_usage.async_get_account_usage(
656
+ req.options, req.input
657
+ )
658
+ return AsyncOperationResponse(output=output, response=http_response)
659
+
660
+ interceptors_, options_ = self.operation_options(config_overrides)
661
+ input_: capo_devops_agent.types.get_account_usage_input.GetAccountUsageInput = {}
662
+
663
+ response = await aexecute_pipeline(
664
+ AsyncOperationRequest(input=input_, options=options_),
665
+ handler=_handler,
666
+ interceptors=list(interceptors_),
667
+ )
668
+ await response.response.aclose()
669
+ return response.output
670
+
671
+ async def get_asset(
672
+ self,
673
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
674
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
675
+ *,
676
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
677
+ asset_version: Optional[int] = None,
678
+ ) -> "capo_devops_agent.types.get_asset_response.GetAssetResponse":
679
+ """<p>Gets an asset from the specified agent space</p>
680
+
681
+ Args:
682
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
683
+ asset_id: <p>The unique identifier of the asset to retrieve</p>
684
+ asset_version: <p>The specific version of the asset to retrieve. If omitted, the latest version is returned.</p>
685
+
686
+ Raises:
687
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
688
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
689
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
690
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
691
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
692
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
693
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
694
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
695
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
696
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
697
+ """
698
+
699
+ async def _handler(
700
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_asset_request.GetAssetRequest]",
701
+ ) -> AsyncOperationResponse[
702
+ "capo_devops_agent.types.get_asset_response.GetAssetResponse"
703
+ ]:
704
+ import capo_devops_agent._operations.dev_ops_agent.get_asset
705
+
706
+ (
707
+ output,
708
+ http_response,
709
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_asset.async_get_asset(
710
+ req.options, req.input
711
+ )
712
+ return AsyncOperationResponse(output=output, response=http_response)
713
+
714
+ interceptors_, options_ = self.operation_options(config_overrides)
715
+ input_: capo_devops_agent.types.get_asset_request.GetAssetRequest = {
716
+ "agent_space_id": agent_space_id,
717
+ "asset_id": asset_id,
718
+ }
719
+ if asset_version is not None:
720
+ input_["asset_version"] = asset_version
721
+
722
+ response = await aexecute_pipeline(
723
+ AsyncOperationRequest(input=input_, options=options_),
724
+ handler=_handler,
725
+ interceptors=list(interceptors_),
726
+ )
727
+ await response.response.aclose()
728
+ return response.output
729
+
730
+ async def get_asset_content(
731
+ self,
732
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
733
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
734
+ *,
735
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
736
+ asset_version: Optional[int] = None,
737
+ ) -> "capo_devops_agent.types.get_asset_content_response.GetAssetContentResponse":
738
+ """<p>Gets an asset's content as a zip bundle</p>
739
+
740
+ Args:
741
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
742
+ asset_id: <p>The unique identifier of the asset</p>
743
+ asset_version: <p>The specific asset version to export. If omitted, the latest version is returned.</p>
744
+
745
+ Raises:
746
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
747
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
748
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
749
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
750
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
751
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
752
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
753
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
754
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
755
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
756
+ """
757
+
758
+ async def _handler(
759
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_asset_content_request.GetAssetContentRequest]",
760
+ ) -> AsyncOperationResponse[
761
+ "capo_devops_agent.types.get_asset_content_response.GetAssetContentResponse"
762
+ ]:
763
+ import capo_devops_agent._operations.dev_ops_agent.get_asset_content
764
+
765
+ (
766
+ output,
767
+ http_response,
768
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_asset_content.async_get_asset_content(
769
+ req.options, req.input
770
+ )
771
+ return AsyncOperationResponse(output=output, response=http_response)
772
+
773
+ interceptors_, options_ = self.operation_options(config_overrides)
774
+ input_: capo_devops_agent.types.get_asset_content_request.GetAssetContentRequest = {
775
+ "agent_space_id": agent_space_id,
776
+ "asset_id": asset_id,
777
+ }
778
+ if asset_version is not None:
779
+ input_["asset_version"] = asset_version
780
+
781
+ response = await aexecute_pipeline(
782
+ AsyncOperationRequest(input=input_, options=options_),
783
+ handler=_handler,
784
+ interceptors=list(interceptors_),
785
+ )
786
+ await response.response.aclose()
787
+ return response.output
788
+
789
+ async def get_asset_file(
790
+ self,
791
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
792
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
793
+ path: "capo_devops_agent.types.asset_file_path.AssetFilePath",
794
+ *,
795
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
796
+ asset_version: Optional[int] = None,
797
+ ) -> "capo_devops_agent.types.get_asset_file_response.GetAssetFileResponse":
798
+ """<p>Gets a file from an asset</p>
799
+
800
+ Args:
801
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
802
+ asset_id: <p>The unique identifier of the asset containing the file</p>
803
+ path: <p>The path of the file within the asset to retrieve</p>
804
+ asset_version: <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
805
+
806
+ Raises:
807
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
808
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
809
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
810
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
811
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
812
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
813
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
814
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
815
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
816
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
817
+ """
818
+
819
+ async def _handler(
820
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_asset_file_request.GetAssetFileRequest]",
821
+ ) -> AsyncOperationResponse[
822
+ "capo_devops_agent.types.get_asset_file_response.GetAssetFileResponse"
823
+ ]:
824
+ import capo_devops_agent._operations.dev_ops_agent.get_asset_file
825
+
826
+ (
827
+ output,
828
+ http_response,
829
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_asset_file.async_get_asset_file(
830
+ req.options, req.input
831
+ )
832
+ return AsyncOperationResponse(output=output, response=http_response)
833
+
834
+ interceptors_, options_ = self.operation_options(config_overrides)
835
+ input_: capo_devops_agent.types.get_asset_file_request.GetAssetFileRequest = {
836
+ "agent_space_id": agent_space_id,
837
+ "asset_id": asset_id,
838
+ "path": path,
839
+ }
840
+ if asset_version is not None:
841
+ input_["asset_version"] = asset_version
842
+
843
+ response = await aexecute_pipeline(
844
+ AsyncOperationRequest(input=input_, options=options_),
845
+ handler=_handler,
846
+ interceptors=list(interceptors_),
847
+ )
848
+ await response.response.aclose()
849
+ return response.output
850
+
851
+ async def get_backlog_task(
852
+ self,
853
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
854
+ task_id: "capo_devops_agent.types.resource_id.ResourceId",
855
+ *,
856
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
857
+ ) -> "capo_devops_agent.types.get_backlog_task_response.GetBacklogTaskResponse":
858
+ """<p>Gets a backlog task for the specified agent space and task id</p>
859
+
860
+ Args:
861
+ agent_space_id: <p>The unique identifier for the agent space containing the task</p>
862
+ task_id: <p>The unique identifier of the task to retrieve</p>
863
+
864
+ Raises:
865
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
866
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
867
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
868
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
869
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
870
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
871
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
872
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
873
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
874
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
875
+ """
876
+
877
+ async def _handler(
878
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_backlog_task_request.GetBacklogTaskRequest]",
879
+ ) -> AsyncOperationResponse[
880
+ "capo_devops_agent.types.get_backlog_task_response.GetBacklogTaskResponse"
881
+ ]:
882
+ import capo_devops_agent._operations.dev_ops_agent.get_backlog_task
883
+
884
+ (
885
+ output,
886
+ http_response,
887
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_backlog_task.async_get_backlog_task(
888
+ req.options, req.input
889
+ )
890
+ return AsyncOperationResponse(output=output, response=http_response)
891
+
892
+ interceptors_, options_ = self.operation_options(config_overrides)
893
+ input_: capo_devops_agent.types.get_backlog_task_request.GetBacklogTaskRequest = {
894
+ "agent_space_id": agent_space_id,
895
+ "task_id": task_id,
896
+ }
897
+
898
+ response = await aexecute_pipeline(
899
+ AsyncOperationRequest(input=input_, options=options_),
900
+ handler=_handler,
901
+ interceptors=list(interceptors_),
902
+ )
903
+ await response.response.aclose()
904
+ return response.output
905
+
906
+ async def get_recommendation(
907
+ self,
908
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
909
+ recommendation_id: "capo_devops_agent.types.resource_id.ResourceId",
910
+ *,
911
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
912
+ recommendation_version: Optional[int] = None,
913
+ ) -> (
914
+ "capo_devops_agent.types.get_recommendation_response.GetRecommendationResponse"
915
+ ):
916
+ """<p>Retrieves a specific recommendation by its ID</p>
917
+
918
+ Args:
919
+ agent_space_id: <p>The unique identifier for the agent space containing the recommendation</p>
920
+ recommendation_id: <p>The unique identifier for the recommendation to retrieve</p>
921
+ recommendation_version: <p>Specific version of the recommendation to retrieve. If not specified, returns the latest version.</p>
922
+
923
+ Raises:
924
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
925
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
926
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
927
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
928
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
929
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
930
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
931
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
932
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
933
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
934
+ """
935
+
936
+ async def _handler(
937
+ req: "AsyncOperationRequest[capo_devops_agent.types.get_recommendation_request.GetRecommendationRequest]",
938
+ ) -> AsyncOperationResponse[
939
+ "capo_devops_agent.types.get_recommendation_response.GetRecommendationResponse"
940
+ ]:
941
+ import capo_devops_agent._operations.dev_ops_agent.get_recommendation
942
+
943
+ (
944
+ output,
945
+ http_response,
946
+ ) = await capo_devops_agent._operations.dev_ops_agent.get_recommendation.async_get_recommendation(
947
+ req.options, req.input
948
+ )
949
+ return AsyncOperationResponse(output=output, response=http_response)
950
+
951
+ interceptors_, options_ = self.operation_options(config_overrides)
952
+ input_: capo_devops_agent.types.get_recommendation_request.GetRecommendationRequest = {
953
+ "agent_space_id": agent_space_id,
954
+ "recommendation_id": recommendation_id,
955
+ }
956
+ if recommendation_version is not None:
957
+ input_["recommendation_version"] = recommendation_version
958
+
959
+ response = await aexecute_pipeline(
960
+ AsyncOperationRequest(input=input_, options=options_),
961
+ handler=_handler,
962
+ interceptors=list(interceptors_),
963
+ )
964
+ await response.response.aclose()
965
+ return response.output
966
+
967
+ async def list_asset_files(
968
+ self,
969
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
970
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
971
+ *,
972
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
973
+ asset_version: Optional[int] = None,
974
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
975
+ max_results: Optional[int] = None,
976
+ ) -> "capo_devops_agent.types.list_asset_files_response.ListAssetFilesResponse":
977
+ """<p>Lists files in an asset</p>
978
+
979
+ Args:
980
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
981
+ asset_id: <p>The unique identifier of the asset whose files to list</p>
982
+ asset_version: <p>The specific asset version to list files from. If omitted, files from the latest version are returned.</p>
983
+ next_token: <p>Pagination token from a previous response to retrieve the next page of results</p>
984
+ max_results: <p>The maximum number of results to return in a single response</p>
985
+
986
+ Raises:
987
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
988
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
989
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
990
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
991
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
992
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
993
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
994
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
995
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
996
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
997
+ """
998
+
999
+ async def _handler(
1000
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_asset_files_request.ListAssetFilesRequest]",
1001
+ ) -> AsyncOperationResponse[
1002
+ "capo_devops_agent.types.list_asset_files_response.ListAssetFilesResponse"
1003
+ ]:
1004
+ import capo_devops_agent._operations.dev_ops_agent.list_asset_files
1005
+
1006
+ (
1007
+ output,
1008
+ http_response,
1009
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_asset_files.async_list_asset_files(
1010
+ req.options, req.input
1011
+ )
1012
+ return AsyncOperationResponse(output=output, response=http_response)
1013
+
1014
+ interceptors_, options_ = self.operation_options(config_overrides)
1015
+ input_: capo_devops_agent.types.list_asset_files_request.ListAssetFilesRequest = {
1016
+ "agent_space_id": agent_space_id,
1017
+ "asset_id": asset_id,
1018
+ }
1019
+ if asset_version is not None:
1020
+ input_["asset_version"] = asset_version
1021
+ if next_token is not None:
1022
+ input_["next_token"] = next_token
1023
+ if max_results is not None:
1024
+ input_["max_results"] = max_results
1025
+
1026
+ response = await aexecute_pipeline(
1027
+ AsyncOperationRequest(input=input_, options=options_),
1028
+ handler=_handler,
1029
+ interceptors=list(interceptors_),
1030
+ )
1031
+ await response.response.aclose()
1032
+ return response.output
1033
+
1034
+ async def iter_list_asset_files(
1035
+ self,
1036
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1037
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
1038
+ *,
1039
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1040
+ asset_version: Optional[int] = None,
1041
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1042
+ max_results: Optional[int] = None,
1043
+ ) -> "AsyncIterator[capo_devops_agent.types.asset_file_summary.AssetFileSummary]":
1044
+ _token = next_token
1045
+ while True:
1046
+ _response = await self.list_asset_files(
1047
+ agent_space_id,
1048
+ asset_id,
1049
+ config_overrides=config_overrides,
1050
+ asset_version=asset_version,
1051
+ next_token=_token,
1052
+ max_results=max_results,
1053
+ )
1054
+ _page = _resolve_path(_response, ("items",))
1055
+ for _item in _page or []:
1056
+ yield _item
1057
+ _token = _resolve_path(_response, ("next_token",))
1058
+ if not _token:
1059
+ break
1060
+
1061
+ async def list_assets(
1062
+ self,
1063
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1064
+ *,
1065
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1066
+ asset_type: Optional["capo_devops_agent.types.asset_type.AssetType"] = None,
1067
+ updated_after: Optional[datetime.datetime] = None,
1068
+ updated_before: Optional[datetime.datetime] = None,
1069
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1070
+ max_results: Optional[int] = None,
1071
+ ) -> "capo_devops_agent.types.list_assets_response.ListAssetsResponse":
1072
+ """<p>Lists assets in the specified agent space</p>
1073
+
1074
+ Args:
1075
+ agent_space_id: <p>The unique identifier for the agent space to list assets from</p>
1076
+ asset_type: <p>Filter results to only assets of this type</p>
1077
+ updated_after: <p>Filter results to only assets updated after this timestamp</p>
1078
+ updated_before: <p>Filter results to only assets updated before this timestamp</p>
1079
+ next_token: <p>Pagination token from a previous response to retrieve the next page of results</p>
1080
+ max_results: <p>The maximum number of results to return in a single response</p>
1081
+
1082
+ Raises:
1083
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1084
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1085
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1086
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1087
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1088
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1089
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1090
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1091
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1092
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1093
+ """
1094
+
1095
+ async def _handler(
1096
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_assets_request.ListAssetsRequest]",
1097
+ ) -> AsyncOperationResponse[
1098
+ "capo_devops_agent.types.list_assets_response.ListAssetsResponse"
1099
+ ]:
1100
+ import capo_devops_agent._operations.dev_ops_agent.list_assets
1101
+
1102
+ (
1103
+ output,
1104
+ http_response,
1105
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_assets.async_list_assets(
1106
+ req.options, req.input
1107
+ )
1108
+ return AsyncOperationResponse(output=output, response=http_response)
1109
+
1110
+ interceptors_, options_ = self.operation_options(config_overrides)
1111
+ input_: capo_devops_agent.types.list_assets_request.ListAssetsRequest = {
1112
+ "agent_space_id": agent_space_id
1113
+ }
1114
+ if asset_type is not None:
1115
+ input_["asset_type"] = asset_type
1116
+ if updated_after is not None:
1117
+ input_["updated_after"] = updated_after
1118
+ if updated_before is not None:
1119
+ input_["updated_before"] = updated_before
1120
+ if next_token is not None:
1121
+ input_["next_token"] = next_token
1122
+ if max_results is not None:
1123
+ input_["max_results"] = max_results
1124
+
1125
+ response = await aexecute_pipeline(
1126
+ AsyncOperationRequest(input=input_, options=options_),
1127
+ handler=_handler,
1128
+ interceptors=list(interceptors_),
1129
+ )
1130
+ await response.response.aclose()
1131
+ return response.output
1132
+
1133
+ async def iter_list_assets(
1134
+ self,
1135
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1136
+ *,
1137
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1138
+ asset_type: Optional["capo_devops_agent.types.asset_type.AssetType"] = None,
1139
+ updated_after: Optional[datetime.datetime] = None,
1140
+ updated_before: Optional[datetime.datetime] = None,
1141
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1142
+ max_results: Optional[int] = None,
1143
+ ) -> "AsyncIterator[capo_devops_agent.types.asset.Asset]":
1144
+ _token = next_token
1145
+ while True:
1146
+ _response = await self.list_assets(
1147
+ agent_space_id,
1148
+ config_overrides=config_overrides,
1149
+ asset_type=asset_type,
1150
+ updated_after=updated_after,
1151
+ updated_before=updated_before,
1152
+ next_token=_token,
1153
+ max_results=max_results,
1154
+ )
1155
+ _page = _resolve_path(_response, ("items",))
1156
+ for _item in _page or []:
1157
+ yield _item
1158
+ _token = _resolve_path(_response, ("next_token",))
1159
+ if not _token:
1160
+ break
1161
+
1162
+ async def list_asset_types(
1163
+ self,
1164
+ *,
1165
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1166
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1167
+ max_results: Optional[int] = None,
1168
+ ) -> "capo_devops_agent.types.list_asset_types_response.ListAssetTypesResponse":
1169
+ """<p>Lists the supported asset types</p>
1170
+
1171
+ Args:
1172
+ next_token: <p>Pagination token from a previous response to retrieve the next page of results</p>
1173
+ max_results: <p>The maximum number of results to return in a single response</p>
1174
+
1175
+ Raises:
1176
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1177
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1178
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1179
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1180
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1181
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1182
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1183
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1184
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1185
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1186
+ """
1187
+
1188
+ async def _handler(
1189
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_asset_types_request.ListAssetTypesRequest]",
1190
+ ) -> AsyncOperationResponse[
1191
+ "capo_devops_agent.types.list_asset_types_response.ListAssetTypesResponse"
1192
+ ]:
1193
+ import capo_devops_agent._operations.dev_ops_agent.list_asset_types
1194
+
1195
+ (
1196
+ output,
1197
+ http_response,
1198
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_asset_types.async_list_asset_types(
1199
+ req.options, req.input
1200
+ )
1201
+ return AsyncOperationResponse(output=output, response=http_response)
1202
+
1203
+ interceptors_, options_ = self.operation_options(config_overrides)
1204
+ input_: capo_devops_agent.types.list_asset_types_request.ListAssetTypesRequest = {}
1205
+ if next_token is not None:
1206
+ input_["next_token"] = next_token
1207
+ if max_results is not None:
1208
+ input_["max_results"] = max_results
1209
+
1210
+ response = await aexecute_pipeline(
1211
+ AsyncOperationRequest(input=input_, options=options_),
1212
+ handler=_handler,
1213
+ interceptors=list(interceptors_),
1214
+ )
1215
+ await response.response.aclose()
1216
+ return response.output
1217
+
1218
+ async def iter_list_asset_types(
1219
+ self,
1220
+ *,
1221
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1222
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1223
+ max_results: Optional[int] = None,
1224
+ ) -> "AsyncIterator[capo_devops_agent.types.asset_type_summary.AssetTypeSummary]":
1225
+ _token = next_token
1226
+ while True:
1227
+ _response = await self.list_asset_types(
1228
+ config_overrides=config_overrides,
1229
+ next_token=_token,
1230
+ max_results=max_results,
1231
+ )
1232
+ _page = _resolve_path(_response, ("items",))
1233
+ for _item in _page or []:
1234
+ yield _item
1235
+ _token = _resolve_path(_response, ("next_token",))
1236
+ if not _token:
1237
+ break
1238
+
1239
+ async def list_asset_versions(
1240
+ self,
1241
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1242
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
1243
+ *,
1244
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1245
+ max_results: Optional[int] = None,
1246
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1247
+ ) -> (
1248
+ "capo_devops_agent.types.list_asset_versions_response.ListAssetVersionsResponse"
1249
+ ):
1250
+ """<p>Lists versions of an asset in the specified agent space</p>
1251
+
1252
+ Args:
1253
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
1254
+ asset_id: <p>The unique identifier of the asset whose versions to list</p>
1255
+ max_results: <p>The maximum number of results to return in a single response</p>
1256
+ next_token: <p>Pagination token from a previous response to retrieve the next page of results</p>
1257
+
1258
+ Raises:
1259
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1260
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1261
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1262
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1263
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1264
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1265
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1266
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1267
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1268
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1269
+ """
1270
+
1271
+ async def _handler(
1272
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_asset_versions_request.ListAssetVersionsRequest]",
1273
+ ) -> AsyncOperationResponse[
1274
+ "capo_devops_agent.types.list_asset_versions_response.ListAssetVersionsResponse"
1275
+ ]:
1276
+ import capo_devops_agent._operations.dev_ops_agent.list_asset_versions
1277
+
1278
+ (
1279
+ output,
1280
+ http_response,
1281
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_asset_versions.async_list_asset_versions(
1282
+ req.options, req.input
1283
+ )
1284
+ return AsyncOperationResponse(output=output, response=http_response)
1285
+
1286
+ interceptors_, options_ = self.operation_options(config_overrides)
1287
+ input_: capo_devops_agent.types.list_asset_versions_request.ListAssetVersionsRequest = {
1288
+ "agent_space_id": agent_space_id,
1289
+ "asset_id": asset_id,
1290
+ }
1291
+ if max_results is not None:
1292
+ input_["max_results"] = max_results
1293
+ if next_token is not None:
1294
+ input_["next_token"] = next_token
1295
+
1296
+ response = await aexecute_pipeline(
1297
+ AsyncOperationRequest(input=input_, options=options_),
1298
+ handler=_handler,
1299
+ interceptors=list(interceptors_),
1300
+ )
1301
+ await response.response.aclose()
1302
+ return response.output
1303
+
1304
+ async def iter_list_asset_versions(
1305
+ self,
1306
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1307
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
1308
+ *,
1309
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1310
+ max_results: Optional[int] = None,
1311
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1312
+ ) -> "AsyncIterator[capo_devops_agent.types.asset_version_metadata.AssetVersionMetadata]":
1313
+ _token = next_token
1314
+ while True:
1315
+ _response = await self.list_asset_versions(
1316
+ agent_space_id,
1317
+ asset_id,
1318
+ config_overrides=config_overrides,
1319
+ max_results=max_results,
1320
+ next_token=_token,
1321
+ )
1322
+ _page = _resolve_path(_response, ("items",))
1323
+ for _item in _page or []:
1324
+ yield _item
1325
+ _token = _resolve_path(_response, ("next_token",))
1326
+ if not _token:
1327
+ break
1328
+
1329
+ async def list_backlog_tasks(
1330
+ self,
1331
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1332
+ *,
1333
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1334
+ filter: Optional["capo_devops_agent.types.task_filter.TaskFilter"] = None,
1335
+ limit: Optional[int] = None,
1336
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1337
+ sort_field: Optional[
1338
+ "capo_devops_agent.types.task_sort_field.TaskSortField"
1339
+ ] = None,
1340
+ order: Optional["capo_devops_agent.types.task_sort_order.TaskSortOrder"] = None,
1341
+ ) -> "capo_devops_agent.types.list_backlog_tasks_response.ListBacklogTasksResponse":
1342
+ """<p>Lists backlog tasks in the specified agent space with optional filtering and sorting</p>
1343
+
1344
+ Args:
1345
+ agent_space_id: <p>The unique identifier for the agent space containing the tasks</p>
1346
+ filter: <p>Filter criteria to apply when listing tasks Filtering restrictions: - Each filter field list is limited to a single value - Filtering by Priority and Status at the same time when not filtering by Type is not permitted - Timestamp filters (createdAfter, createdBefore) can be combined with other filters when not sorting by priority</p>
1347
+ limit: <p>Maximum number of tasks to return in a single response (1-1000, default: 100)</p>
1348
+ next_token: <p>Token for retrieving the next page of results</p>
1349
+ sort_field: <p>Field to sort by Sorting restrictions: - Only sorting on createdAt is supported when using priority or status filters alone. - Sorting by priority is not supported when using Timestamp filters (createdAfter, createdBefore)</p>
1350
+ order: <p>Sort order for the tasks based on sortField (default: DESC)</p>
1351
+
1352
+ Raises:
1353
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1354
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1355
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1356
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1357
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1358
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1359
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1360
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1361
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1362
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1363
+ """
1364
+
1365
+ async def _handler(
1366
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_backlog_tasks_request.ListBacklogTasksRequest]",
1367
+ ) -> AsyncOperationResponse[
1368
+ "capo_devops_agent.types.list_backlog_tasks_response.ListBacklogTasksResponse"
1369
+ ]:
1370
+ import capo_devops_agent._operations.dev_ops_agent.list_backlog_tasks
1371
+
1372
+ (
1373
+ output,
1374
+ http_response,
1375
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_backlog_tasks.async_list_backlog_tasks(
1376
+ req.options, req.input
1377
+ )
1378
+ return AsyncOperationResponse(output=output, response=http_response)
1379
+
1380
+ interceptors_, options_ = self.operation_options(config_overrides)
1381
+ input_: capo_devops_agent.types.list_backlog_tasks_request.ListBacklogTasksRequest = {
1382
+ "agent_space_id": agent_space_id
1383
+ }
1384
+ if filter is not None:
1385
+ input_["filter"] = filter
1386
+ if limit is not None:
1387
+ input_["limit"] = limit
1388
+ if next_token is not None:
1389
+ input_["next_token"] = next_token
1390
+ if sort_field is not None:
1391
+ input_["sort_field"] = sort_field
1392
+ if order is not None:
1393
+ input_["order"] = order
1394
+
1395
+ response = await aexecute_pipeline(
1396
+ AsyncOperationRequest(input=input_, options=options_),
1397
+ handler=_handler,
1398
+ interceptors=list(interceptors_),
1399
+ )
1400
+ await response.response.aclose()
1401
+ return response.output
1402
+
1403
+ async def iter_list_backlog_tasks(
1404
+ self,
1405
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1406
+ *,
1407
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1408
+ filter: Optional["capo_devops_agent.types.task_filter.TaskFilter"] = None,
1409
+ limit: Optional[int] = None,
1410
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1411
+ sort_field: Optional[
1412
+ "capo_devops_agent.types.task_sort_field.TaskSortField"
1413
+ ] = None,
1414
+ order: Optional["capo_devops_agent.types.task_sort_order.TaskSortOrder"] = None,
1415
+ ) -> "AsyncIterator[capo_devops_agent.types.task.Task]":
1416
+ _token = next_token
1417
+ while True:
1418
+ _response = await self.list_backlog_tasks(
1419
+ agent_space_id,
1420
+ config_overrides=config_overrides,
1421
+ filter=filter,
1422
+ limit=limit,
1423
+ next_token=_token,
1424
+ sort_field=sort_field,
1425
+ order=order,
1426
+ )
1427
+ _page = _resolve_path(_response, ("tasks",))
1428
+ for _item in _page or []:
1429
+ yield _item
1430
+ _token = _resolve_path(_response, ("next_token",))
1431
+ if not _token:
1432
+ break
1433
+
1434
+ async def list_chats(
1435
+ self,
1436
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1437
+ *,
1438
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1439
+ user_id: Optional["capo_devops_agent.types.resource_id.ResourceId"] = None,
1440
+ max_results: Optional[int] = None,
1441
+ next_token: Optional[str] = None,
1442
+ ) -> "capo_devops_agent.types.list_chats_response.ListChatsResponse":
1443
+ """<p>Retrieves a paginated list of the user's recent chat executions</p>
1444
+
1445
+ Args:
1446
+ user_id: <p>The user identifier to list chats for. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.</p>
1447
+ max_results: <p>Maximum number of results to return</p>
1448
+ next_token: <p>Token for pagination</p>
1449
+
1450
+ Raises:
1451
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1452
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1453
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1454
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1455
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1456
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1457
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1458
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1459
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1460
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1461
+ """
1462
+
1463
+ async def _handler(
1464
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_chats_request.ListChatsRequest]",
1465
+ ) -> AsyncOperationResponse[
1466
+ "capo_devops_agent.types.list_chats_response.ListChatsResponse"
1467
+ ]:
1468
+ import capo_devops_agent._operations.dev_ops_agent.list_chats
1469
+
1470
+ (
1471
+ output,
1472
+ http_response,
1473
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_chats.async_list_chats(
1474
+ req.options, req.input
1475
+ )
1476
+ return AsyncOperationResponse(output=output, response=http_response)
1477
+
1478
+ interceptors_, options_ = self.operation_options(config_overrides)
1479
+ input_: capo_devops_agent.types.list_chats_request.ListChatsRequest = {
1480
+ "agent_space_id": agent_space_id
1481
+ }
1482
+ if user_id is not None:
1483
+ input_["user_id"] = user_id
1484
+ if max_results is not None:
1485
+ input_["max_results"] = max_results
1486
+ if next_token is not None:
1487
+ input_["next_token"] = next_token
1488
+
1489
+ response = await aexecute_pipeline(
1490
+ AsyncOperationRequest(input=input_, options=options_),
1491
+ handler=_handler,
1492
+ interceptors=list(interceptors_),
1493
+ )
1494
+ await response.response.aclose()
1495
+ return response.output
1496
+
1497
+ async def list_executions(
1498
+ self,
1499
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1500
+ task_id: "capo_devops_agent.types.resource_id.ResourceId",
1501
+ *,
1502
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1503
+ limit: Optional[int] = None,
1504
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1505
+ ) -> "capo_devops_agent.types.list_executions_response.ListExecutionsResponse":
1506
+ """<p>List executions</p>
1507
+
1508
+ Args:
1509
+ agent_space_id: <p>The unique identifier for the agent space</p>
1510
+ task_id: <p>The unique identifier of the task whose executions to retrieve</p>
1511
+ limit: <p>Maximum number of executions to return</p>
1512
+ next_token: <p>Token for pagination to retrieve the next set of results</p>
1513
+
1514
+ Raises:
1515
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1516
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1517
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1518
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1519
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1520
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1521
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1522
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1523
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1524
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1525
+ """
1526
+
1527
+ async def _handler(
1528
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_executions_request.ListExecutionsRequest]",
1529
+ ) -> AsyncOperationResponse[
1530
+ "capo_devops_agent.types.list_executions_response.ListExecutionsResponse"
1531
+ ]:
1532
+ import capo_devops_agent._operations.dev_ops_agent.list_executions
1533
+
1534
+ (
1535
+ output,
1536
+ http_response,
1537
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_executions.async_list_executions(
1538
+ req.options, req.input
1539
+ )
1540
+ return AsyncOperationResponse(output=output, response=http_response)
1541
+
1542
+ interceptors_, options_ = self.operation_options(config_overrides)
1543
+ input_: capo_devops_agent.types.list_executions_request.ListExecutionsRequest = {
1544
+ "agent_space_id": agent_space_id,
1545
+ "task_id": task_id,
1546
+ }
1547
+ if limit is not None:
1548
+ input_["limit"] = limit
1549
+ if next_token is not None:
1550
+ input_["next_token"] = next_token
1551
+
1552
+ response = await aexecute_pipeline(
1553
+ AsyncOperationRequest(input=input_, options=options_),
1554
+ handler=_handler,
1555
+ interceptors=list(interceptors_),
1556
+ )
1557
+ await response.response.aclose()
1558
+ return response.output
1559
+
1560
+ async def iter_list_executions(
1561
+ self,
1562
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1563
+ task_id: "capo_devops_agent.types.resource_id.ResourceId",
1564
+ *,
1565
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1566
+ limit: Optional[int] = None,
1567
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1568
+ ) -> "AsyncIterator[capo_devops_agent.types.execution.Execution]":
1569
+ _token = next_token
1570
+ while True:
1571
+ _response = await self.list_executions(
1572
+ agent_space_id,
1573
+ task_id,
1574
+ config_overrides=config_overrides,
1575
+ limit=limit,
1576
+ next_token=_token,
1577
+ )
1578
+ _page = _resolve_path(_response, ("executions",))
1579
+ for _item in _page or []:
1580
+ yield _item
1581
+ _token = _resolve_path(_response, ("next_token",))
1582
+ if not _token:
1583
+ break
1584
+
1585
+ async def list_goals(
1586
+ self,
1587
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1588
+ *,
1589
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1590
+ status: Optional["capo_devops_agent.types.goal_status.GoalStatus"] = None,
1591
+ goal_type: Optional["capo_devops_agent.types.goal_type.GoalType"] = None,
1592
+ limit: Optional[int] = None,
1593
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1594
+ ) -> "capo_devops_agent.types.list_goals_response.ListGoalsResponse":
1595
+ """<p>Lists goals in the specified agent space with optional filtering</p>
1596
+
1597
+ Args:
1598
+ agent_space_id: <p>The unique identifier for the agent space</p>
1599
+ status: <p>Filter goals by goal status</p>
1600
+ goal_type: <p>Filter goals by goal type</p>
1601
+ limit: <p>Maximum number of goals to return</p>
1602
+ next_token: <p>Pagination token for the next set of results</p>
1603
+
1604
+ Raises:
1605
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1606
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1607
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1608
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1609
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1610
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1611
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1612
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1613
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1614
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1615
+ """
1616
+
1617
+ async def _handler(
1618
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_goals_request.ListGoalsRequest]",
1619
+ ) -> AsyncOperationResponse[
1620
+ "capo_devops_agent.types.list_goals_response.ListGoalsResponse"
1621
+ ]:
1622
+ import capo_devops_agent._operations.dev_ops_agent.list_goals
1623
+
1624
+ (
1625
+ output,
1626
+ http_response,
1627
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_goals.async_list_goals(
1628
+ req.options, req.input
1629
+ )
1630
+ return AsyncOperationResponse(output=output, response=http_response)
1631
+
1632
+ interceptors_, options_ = self.operation_options(config_overrides)
1633
+ input_: capo_devops_agent.types.list_goals_request.ListGoalsRequest = {
1634
+ "agent_space_id": agent_space_id
1635
+ }
1636
+ if status is not None:
1637
+ input_["status"] = status
1638
+ if goal_type is not None:
1639
+ input_["goal_type"] = goal_type
1640
+ if limit is not None:
1641
+ input_["limit"] = limit
1642
+ if next_token is not None:
1643
+ input_["next_token"] = next_token
1644
+
1645
+ response = await aexecute_pipeline(
1646
+ AsyncOperationRequest(input=input_, options=options_),
1647
+ handler=_handler,
1648
+ interceptors=list(interceptors_),
1649
+ )
1650
+ await response.response.aclose()
1651
+ return response.output
1652
+
1653
+ async def iter_list_goals(
1654
+ self,
1655
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1656
+ *,
1657
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1658
+ status: Optional["capo_devops_agent.types.goal_status.GoalStatus"] = None,
1659
+ goal_type: Optional["capo_devops_agent.types.goal_type.GoalType"] = None,
1660
+ limit: Optional[int] = None,
1661
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1662
+ ) -> "AsyncIterator[capo_devops_agent.types.goal.Goal]":
1663
+ _token = next_token
1664
+ while True:
1665
+ _response = await self.list_goals(
1666
+ agent_space_id,
1667
+ config_overrides=config_overrides,
1668
+ status=status,
1669
+ goal_type=goal_type,
1670
+ limit=limit,
1671
+ next_token=_token,
1672
+ )
1673
+ _page = _resolve_path(_response, ("goals",))
1674
+ for _item in _page or []:
1675
+ yield _item
1676
+ _token = _resolve_path(_response, ("next_token",))
1677
+ if not _token:
1678
+ break
1679
+
1680
+ async def list_journal_records(
1681
+ self,
1682
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1683
+ execution_id: "capo_devops_agent.types.resource_id.ResourceId",
1684
+ *,
1685
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1686
+ limit: Optional[int] = None,
1687
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1688
+ record_type: Optional[str] = None,
1689
+ order: Optional["capo_devops_agent.types.order_type.OrderType"] = None,
1690
+ ) -> "capo_devops_agent.types.list_journal_records_response.ListJournalRecordsResponse":
1691
+ """<p>List journal records for a specific execution</p>
1692
+
1693
+ Args:
1694
+ agent_space_id: <p>The unique identifier for the agent space containing the execution</p>
1695
+ execution_id: <p>The unique identifier of the execution whose journal records to retrieve</p>
1696
+ limit: <p>Maximum number of records to return in a single response (1-100, default: 100)</p>
1697
+ next_token: <p>Token for retrieving the next page of results</p>
1698
+ record_type: <p>Filter records by type (empty string returns all types)</p>
1699
+ order: <p>Sort order for the records based on timestamp (default: DESC)</p>
1700
+
1701
+ Raises:
1702
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1703
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1704
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1705
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1706
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1707
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1708
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1709
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1710
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1711
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1712
+ """
1713
+
1714
+ async def _handler(
1715
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_journal_records_request.ListJournalRecordsRequest]",
1716
+ ) -> AsyncOperationResponse[
1717
+ "capo_devops_agent.types.list_journal_records_response.ListJournalRecordsResponse"
1718
+ ]:
1719
+ import capo_devops_agent._operations.dev_ops_agent.list_journal_records
1720
+
1721
+ (
1722
+ output,
1723
+ http_response,
1724
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_journal_records.async_list_journal_records(
1725
+ req.options, req.input
1726
+ )
1727
+ return AsyncOperationResponse(output=output, response=http_response)
1728
+
1729
+ interceptors_, options_ = self.operation_options(config_overrides)
1730
+ input_: capo_devops_agent.types.list_journal_records_request.ListJournalRecordsRequest = {
1731
+ "agent_space_id": agent_space_id,
1732
+ "execution_id": execution_id,
1733
+ }
1734
+ if limit is not None:
1735
+ input_["limit"] = limit
1736
+ if next_token is not None:
1737
+ input_["next_token"] = next_token
1738
+ if record_type is not None:
1739
+ input_["record_type"] = record_type
1740
+ if order is not None:
1741
+ input_["order"] = order
1742
+
1743
+ response = await aexecute_pipeline(
1744
+ AsyncOperationRequest(input=input_, options=options_),
1745
+ handler=_handler,
1746
+ interceptors=list(interceptors_),
1747
+ )
1748
+ await response.response.aclose()
1749
+ return response.output
1750
+
1751
+ async def iter_list_journal_records(
1752
+ self,
1753
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1754
+ execution_id: "capo_devops_agent.types.resource_id.ResourceId",
1755
+ *,
1756
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1757
+ limit: Optional[int] = None,
1758
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1759
+ record_type: Optional[str] = None,
1760
+ order: Optional["capo_devops_agent.types.order_type.OrderType"] = None,
1761
+ ) -> "AsyncIterator[capo_devops_agent.types.journal_record.JournalRecord]":
1762
+ _token = next_token
1763
+ while True:
1764
+ _response = await self.list_journal_records(
1765
+ agent_space_id,
1766
+ execution_id,
1767
+ config_overrides=config_overrides,
1768
+ limit=limit,
1769
+ next_token=_token,
1770
+ record_type=record_type,
1771
+ order=order,
1772
+ )
1773
+ _page = _resolve_path(_response, ("records",))
1774
+ for _item in _page or []:
1775
+ yield _item
1776
+ _token = _resolve_path(_response, ("next_token",))
1777
+ if not _token:
1778
+ break
1779
+
1780
+ async def list_pending_messages(
1781
+ self,
1782
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1783
+ execution_id: "capo_devops_agent.types.resource_id.ResourceId",
1784
+ *,
1785
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1786
+ ) -> "capo_devops_agent.types.list_pending_messages_response.ListPendingMessagesResponse":
1787
+ """<p>List pending messages for a specific execution.</p>
1788
+
1789
+ Args:
1790
+ execution_id: <p>The unique identifier of the execution whose journal records to retrieve</p>
1791
+
1792
+ Raises:
1793
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1794
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1795
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1796
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1797
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1798
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1799
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1800
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1801
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1802
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1803
+ """
1804
+
1805
+ async def _handler(
1806
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_pending_messages_request.ListPendingMessagesRequest]",
1807
+ ) -> AsyncOperationResponse[
1808
+ "capo_devops_agent.types.list_pending_messages_response.ListPendingMessagesResponse"
1809
+ ]:
1810
+ import capo_devops_agent._operations.dev_ops_agent.list_pending_messages
1811
+
1812
+ (
1813
+ output,
1814
+ http_response,
1815
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_pending_messages.async_list_pending_messages(
1816
+ req.options, req.input
1817
+ )
1818
+ return AsyncOperationResponse(output=output, response=http_response)
1819
+
1820
+ interceptors_, options_ = self.operation_options(config_overrides)
1821
+ input_: capo_devops_agent.types.list_pending_messages_request.ListPendingMessagesRequest = {
1822
+ "agent_space_id": agent_space_id,
1823
+ "execution_id": execution_id,
1824
+ }
1825
+
1826
+ response = await aexecute_pipeline(
1827
+ AsyncOperationRequest(input=input_, options=options_),
1828
+ handler=_handler,
1829
+ interceptors=list(interceptors_),
1830
+ )
1831
+ await response.response.aclose()
1832
+ return response.output
1833
+
1834
+ async def list_recommendations(
1835
+ self,
1836
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1837
+ *,
1838
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1839
+ task_id: Optional["capo_devops_agent.types.resource_id.ResourceId"] = None,
1840
+ goal_id: Optional["capo_devops_agent.types.resource_id.ResourceId"] = None,
1841
+ status: Optional[
1842
+ "capo_devops_agent.types.recommendation_status.RecommendationStatus"
1843
+ ] = None,
1844
+ priority: Optional[
1845
+ "capo_devops_agent.types.recommendation_priority.RecommendationPriority"
1846
+ ] = None,
1847
+ limit: Optional[int] = None,
1848
+ next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
1849
+ ) -> "capo_devops_agent.types.list_recommendations_response.ListRecommendationsResponse":
1850
+ """<p>Lists recommendations for the specified agent space</p>
1851
+
1852
+ Args:
1853
+ agent_space_id: <p>The unique identifier for the agent space containing the recommendations</p>
1854
+ task_id: <p>Optional task ID to filter recommendations by specific task</p>
1855
+ goal_id: <p>Optional goal ID to filter recommendations by specific goal</p>
1856
+ status: <p>Optional status to filter recommendations by their current status</p>
1857
+ priority: <p>Optional priority to filter recommendations by priority level</p>
1858
+ limit: <p>Maximum number of recommendations to return in a single response</p>
1859
+ next_token: <p>Token for retrieving the next page of results</p>
1860
+
1861
+ Raises:
1862
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1863
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1864
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1865
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1866
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1867
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1868
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1869
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1870
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1871
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1872
+ """
1873
+
1874
+ async def _handler(
1875
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_recommendations_request.ListRecommendationsRequest]",
1876
+ ) -> AsyncOperationResponse[
1877
+ "capo_devops_agent.types.list_recommendations_response.ListRecommendationsResponse"
1878
+ ]:
1879
+ import capo_devops_agent._operations.dev_ops_agent.list_recommendations
1880
+
1881
+ (
1882
+ output,
1883
+ http_response,
1884
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_recommendations.async_list_recommendations(
1885
+ req.options, req.input
1886
+ )
1887
+ return AsyncOperationResponse(output=output, response=http_response)
1888
+
1889
+ interceptors_, options_ = self.operation_options(config_overrides)
1890
+ input_: capo_devops_agent.types.list_recommendations_request.ListRecommendationsRequest = {
1891
+ "agent_space_id": agent_space_id
1892
+ }
1893
+ if task_id is not None:
1894
+ input_["task_id"] = task_id
1895
+ if goal_id is not None:
1896
+ input_["goal_id"] = goal_id
1897
+ if status is not None:
1898
+ input_["status"] = status
1899
+ if priority is not None:
1900
+ input_["priority"] = priority
1901
+ if limit is not None:
1902
+ input_["limit"] = limit
1903
+ if next_token is not None:
1904
+ input_["next_token"] = next_token
1905
+
1906
+ response = await aexecute_pipeline(
1907
+ AsyncOperationRequest(input=input_, options=options_),
1908
+ handler=_handler,
1909
+ interceptors=list(interceptors_),
1910
+ )
1911
+ await response.response.aclose()
1912
+ return response.output
1913
+
1914
+ async def list_tags_for_resource(
1915
+ self,
1916
+ resource_arn: str,
1917
+ *,
1918
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1919
+ ) -> "capo_devops_agent.types.list_tags_for_resource_response.ListTagsForResourceResponse":
1920
+ """<p>Lists tags for the specified AWS DevOps Agent resource.</p>
1921
+
1922
+ Args:
1923
+ resource_arn: <p>The ARN of the resource.</p>
1924
+
1925
+ Raises:
1926
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1927
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1928
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1929
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1930
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1931
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1932
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1933
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1934
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
1935
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
1936
+ """
1937
+
1938
+ async def _handler(
1939
+ req: "AsyncOperationRequest[capo_devops_agent.types.list_tags_for_resource_request.ListTagsForResourceRequest]",
1940
+ ) -> AsyncOperationResponse[
1941
+ "capo_devops_agent.types.list_tags_for_resource_response.ListTagsForResourceResponse"
1942
+ ]:
1943
+ import capo_devops_agent._operations.dev_ops_agent.list_tags_for_resource
1944
+
1945
+ (
1946
+ output,
1947
+ http_response,
1948
+ ) = await capo_devops_agent._operations.dev_ops_agent.list_tags_for_resource.async_list_tags_for_resource(
1949
+ req.options, req.input
1950
+ )
1951
+ return AsyncOperationResponse(output=output, response=http_response)
1952
+
1953
+ interceptors_, options_ = self.operation_options(config_overrides)
1954
+ input_: capo_devops_agent.types.list_tags_for_resource_request.ListTagsForResourceRequest = {
1955
+ "resource_arn": resource_arn
1956
+ }
1957
+
1958
+ response = await aexecute_pipeline(
1959
+ AsyncOperationRequest(input=input_, options=options_),
1960
+ handler=_handler,
1961
+ interceptors=list(interceptors_),
1962
+ )
1963
+ await response.response.aclose()
1964
+ return response.output
1965
+
1966
+ @asynccontextmanager
1967
+ async def send_message(
1968
+ self,
1969
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
1970
+ execution_id: "capo_devops_agent.types.chat_execution_id.ChatExecutionId",
1971
+ content: "capo_devops_agent.types.message_content.MessageContent",
1972
+ *,
1973
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
1974
+ context: Optional[
1975
+ "capo_devops_agent.types.send_message_context.SendMessageContext"
1976
+ ] = None,
1977
+ user_id: Optional["capo_devops_agent.types.resource_id.ResourceId"] = None,
1978
+ asset_ids: Optional["capo_devops_agent.types.asset_id_list.AssetIdList"] = None,
1979
+ ) -> "AsyncGenerator[capo_devops_agent.types.send_message_response.SendMessageResponse]":
1980
+ """<p>Sends a chat message and streams the response for the specified agent space execution</p>
1981
+
1982
+ Args:
1983
+ agent_space_id: <p>The agent space identifier</p>
1984
+ execution_id: <p>The execution identifier for the chat session</p>
1985
+ content: <p>The user message content</p>
1986
+ context: <p>Optional context for the message</p>
1987
+ user_id: <p>User identifier. This field is deprecated and will be ignored — the service resolves user identity from the authenticated session.</p>
1988
+ asset_ids: <p>Optional list of asset identifiers to attach to the message</p>
1989
+
1990
+ Raises:
1991
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
1992
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
1993
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
1994
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
1995
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
1996
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
1997
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
1998
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
1999
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2000
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2001
+ """
2002
+
2003
+ async def _handler(
2004
+ req: "AsyncOperationRequest[capo_devops_agent.types.send_message_request.SendMessageRequest]",
2005
+ ) -> AsyncOperationResponse[
2006
+ "capo_devops_agent.types.send_message_response.SendMessageResponse"
2007
+ ]:
2008
+ import capo_devops_agent._operations.dev_ops_agent.send_message
2009
+
2010
+ (
2011
+ output,
2012
+ http_response,
2013
+ ) = await capo_devops_agent._operations.dev_ops_agent.send_message.async_send_message(
2014
+ req.options, req.input
2015
+ )
2016
+ return AsyncOperationResponse(output=output, response=http_response)
2017
+
2018
+ interceptors_, options_ = self.operation_options(config_overrides)
2019
+ input_: capo_devops_agent.types.send_message_request.SendMessageRequest = {
2020
+ "agent_space_id": agent_space_id,
2021
+ "execution_id": execution_id,
2022
+ "content": content,
2023
+ }
2024
+ if context is not None:
2025
+ input_["context"] = context
2026
+ if user_id is not None:
2027
+ input_["user_id"] = user_id
2028
+ if asset_ids is not None:
2029
+ input_["asset_ids"] = asset_ids
2030
+
2031
+ response = await aexecute_pipeline(
2032
+ AsyncOperationRequest(input=input_, options=options_),
2033
+ handler=_handler,
2034
+ interceptors=list(interceptors_),
2035
+ )
2036
+ try:
2037
+ yield response.output
2038
+ finally:
2039
+ await response.response.aclose()
2040
+
2041
+ async def tag_resource(
2042
+ self,
2043
+ resource_arn: str,
2044
+ tags: "capo_devops_agent.types.tags.Tags",
2045
+ *,
2046
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2047
+ ) -> "capo_devops_agent.types.tag_resource_response.TagResourceResponse":
2048
+ """<p>Adds or overwrites tags for the specified AWS DevOps Agent resource.</p>
2049
+
2050
+ Args:
2051
+ resource_arn: <p>The ARN of the resource to tag.</p>
2052
+ tags: <p>Tags to add to the resource.</p>
2053
+
2054
+ Raises:
2055
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2056
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2057
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2058
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2059
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2060
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2061
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2062
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2063
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2064
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2065
+ """
2066
+
2067
+ async def _handler(
2068
+ req: "AsyncOperationRequest[capo_devops_agent.types.tag_resource_request.TagResourceRequest]",
2069
+ ) -> AsyncOperationResponse[
2070
+ "capo_devops_agent.types.tag_resource_response.TagResourceResponse"
2071
+ ]:
2072
+ import capo_devops_agent._operations.dev_ops_agent.tag_resource
2073
+
2074
+ (
2075
+ output,
2076
+ http_response,
2077
+ ) = await capo_devops_agent._operations.dev_ops_agent.tag_resource.async_tag_resource(
2078
+ req.options, req.input
2079
+ )
2080
+ return AsyncOperationResponse(output=output, response=http_response)
2081
+
2082
+ interceptors_, options_ = self.operation_options(config_overrides)
2083
+ input_: capo_devops_agent.types.tag_resource_request.TagResourceRequest = {
2084
+ "resource_arn": resource_arn,
2085
+ "tags": tags,
2086
+ }
2087
+
2088
+ response = await aexecute_pipeline(
2089
+ AsyncOperationRequest(input=input_, options=options_),
2090
+ handler=_handler,
2091
+ interceptors=list(interceptors_),
2092
+ )
2093
+ await response.response.aclose()
2094
+ return response.output
2095
+
2096
+ async def untag_resource(
2097
+ self,
2098
+ resource_arn: str,
2099
+ tag_keys: "capo_devops_agent.types.tag_key_list.TagKeyList",
2100
+ *,
2101
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2102
+ ) -> "capo_devops_agent.types.untag_resource_response.UntagResourceResponse":
2103
+ """<p>Removes tags from the specified AWS DevOps Agent resource.</p>
2104
+
2105
+ Args:
2106
+ resource_arn: <p>The ARN of the resource to untag.</p>
2107
+ tag_keys: <p>Tag keys to remove.</p>
2108
+
2109
+ Raises:
2110
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2111
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2112
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2113
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2114
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2115
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2116
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2117
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2118
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2119
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2120
+ """
2121
+
2122
+ async def _handler(
2123
+ req: "AsyncOperationRequest[capo_devops_agent.types.untag_resource_request.UntagResourceRequest]",
2124
+ ) -> AsyncOperationResponse[
2125
+ "capo_devops_agent.types.untag_resource_response.UntagResourceResponse"
2126
+ ]:
2127
+ import capo_devops_agent._operations.dev_ops_agent.untag_resource
2128
+
2129
+ (
2130
+ output,
2131
+ http_response,
2132
+ ) = await capo_devops_agent._operations.dev_ops_agent.untag_resource.async_untag_resource(
2133
+ req.options, req.input
2134
+ )
2135
+ return AsyncOperationResponse(output=output, response=http_response)
2136
+
2137
+ interceptors_, options_ = self.operation_options(config_overrides)
2138
+ input_: capo_devops_agent.types.untag_resource_request.UntagResourceRequest = {
2139
+ "resource_arn": resource_arn,
2140
+ "tag_keys": tag_keys,
2141
+ }
2142
+
2143
+ response = await aexecute_pipeline(
2144
+ AsyncOperationRequest(input=input_, options=options_),
2145
+ handler=_handler,
2146
+ interceptors=list(interceptors_),
2147
+ )
2148
+ await response.response.aclose()
2149
+ return response.output
2150
+
2151
+ async def update_asset(
2152
+ self,
2153
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
2154
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
2155
+ *,
2156
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2157
+ metadata: Optional[object] = None,
2158
+ content: Optional["capo_devops_agent.types.asset_content.AssetContent"] = None,
2159
+ client_token: Optional[str] = None,
2160
+ ) -> "capo_devops_agent.types.update_asset_response.UpdateAssetResponse":
2161
+ """<p>Updates an asset in the specified agent space</p>
2162
+
2163
+ Args:
2164
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
2165
+ asset_id: <p>The unique identifier of the asset to update</p>
2166
+ metadata: <p>Metadata fields to update. Only the fields present in this document are updated. Omitted fields retain their current values.</p>
2167
+ content: <p>Optional content to set or replace. A single file adds or replaces one file; a zip replaces all files.</p>
2168
+ client_token: <p>A unique, case-sensitive identifier used for idempotent asset update</p>
2169
+
2170
+ Raises:
2171
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2172
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2173
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2174
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2175
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2176
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2177
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2178
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2179
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2180
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2181
+ """
2182
+
2183
+ async def _handler(
2184
+ req: "AsyncOperationRequest[capo_devops_agent.types.update_asset_request.UpdateAssetRequest]",
2185
+ ) -> AsyncOperationResponse[
2186
+ "capo_devops_agent.types.update_asset_response.UpdateAssetResponse"
2187
+ ]:
2188
+ import capo_devops_agent._operations.dev_ops_agent.update_asset
2189
+
2190
+ (
2191
+ output,
2192
+ http_response,
2193
+ ) = await capo_devops_agent._operations.dev_ops_agent.update_asset.async_update_asset(
2194
+ req.options, req.input
2195
+ )
2196
+ return AsyncOperationResponse(output=output, response=http_response)
2197
+
2198
+ interceptors_, options_ = self.operation_options(config_overrides)
2199
+ input_: capo_devops_agent.types.update_asset_request.UpdateAssetRequest = {
2200
+ "agent_space_id": agent_space_id,
2201
+ "asset_id": asset_id,
2202
+ }
2203
+ if metadata is not None:
2204
+ input_["metadata"] = metadata
2205
+ if content is not None:
2206
+ input_["content"] = content
2207
+ if client_token is None:
2208
+ client_token = str(uuid.uuid4())
2209
+ input_["client_token"] = client_token
2210
+
2211
+ response = await aexecute_pipeline(
2212
+ AsyncOperationRequest(input=input_, options=options_),
2213
+ handler=_handler,
2214
+ interceptors=list(interceptors_),
2215
+ )
2216
+ await response.response.aclose()
2217
+ return response.output
2218
+
2219
+ async def update_asset_file(
2220
+ self,
2221
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
2222
+ asset_id: "capo_devops_agent.types.resource_id.ResourceId",
2223
+ path: "capo_devops_agent.types.asset_file_path.AssetFilePath",
2224
+ *,
2225
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2226
+ content: Optional[
2227
+ "capo_devops_agent.types.asset_file_body.AssetFileBody"
2228
+ ] = None,
2229
+ metadata: Optional[object] = None,
2230
+ client_token: Optional[str] = None,
2231
+ ) -> "capo_devops_agent.types.update_asset_file_response.UpdateAssetFileResponse":
2232
+ """<p>Updates a file in an asset</p>
2233
+
2234
+ Args:
2235
+ agent_space_id: <p>The unique identifier for the agent space containing the asset</p>
2236
+ asset_id: <p>The unique identifier of the asset containing the file</p>
2237
+ path: <p>The path of the file within the asset to update</p>
2238
+ content: <p>Updated file content. If omitted, the existing content is unchanged.</p>
2239
+ metadata: <p>Metadata fields to update. Only the fields present in this document are updated. Omitted fields retain their current values.</p>
2240
+ client_token: <p>A unique, case-sensitive identifier used for idempotent asset file update</p>
2241
+
2242
+ Raises:
2243
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2244
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2245
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2246
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2247
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2248
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2249
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2250
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2251
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2252
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2253
+ """
2254
+
2255
+ async def _handler(
2256
+ req: "AsyncOperationRequest[capo_devops_agent.types.update_asset_file_request.UpdateAssetFileRequest]",
2257
+ ) -> AsyncOperationResponse[
2258
+ "capo_devops_agent.types.update_asset_file_response.UpdateAssetFileResponse"
2259
+ ]:
2260
+ import capo_devops_agent._operations.dev_ops_agent.update_asset_file
2261
+
2262
+ (
2263
+ output,
2264
+ http_response,
2265
+ ) = await capo_devops_agent._operations.dev_ops_agent.update_asset_file.async_update_asset_file(
2266
+ req.options, req.input
2267
+ )
2268
+ return AsyncOperationResponse(output=output, response=http_response)
2269
+
2270
+ interceptors_, options_ = self.operation_options(config_overrides)
2271
+ input_: capo_devops_agent.types.update_asset_file_request.UpdateAssetFileRequest = {
2272
+ "agent_space_id": agent_space_id,
2273
+ "asset_id": asset_id,
2274
+ "path": path,
2275
+ }
2276
+ if content is not None:
2277
+ input_["content"] = content
2278
+ if metadata is not None:
2279
+ input_["metadata"] = metadata
2280
+ if client_token is None:
2281
+ client_token = str(uuid.uuid4())
2282
+ input_["client_token"] = client_token
2283
+
2284
+ response = await aexecute_pipeline(
2285
+ AsyncOperationRequest(input=input_, options=options_),
2286
+ handler=_handler,
2287
+ interceptors=list(interceptors_),
2288
+ )
2289
+ await response.response.aclose()
2290
+ return response.output
2291
+
2292
+ async def update_backlog_task(
2293
+ self,
2294
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
2295
+ task_id: "capo_devops_agent.types.resource_id.ResourceId",
2296
+ *,
2297
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2298
+ task_status: Optional["capo_devops_agent.types.task_status.TaskStatus"] = None,
2299
+ client_token: Optional[str] = None,
2300
+ ) -> (
2301
+ "capo_devops_agent.types.update_backlog_task_response.UpdateBacklogTaskResponse"
2302
+ ):
2303
+ """<p>Update an existing backlog task.</p>
2304
+
2305
+ Args:
2306
+ agent_space_id: <p>The unique identifier for the agent space containing the task</p>
2307
+ task_id: <p>The unique identifier of the task to update</p>
2308
+ task_status: <p>Updated task status</p>
2309
+ client_token: <p>Client-provided token for idempotent operations</p>
2310
+
2311
+ Raises:
2312
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2313
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2314
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2315
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2316
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2317
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2318
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2319
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2320
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2321
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2322
+ """
2323
+
2324
+ async def _handler(
2325
+ req: "AsyncOperationRequest[capo_devops_agent.types.update_backlog_task_request.UpdateBacklogTaskRequest]",
2326
+ ) -> AsyncOperationResponse[
2327
+ "capo_devops_agent.types.update_backlog_task_response.UpdateBacklogTaskResponse"
2328
+ ]:
2329
+ import capo_devops_agent._operations.dev_ops_agent.update_backlog_task
2330
+
2331
+ (
2332
+ output,
2333
+ http_response,
2334
+ ) = await capo_devops_agent._operations.dev_ops_agent.update_backlog_task.async_update_backlog_task(
2335
+ req.options, req.input
2336
+ )
2337
+ return AsyncOperationResponse(output=output, response=http_response)
2338
+
2339
+ interceptors_, options_ = self.operation_options(config_overrides)
2340
+ input_: capo_devops_agent.types.update_backlog_task_request.UpdateBacklogTaskRequest = {
2341
+ "agent_space_id": agent_space_id,
2342
+ "task_id": task_id,
2343
+ }
2344
+ if task_status is not None:
2345
+ input_["task_status"] = task_status
2346
+ if client_token is None:
2347
+ client_token = str(uuid.uuid4())
2348
+ input_["client_token"] = client_token
2349
+
2350
+ response = await aexecute_pipeline(
2351
+ AsyncOperationRequest(input=input_, options=options_),
2352
+ handler=_handler,
2353
+ interceptors=list(interceptors_),
2354
+ )
2355
+ await response.response.aclose()
2356
+ return response.output
2357
+
2358
+ async def update_goal(
2359
+ self,
2360
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
2361
+ goal_id: str,
2362
+ *,
2363
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2364
+ evaluation_schedule: Optional[
2365
+ "capo_devops_agent.types.goal_schedule_input.GoalScheduleInput"
2366
+ ] = None,
2367
+ client_token: Optional[str] = None,
2368
+ ) -> "capo_devops_agent.types.update_goal_response.UpdateGoalResponse":
2369
+ """<p>Update an existing goal</p>
2370
+
2371
+ Args:
2372
+ agent_space_id: <p>The unique identifier for the agent space containing the goal</p>
2373
+ goal_id: <p>The unique identifier of the goal to update</p>
2374
+ evaluation_schedule: <p>Update goal schedule state</p>
2375
+ client_token: <p>Client-provided token for idempotent operations</p>
2376
+
2377
+ Raises:
2378
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2379
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2380
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2381
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2382
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2383
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2384
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2385
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2386
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2387
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2388
+ """
2389
+
2390
+ async def _handler(
2391
+ req: "AsyncOperationRequest[capo_devops_agent.types.update_goal_request.UpdateGoalRequest]",
2392
+ ) -> AsyncOperationResponse[
2393
+ "capo_devops_agent.types.update_goal_response.UpdateGoalResponse"
2394
+ ]:
2395
+ import capo_devops_agent._operations.dev_ops_agent.update_goal
2396
+
2397
+ (
2398
+ output,
2399
+ http_response,
2400
+ ) = await capo_devops_agent._operations.dev_ops_agent.update_goal.async_update_goal(
2401
+ req.options, req.input
2402
+ )
2403
+ return AsyncOperationResponse(output=output, response=http_response)
2404
+
2405
+ interceptors_, options_ = self.operation_options(config_overrides)
2406
+ input_: capo_devops_agent.types.update_goal_request.UpdateGoalRequest = {
2407
+ "agent_space_id": agent_space_id,
2408
+ "goal_id": goal_id,
2409
+ }
2410
+ if evaluation_schedule is not None:
2411
+ input_["evaluation_schedule"] = evaluation_schedule
2412
+ if client_token is None:
2413
+ client_token = str(uuid.uuid4())
2414
+ input_["client_token"] = client_token
2415
+
2416
+ response = await aexecute_pipeline(
2417
+ AsyncOperationRequest(input=input_, options=options_),
2418
+ handler=_handler,
2419
+ interceptors=list(interceptors_),
2420
+ )
2421
+ await response.response.aclose()
2422
+ return response.output
2423
+
2424
+ async def update_recommendation(
2425
+ self,
2426
+ agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
2427
+ recommendation_id: "capo_devops_agent.types.resource_id.ResourceId",
2428
+ *,
2429
+ config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
2430
+ status: Optional[
2431
+ "capo_devops_agent.types.recommendation_status.RecommendationStatus"
2432
+ ] = None,
2433
+ additional_context: Optional[str] = None,
2434
+ client_token: Optional[str] = None,
2435
+ ) -> "capo_devops_agent.types.update_recommendation_response.UpdateRecommendationResponse":
2436
+ """<p>Updates an existing recommendation with new content, status, or metadata</p>
2437
+
2438
+ Args:
2439
+ agent_space_id: <p>The unique identifier for the agent space containing the recommendation</p>
2440
+ recommendation_id: <p>The unique identifier for the recommendation to update</p>
2441
+ status: <p>Current status of the recommendation</p>
2442
+ additional_context: <p>Additional context for recommendation</p>
2443
+ client_token: <p>A unique token that ensures idempotency of the request</p>
2444
+
2445
+ Raises:
2446
+ capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
2447
+ capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
2448
+ capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
2449
+ capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
2450
+ capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
2451
+ capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
2452
+ capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
2453
+ capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
2454
+ capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
2455
+ capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
2456
+ """
2457
+
2458
+ async def _handler(
2459
+ req: "AsyncOperationRequest[capo_devops_agent.types.update_recommendation_request.UpdateRecommendationRequest]",
2460
+ ) -> AsyncOperationResponse[
2461
+ "capo_devops_agent.types.update_recommendation_response.UpdateRecommendationResponse"
2462
+ ]:
2463
+ import capo_devops_agent._operations.dev_ops_agent.update_recommendation
2464
+
2465
+ (
2466
+ output,
2467
+ http_response,
2468
+ ) = await capo_devops_agent._operations.dev_ops_agent.update_recommendation.async_update_recommendation(
2469
+ req.options, req.input
2470
+ )
2471
+ return AsyncOperationResponse(output=output, response=http_response)
2472
+
2473
+ interceptors_, options_ = self.operation_options(config_overrides)
2474
+ input_: capo_devops_agent.types.update_recommendation_request.UpdateRecommendationRequest = {
2475
+ "agent_space_id": agent_space_id,
2476
+ "recommendation_id": recommendation_id,
2477
+ }
2478
+ if status is not None:
2479
+ input_["status"] = status
2480
+ if additional_context is not None:
2481
+ input_["additional_context"] = additional_context
2482
+ if client_token is None:
2483
+ client_token = str(uuid.uuid4())
2484
+ input_["client_token"] = client_token
2485
+
2486
+ response = await aexecute_pipeline(
2487
+ AsyncOperationRequest(input=input_, options=options_),
2488
+ handler=_handler,
2489
+ interceptors=list(interceptors_),
2490
+ )
2491
+ await response.response.aclose()
2492
+ return response.output
2493
+
2494
+ async def __aenter__(self) -> Self:
2495
+ return self
2496
+
2497
+ async def __aexit__(self, exc_type: Any, exc: Any, tb: Any):
2498
+ await self._client.aclose()